/* Top bar and footer of the generated content, blog and policy pages (subtitleai/seo/chrome.py).
 *
 * The footer markup is the homepage's own partial (static/templates/partials/uf_footer.html), so its
 * uf- class names are styled here with these pages' tokens and column width. The dark look of both
 * lives in seo-dark.css.
 */

/* ── Caption editor top bar ─────────────────────────────────────── */

.seo-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    padding-top: env(safe-area-inset-top, 0);
    background: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--bg-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.seo-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    /* With the 1 px line below it, a 64 px bar. */
    min-height: 63px;
}

.seo-topbar .seo-topbar-inner {
    max-width: 1152px;
    padding: 0 20px;
}

.seo-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
}

.seo-topbar-brand img {
    display: block;
    width: 32px;
    height: 32px;
}

.seo-topbar-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.seo-topbar-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.seo-topbar-help:hover {
    color: var(--text-primary);
}

.seo-topbar-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transition: background-color var(--transition-fast);
}

.seo-topbar-cta:hover {
    background: var(--accent-hover);
}

.seo-topbar-cta svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 639px) {
    .seo-topbar-help {
        display: none;
    }
}

@media (min-width: 640px) {
    .seo-topbar .seo-topbar-inner {
        padding: 0 48px;
    }

    .seo-topbar-cta {
        padding: 0 20px;
    }
}

/* ── Grouped footer ─────────────────────────────────────────────── */

/* landing-responsive.css pads a phone's body for the landing page's bottom CTA bar, which these pages
   do not have, so the footer band would stop short of the screen's bottom edge. */
.seo-body {
    padding-bottom: 0;
}

.seo-body .uf-footer {
    border-top: 1px solid var(--border-solid);
    background: var(--bg-surface);
    padding: 56px 0 calc(28px + env(safe-area-inset-bottom));
}

.seo-body .uf-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.seo-body .uf-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(5, 1fr);
    gap: 40px 28px;
}

.seo-body .uf-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.seo-body .uf-brand img {
    display: block;
    width: 38px;
    height: 38px;
}

.seo-body .uf-footer-brand p {
    max-width: 320px;
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.seo-body .uf-footer h2 {
    margin: 0 0 10px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.seo-body .uf-footer ul {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.seo-body .uf-footer li a {
    display: inline-flex;
    align-items: center;
    min-width: 44px;
    min-height: 44px;
    color: var(--text-primary);
    font-size: 14px;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.seo-body .uf-footer li a:hover {
    color: var(--accent);
}

.seo-body .uf-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid var(--border-solid);
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (pointer: coarse), (max-width: 640px) {
    .seo-topbar-cta {
        min-height: 44px;
    }
}

@media (max-width: 1100px) {
    .seo-body .uf-footer-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .seo-body .uf-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .seo-body .uf-footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .seo-body .uf-footer {
        padding-top: 40px;
    }

    .seo-body .uf-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 20px;
    }
}

@media (max-width: 400px) {
    .seo-topbar-inner,
    .seo-topbar-links {
        gap: 8px;
    }

    .seo-topbar-brand {
        gap: 8px;
        font-size: 16px;
    }

    .seo-topbar-brand img {
        width: 28px;
        height: 28px;
    }

    .seo-topbar-cta {
        padding: 0 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .seo-topbar-help,
    .seo-topbar-cta,
    .seo-body .uf-footer li a {
        transition: none;
    }
}
