/* SEO Audit - Redesigned v4.0 */
* { box-sizing: border-box; }

.sa-page {
    min-height: 100vh;
    background: #f9fafb;
    font-family: 'Inter', 'Poppins', system-ui, sans-serif;
    color: #111827;
}

/* Header */
.sa-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Loading */
.sa-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}
.sa-loading-spinner {
    width: 3rem; height: 3rem;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: sa-spin 0.8s linear infinite;
    margin-bottom: 1.25rem;
}
.sa-loading-spinner-sm {
    width: 1rem; height: 1rem;
    border: 2px solid #e5e7eb;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: sa-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes sa-spin { to { transform: rotate(360deg); } }
.sa-loading-msg {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

/* Error */
.sa-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

/* Content */
.sa-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 6rem;
}

/* Sections */
.sa-section {
    margin-bottom: 2.5rem;
}
.sa-section-title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 0.375rem;
    color: #111827;
}
.sa-section-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

/* Hero / Visibility Snapshot */
.sa-hero {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    margin-bottom: 1.25rem;
}
.sa-hero-domain {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.sa-hero-score-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin: 0 0 0.25rem;
}
.sa-hero-score {
    font-size: 4rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-bottom: 0.75rem;
}
.sa-hero-comparison {
    font-size: 0.9375rem;
    color: #6b7280;
    padding: 0.625rem 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    display: inline-block;
}
.sa-hero-comparison strong {
    color: #111827;
}

/* Score Grid */
.sa-score-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.sa-score-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}
.sa-score-card-icon {
    width: 2.5rem; height: 2.5rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}
.sa-score-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}
.sa-score-card-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-bottom: 0.375rem;
}
.sa-score-card-detail {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* AI Progress */
.sa-ai-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #7c3aed;
}

/* Query Cards (Section 2) */
.sa-query-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.sa-query-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    min-height: 10rem;
}
.sa-skeleton-card {
    padding: 1.25rem;
    overflow: hidden;
}
.sa-skeleton-lines {
    width: 100%;
}
.sa-query-loading {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 0;
    font-size: 0.8125rem;
    color: #7c3aed;
    font-weight: 500;
}
.sa-query-card-query {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}
.sa-query-card-query span {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.sa-query-results {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}
.sa-query-provider {
    font-size: 0.75rem;
}
.sa-query-provider-label {
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.sa-query-provider-brands {
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.5;
}
.sa-query-provider-brands .sa-brand-you {
    color: #16a34a;
    font-weight: 700;
}
.sa-query-provider-brands .sa-brand-competitor {
    color: #111827;
}
.sa-query-provider-brands .sa-brand-not-found {
    color: #dc2626;
    font-style: italic;
    font-size: 0.75rem;
}

/* Opportunity List (Section 3) */
.sa-opp-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sa-opp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}
.sa-opp-item-query {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    flex: 1;
}
.sa-opp-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    white-space: nowrap;
    margin-left: 0.75rem;
}
.sa-opp-tag-rank {
    background: #eff6ff;
    color: #2563eb;
}
.sa-opp-tag-cite {
    background: #f3e8ff;
    color: #7c3aed;
}

/* 30-Day Plan (Section 4) */
.sa-plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.sa-plan-week {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
}
.sa-plan-week-header {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #111827;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}
.sa-plan-week-items {
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sa-plan-item {
    font-size: 0.8125rem;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}
.sa-plan-item-bullet {
    width: 0.375rem; height: 0.375rem;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
    margin-top: 0.375rem;
}
.sa-plan-locked {
    position: relative;
}
.sa-plan-locked .sa-plan-week-items {
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
}
.sa-plan-lock-overlay {
    position: absolute;
    inset: 0;
    top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.7);
    gap: 0.5rem;
}
.sa-plan-lock-overlay svg {
    color: #9ca3af;
}
.sa-plan-lock-overlay span {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

/* CTA Section */
.sa-cta-section {
    margin-bottom: 0;
}
.sa-cta-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
}
.sa-cta-check-text {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.sa-cta-check-text strong {
    color: #111827;
}
.sa-cta-what-happens {
    text-align: left;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.sa-cta-steps {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}
.sa-cta-step {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.4;
}
.sa-cta-step-num {
    width: 1.375rem; height: 1.375rem;
    background: #111827;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Sticky CTA */
.sa-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 2rem;
    text-align: center;
    z-index: 100;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}

/* Buttons */
.sa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}
.sa-btn:hover { opacity: 0.88; }
.sa-btn-primary {
    background: var(--sa-accent, #8C82FC);
    color: #fff;
}
.sa-btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    border-radius: 0.625rem;
}

/* Skeleton loading */
.sa-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: sa-shimmer 1.5s infinite;
    border-radius: 0.375rem;
}
@keyframes sa-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Score colors */
.sa-score-good { color: #16a34a !important; }
.sa-score-ok { color: #ca8a04 !important; }
.sa-score-bad { color: #dc2626 !important; }

/* Mobile */
@media (max-width: 640px) {
    .sa-content { padding: 1.25rem 1rem 6rem; }
    .sa-score-grid { grid-template-columns: 1fr; }
    .sa-plan-grid { grid-template-columns: 1fr; }
    .sa-query-results { grid-template-columns: 1fr; gap: 0.5rem; }
    .sa-hero-score { font-size: 3rem; }
    .sa-score-card-value { font-size: 1.75rem; }
    .sa-header { padding: 0.75rem 1rem; }
}

/* Hide bootstrap preloader if present */
.preloader { display: none !important; }
body { font-family: 'Inter', 'Poppins', system-ui, sans-serif !important; }
