/* assets/css/sitemap-audit.css - XML Sitemap Health Audit Stylesheet */

:root {
    --brand-navy: #123d79;
    --brand-navy-dark: #0f2444;
    --action-blue: #075bd8;
    --action-blue-hover: #0546a8;
    --action-orange: #ff6235;
    --action-orange-hover: #e54e22;

    --dark-ink: #17212f;
    --slate: #475569;
    --muted: #64748b;
    --border-line: #dbe3ee;
    --canvas: #f3f7fc;
    --canvas-alt: #f8fafc;
    --paper: #ffffff;
    --pale-sky: #eaf6ff;

    --status-pass: #059669;
    --status-pass-bg: #ecfdf5;
    --status-pass-border: #a7f3d0;
    
    --status-warn: #d97706;
    --status-warn-bg: #fffbeb;
    --status-warn-border: #fde68a;

    --status-crit: #e11d48;
    --status-crit-bg: #fff1f2;
    --status-crit-border: #fecdd3;

    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 12px rgba(17, 54, 102, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(15, 36, 68, 0.08);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-pill: 9999px;
}

body {
    background-color: var(--canvas-alt);
    color: var(--dark-ink);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

.sma-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem 1.25rem;
}

/* Hero Section */
.sma-hero {
    text-align: center;
    padding: 3rem 1.5rem 3.2rem 1.5rem;
    background: linear-gradient(135deg, var(--brand-navy-dark) 0%, var(--brand-navy) 100%);
    border-radius: var(--radius-lg);
    color: #ffffff;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.sma-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.14);
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.sma-hero h1 {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
    color: #ffffff;
}

.sma-hero p {
    font-size: 1.05rem;
    color: #e2e8f0;
    max-width: 720px;
    margin: 0 auto 1.75rem auto;
    line-height: 1.5;
}

/* Search Input Form */
.sma-search-form {
    max-width: 680px;
    margin: 0 auto 1.25rem auto;
    display: flex;
    gap: 10px;
    background: #ffffff;
    padding: 6px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.sma-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--dark-ink);
}

.sma-search-input::placeholder {
    color: #94a3b8;
}

.sma-search-btn {
    background: var(--action-orange);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.sma-search-btn:hover {
    background: var(--action-orange-hover);
    transform: translateY(-1px);
}

/* Sample Quick Search Chips */
.sma-sample-chips {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.sma-sample-link {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s ease;
}

.sma-sample-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Progress Card Loading State */
.sma-loading-card {
    background: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.sma-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--border-line);
    border-top-color: var(--action-orange);
    border-radius: 50%;
    animation: sma-spin 0.8s linear infinite;
    margin: 0 auto 1.25rem auto;
}

@keyframes sma-spin {
    to { transform: rotate(360deg); }
}

.sma-progress-bar-bg {
    width: 100%;
    max-width: 420px;
    height: 8px;
    background: var(--border-line);
    border-radius: 999px;
    margin: 1.25rem auto;
    overflow: hidden;
}

.sma-progress-bar-fill {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--action-blue) 0%, var(--action-orange) 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.sma-progress-step-text {
    font-size: 0.92rem;
    color: var(--slate);
    font-weight: 600;
}

/* Overview Score & Stat Cards */
.sma-summary-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

@media (max-width: 860px) {
    .sma-summary-grid {
        grid-template-columns: 1fr;
    }
}

.sma-score-card {
    background: var(--paper);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sma-score-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 4px solid var(--border-line);
    position: relative;
}

.sma-score-circle.grade-a {
    border-color: var(--status-pass);
    background: var(--status-pass-bg);
    color: var(--status-pass);
}

.sma-score-circle.grade-b {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.sma-score-circle.grade-c {
    border-color: var(--status-warn);
    background: var(--status-warn-bg);
    color: var(--status-warn);
}

.sma-score-circle.grade-f {
    border-color: var(--status-crit);
    background: var(--status-crit-bg);
    color: var(--status-crit);
}

.sma-score-val {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.sma-score-grade {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.sma-score-label {
    font-weight: 700;
    font-size: 1rem;
    color: var(--brand-navy);
}

.sma-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.sma-stat-box {
    background: var(--paper);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.sma-stat-box-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate);
    margin-bottom: 0.35rem;
}

.sma-stat-box-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-navy);
    line-height: 1.2;
}

.sma-stat-box-sub {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 4px;
}

/* Score Breakdown & Action Plan Box */
.sma-score-explain-box {
    background: var(--paper);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.sma-explain-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-navy);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Scoring Breakdown Table with Zebra Striping */
.sma-explain-table-wrapper {
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.sma-explain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-line);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate);
}

.sma-explain-header-right {
    width: 90px;
    text-align: right;
}

.sma-explain-rows {
    display: flex;
    flex-direction: column;
}

.sma-explain-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-line);
    gap: 1rem;
    background: #ffffff;
}

.sma-explain-row:nth-child(even) {
    background: #f8fafc;
}

.sma-explain-row:last-child {
    border-bottom: none;
}

.sma-explain-row-left strong {
    font-size: 0.92rem;
    color: var(--dark-ink);
    font-weight: 700;
}

.sma-explain-row-desc {
    font-size: 0.83rem;
    color: var(--slate);
    margin-top: 2px;
    line-height: 1.4;
}

.sma-explain-row-right {
    width: 90px;
    text-align: right;
    white-space: nowrap;
}

.sma-score-num {
    font-size: 1.05rem;
    font-weight: 800;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: inline-block;
}

.sma-score-num.base {
    color: var(--status-pass);
}

/* Discovered Sitemaps List (Near Top of Report) */
.sma-discovered-sitemaps-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sma-sitemap-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
    gap: 1rem;
    flex-wrap: wrap;
    transition: all 0.15s ease;
}

.sma-sitemap-item-row:hover {
    border-color: var(--action-blue);
    background: #f8fafc;
}

.sma-sitemap-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
    flex: 1;
}

.sma-sitemap-item-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sma-sitemap-item-url {
    font-size: 0.8rem;
    color: var(--slate);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    word-break: break-all;
}

.sma-sitemap-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sma-score-num.neutral {
    color: var(--muted);
}

.sma-score-num.crit {
    color: var(--status-crit);
}

.sma-score-num.warn {
    color: var(--status-warn);
}

/* Hygiene Callout Banners */
.sma-issue-banner {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.sma-issue-banner.crit {
    background: var(--status-crit-bg);
    border: 1px solid var(--status-crit-border);
    color: #9f1239;
}

.sma-issue-banner.warn {
    background: var(--status-warn-bg);
    border: 1px solid var(--status-warn-border);
    color: #92400e;
}

/* Navigation Tabs & Filters */
.sma-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-line);
    padding-bottom: 0.75rem;
}

.sma-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sma-tab-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.sma-tab-btn:hover {
    background: var(--canvas);
    color: var(--brand-navy);
}

.sma-tab-btn.active {
    background: var(--brand-navy);
    color: #ffffff;
}

.sma-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sma-btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border-line);
    color: var(--brand-navy);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.sma-btn-secondary:hover {
    border-color: var(--action-blue);
    color: var(--action-blue);
    background: var(--canvas);
}

.sma-btn-primary {
    background: var(--action-orange);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease;
    text-decoration: none;
}

.sma-btn-primary:hover {
    background: var(--action-orange-hover);
}

/* Filter Chips */
.sma-chips-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.sma-chip {
    background: #ffffff;
    border: 1px solid var(--border-line);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.15s ease;
}

.sma-chip:hover {
    border-color: var(--action-blue);
    color: var(--action-blue);
}

.sma-chip.active {
    background: var(--action-blue);
    color: #ffffff;
    border-color: var(--action-blue);
}

/* Tables */
.sma-card-table {
    background: var(--paper);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.sma-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.sma-table th {
    background: #f8fafc;
    color: var(--slate);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-line);
}

.sma-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-line);
    color: var(--dark-ink);
    vertical-align: middle;
}

.sma-table tr:last-child td {
    border-bottom: none;
}

.sma-table tr:hover td {
    background: #f8fafc;
}

/* Status Indicator Dots */
.sma-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.sma-dot.pass { background: var(--status-pass); }
.sma-dot.warn { background: var(--status-warn); }
.sma-dot.crit { background: var(--status-crit); }

/* Badges & Tags */
.sma-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1.2;
}

.sma-badge.pass { background: var(--status-pass-bg); color: var(--status-pass); border: 1px solid var(--status-pass-border); }
.sma-badge.warn { background: var(--status-warn-bg); color: var(--status-warn); border: 1px solid var(--status-warn-border); }
.sma-badge.crit { background: var(--status-crit-bg); color: var(--status-crit); border: 1px solid var(--status-crit-border); }

.sma-url-path {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

.sma-url-link {
    color: var(--brand-navy);
    text-decoration: none;
}

.sma-url-link:hover {
    color: var(--action-blue);
    text-decoration: underline;
}

/* Interactive Directory Tree UI & Caret Toggles */
.sma-tree-node {
    border-left: 2px solid var(--border-line);
    margin-left: 12px;
    padding-left: 14px;
    margin-top: 6px;
}

.sma-tree-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid var(--border-line);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.sma-tree-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sma-tree-count {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
}

.sma-tree-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    display: inline-flex;
    align-items: center;
    color: var(--slate);
    transition: transform 0.15s ease;
}

.sma-tree-children.is-collapsed {
    display: none !important;
}

/* Premium Feature Cards & Landing Grid */
.sma-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.sma-feature-card {
    background: var(--paper);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sma-feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--action-blue);
}

.sma-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--pale-sky);
    color: var(--action-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.sma-feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-navy);
    margin: 0 0 0.5rem 0;
}

.sma-feature-card p {
    font-size: 0.9rem;
    color: var(--slate);
    line-height: 1.55;
    margin: 0;
}

/* FAQ Accordion */
.sma-faq-section {
    background: var(--paper);
    border: 1px solid var(--border-line);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.sma-faq-item {
    border-bottom: 1px solid var(--border-line);
    padding: 1rem 0;
}

.sma-faq-item:last-child {
    border-bottom: none;
}

.sma-faq-question {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand-navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sma-faq-answer {
    font-size: 0.93rem;
    color: var(--slate);
    line-height: 1.6;
    margin-top: 0.75rem;
}

/* Print CSS Formatting */
.sma-print-header { display: none; }

@media print {
    .site-main-header, footer, .sma-hero, .sma-search-form, .sma-actions, #back-to-top, .sma-chips-bar, .no-print {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }
    .sma-container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    .sma-tab-content {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
    .sma-card-table, .sma-score-card, .sma-stat-box, .sma-score-explain-box {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
    }
    .sma-print-header {
        display: block !important;
        margin-bottom: 1.5rem;
        text-align: center;
        border-bottom: 2px solid var(--brand-navy);
        padding-bottom: 1rem;
    }
}
