/* ============================================
   Industry SEO Audit Modal Styles
   Full-screen overlay with professional design
   ============================================ */

/* Modal Container */
.audit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audit-modal.active {
    display: block;
    opacity: 1;
}

/* Overlay Background */
.audit-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

/* Modal Content Container */
.audit-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.audit-modal-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 30px 60px;
    min-height: 100vh;
}

/* Close Button */
.audit-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.audit-modal-close:hover {
    background: #fff;
    transform: rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Loading State */
.audit-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    color: #fff;
}

.audit-loading .spinner {
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid #fff;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.audit-loading h3 {
    color: #fff;
    font-size: 2em;
    margin-bottom: 10px;
}

.audit-loading .text-muted {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1em;
}

/* Results Section */
.audit-results {
    display: none;
}

.audit-results.active {
    display: block;
}

/* Results Header */
.modal-results-header {
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}

.modal-results-header h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #fff;
}

.modal-results-header .lead {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.8);
    word-break: break-word;
}

/* Score Hero */
.score-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.score-label {
    font-size: 1.4em;
    opacity: 0.95;
    font-weight: 500;
}

.overall-score {
    font-size: 6em;
    font-weight: bold;
    margin: 25px 0;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Audit Categories */
.audit-category {
    margin-bottom: 25px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.audit-category:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.category-header {
    background: #f8f9fa;
    padding: 25px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-header:hover {
    background: #e9ecef;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

.category-title i {
    font-size: 1.6em;
    color: #667eea;
}

.category-score {
    font-size: 2em;
    font-weight: bold;
    padding: 15px 28px;
    border-radius: 8px;
    min-width: 90px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.score-excellent {
    background: #28a745;
    color: white;
}

.score-good {
    background: #17a2b8;
    color: white;
}

.score-fair {
    background: #ffc107;
    color: #333;
}

.score-poor {
    background: #dc3545;
    color: white;
}

.category-content {
    padding: 35px;
    display: none;
    background: #fff;
}

.category-content.active {
    display: block;
}

/* Audit Items */
.audit-item {
    padding: 22px;
    margin-bottom: 18px;
    border-left: 5px solid #ddd;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.audit-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.audit-item.pass {
    border-left-color: #28a745;
    background: #d4edda;
}

.audit-item.fail {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.audit-item.warning {
    border-left-color: #ffc107;
    background: #fff3cd;
}

.audit-item-title {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.15em;
}

.audit-item-title i {
    font-size: 1.4em;
}

.audit-item.pass .audit-item-title i {
    color: #28a745;
}

.audit-item.fail .audit-item-title i {
    color: #dc3545;
}

.audit-item.warning .audit-item-title i {
    color: #856404;
}

.audit-item-description {
    color: #555;
    line-height: 1.7;
    font-size: 1em;
}

/* Recommendations Box */
.recommendations-box {
    background: rgba(255, 243, 205, 0.95);
    border: 3px solid #ffc107;
    border-radius: 12px;
    padding: 35px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.recommendations-box h3 {
    color: #856404;
    margin-bottom: 25px;
    font-size: 1.8em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.recommendations-box ul {
    list-style: none;
    padding-left: 0;
}

.recommendations-box li {
    padding: 15px 0;
    padding-left: 40px;
    position: relative;
    color: #856404;
    line-height: 1.7;
    font-size: 1.05em;
    border-bottom: 1px solid rgba(133, 100, 4, 0.1);
}

.recommendations-box li:last-child {
    border-bottom: none;
}

.recommendations-box li:before {
    content: "\f0da";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 15px;
    font-size: 1.3em;
    color: #ffc107;
}

/* CTA Section */
.modal-cta-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.cta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px;
    border-radius: 12px;
    text-align: center;
    color: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cta-card h3 {
    font-size: 2.2em;
    margin-bottom: 15px;
    color: #fff;
}

.cta-card p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    padding: 18px 40px;
    font-size: 1.1em;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.cta-buttons .btn-primary {
    background: #fff;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-buttons .btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cta-buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid #fff;
}

.cta-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .audit-modal-content {
        padding: 70px 25px 50px;
    }
}

@media (max-width: 768px) {
    .audit-modal-content {
        padding: 70px 20px 40px;
    }

    .audit-modal-close {
        width: 45px;
        height: 45px;
        top: 15px;
        right: 15px;
        font-size: 20px;
    }

    .modal-results-header h2 {
        font-size: 1.8em;
    }

    .modal-results-header .lead {
        font-size: 1em;
    }

    .overall-score {
        font-size: 4em;
    }

    .score-hero {
        padding: 35px 25px;
    }

    .score-label {
        font-size: 1.2em;
    }

    .category-header {
        padding: 18px 20px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .category-title {
        font-size: 1.2em;
    }

    .category-score {
        font-size: 1.5em;
        padding: 10px 20px;
        align-self: flex-end;
    }

    .category-content {
        padding: 25px 20px;
    }

    .audit-item {
        padding: 18px;
    }

    .audit-item-title {
        font-size: 1em;
    }

    .recommendations-box {
        padding: 25px 20px;
    }

    .recommendations-box h3 {
        font-size: 1.4em;
    }

    .recommendations-box li {
        font-size: 0.95em;
        padding-left: 35px;
    }

    .cta-card {
        padding: 35px 25px;
    }

    .cta-card h3 {
        font-size: 1.6em;
    }

    .cta-card p {
        font-size: 1em;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .overall-score {
        font-size: 3.5em;
    }

    .category-title {
        font-size: 1.1em;
        gap: 12px;
    }

    .category-title i {
        font-size: 1.3em;
    }
}

/* Print Styles */
@media print {
    .audit-modal-overlay,
    .audit-modal-close,
    .cta-card {
        display: none !important;
    }

    .audit-modal-container {
        background: white;
    }

    .audit-modal-content {
        padding: 20px;
    }

    .modal-results-header h2,
    .modal-results-header .lead {
        color: #333;
    }

    .audit-category {
        page-break-inside: avoid;
    }

    .category-content {
        display: block !important;
    }
}
