/* ============================================================
   AMINOPRICES SITE SHELL — header + page frame for the
   "AminoPrices Blank" page template (no theme CSS is loaded).
   ============================================================ */

body.pa-blank {
    --pa-header-h: 68px;
    --pa-admin-h: 0px;
    margin: 0;
    background: #f4f6f9;
    color: #0b1220;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}
body.pa-blank.admin-bar { --pa-admin-h: 32px; }
@media (max-width: 782px) {
    body.pa-blank { --pa-header-h: 60px; }
    body.pa-blank.admin-bar { --pa-admin-h: 46px; }
}
/* Below 600px the WP admin bar scrolls away, so nothing to offset. */
@media (max-width: 600px) {
    body.pa-blank.admin-bar { --pa-admin-h: 0px; }
}
body.pa-blank *, body.pa-blank *::before, body.pa-blank *::after { box-sizing: border-box; }
body.pa-blank img { max-width: 100%; height: auto; }

/* The tracker's sticky toolbar parks just under the sticky header. */
body.pa-blank #pa-main-dashboard { --pa-sticky-top: calc(var(--pa-header-h) + var(--pa-admin-h)); }

.pa-skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}
.pa-skip-link:focus { top: 12px; }

/* ─── Header ─── */
.pa-site-header {
    position: sticky;
    top: var(--pa-admin-h);
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.pa-site-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1500px;
    height: var(--pa-header-h);
    margin: 0 auto;
    padding: 0 24px;
}
.pa-site-brand { display: flex; align-items: center; flex-shrink: 0; min-width: 0; }
/* Specific enough to beat `body.pa-blank img { height: auto }` so a large
   Customizer logo can never render at its natural size. */
body.pa-blank .pa-site-header .pa-site-logo {
    display: block;
    height: 51px;
    max-height: 51px;
    width: auto;
    max-width: 253px;
    object-fit: contain;
}

.pa-site-nav { margin-left: auto; }
.pa-site-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.pa-site-nav-list a {
    display: block;
    padding: 8px 14px;
    border-radius: 10px;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.pa-site-nav-list a:hover { background: rgba(37, 99, 235, 0.07); color: #2563eb; }
.pa-site-nav-list .current-menu-item > a,
.pa-site-nav-list a[aria-current="page"] { color: #2563eb; background: rgba(37, 99, 235, 0.08); }

.pa-site-actions { display: flex; align-items: center; gap: 8px; }
.pa-site-theme-toggle,
.pa-site-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.pa-site-theme-toggle:hover,
.pa-site-menu-btn:hover { color: #2563eb; border-color: #2563eb; }
.pa-site-theme-toggle:focus-visible,
.pa-site-menu-btn:focus-visible,
.pa-site-nav-list a:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.pa-site-theme-toggle .pa-theme-sun { display: none; }
html[data-pa-theme="dark"] .pa-site-theme-toggle .pa-theme-sun { display: block; }
html[data-pa-theme="dark"] .pa-site-theme-toggle .pa-theme-moon { display: none; }
.pa-site-menu-btn { display: none; }

/* Five links + logo need ~1150px; collapse to the menu button below that. */
@media (max-width: 1200px) {
    .pa-site-header-inner { padding: 0 16px; gap: 12px; }
    body.pa-blank .pa-site-header .pa-site-logo { height: 44px; max-height: 44px; max-width: 207px; }
    .pa-site-menu-btn { display: inline-flex; }
    .pa-site-actions { margin-left: auto; }
    .pa-site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 0;
        padding: 8px 16px 16px;
        background: #fff;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 16px 30px -18px rgba(15, 23, 42, 0.35);
        display: none;
    }
    .pa-site-header.is-menu-open .pa-site-nav { display: block; }
    .pa-site-nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
    .pa-site-nav-list a { padding: 12px 14px; font-size: 16px; }
}

/* ─── Page frame ─── */
.pa-site-main {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 24px 8px;
    /* Hidden tooltips on right-hand cards extend past the viewport; clip them
       so the page never scrolls sideways. `clip` (unlike `hidden`) doesn't
       create a scroll container, so the sticky toolbar keeps working. */
    overflow-x: clip;
}
@media (max-width: 782px) {
    .pa-site-main { padding: 16px 16px 4px; }
}
body.pa-blank .ap-footer { padding-left: 24px; padding-right: 24px; background: transparent; }
@media (max-width: 782px) {
    body.pa-blank .ap-footer { padding-left: 16px; padding-right: 16px; }
}

/* ─── Dark mode (toggled from the header or the tracker toolbar) ─── */
html[data-pa-theme="dark"] body.pa-blank .pa-site-header {
    background: rgba(7, 12, 23, 0.82);
    border-bottom-color: rgba(148, 163, 184, 0.14);
}
html[data-pa-theme="dark"] body.pa-blank .pa-site-header .pa-site-logo {
    /* The wordmark is dark navy; render it white on the dark header. */
    filter: brightness(0) invert(1);
}
html[data-pa-theme="dark"] body.pa-blank .pa-site-nav-list a { color: #b6c2d4; }
html[data-pa-theme="dark"] body.pa-blank .pa-site-nav-list a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }
html[data-pa-theme="dark"] body.pa-blank .pa-site-nav-list .current-menu-item > a,
html[data-pa-theme="dark"] body.pa-blank .pa-site-nav-list a[aria-current="page"] { color: #ffffff; background: rgba(110, 168, 255, 0.14); }
html[data-pa-theme="dark"] body.pa-blank .pa-site-theme-toggle,
html[data-pa-theme="dark"] body.pa-blank .pa-site-menu-btn {
    background: #0a111e;
    border-color: rgba(148, 163, 184, 0.24);
    color: #b6c2d4;
}
html[data-pa-theme="dark"] body.pa-blank .pa-site-theme-toggle { color: #fbbf24; }
@media (max-width: 1200px) {
    html[data-pa-theme="dark"] body.pa-blank .pa-site-nav {
        background: #0b1220;
        border-bottom-color: rgba(148, 163, 184, 0.14);
    }
}
/* Vendor footer */
html[data-pa-theme="dark"] body:is(.pa-blank, :has(.pa-shell)) .ap-footer {
    --ap-border: rgba(148, 163, 184, 0.16);
    --ap-text: #e6edf7;
    --ap-muted: #94a3b8;
    --ap-faint: #64748b;
    --ap-accent: #6ea8ff;
    --ap-success: #34d399;
    --ap-success-dark: #6ee7b7;
    --ap-success-soft: rgba(16, 185, 129, 0.10);
    background: transparent !important;
}
html[data-pa-theme="dark"] body:is(.pa-blank, :has(.pa-shell)) .ap-footer-inner {
    background: linear-gradient(180deg, #111a2b 0%, #0d1524 100%) !important;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6) !important;
}
html[data-pa-theme="dark"] body:is(.pa-blank, :has(.pa-shell)) .ap-logo-img { filter: brightness(0) invert(1); }
html[data-pa-theme="dark"] body:is(.pa-blank, :has(.pa-shell)) .ap-social a { border-color: var(--ap-border); }

/* Dark page frame for every blank-template page (content is darkened by site-dark.js). */
html[data-pa-theme="dark"]:has(body.pa-blank) { color-scheme: dark; background: #070c17; }
html[data-pa-theme="dark"] body.pa-blank {
    background:
        radial-gradient(1100px 520px at 12% -8%, rgba(79, 70, 229, 0.20), transparent 60%),
        radial-gradient(900px 460px at 100% 0%, rgba(16, 185, 129, 0.08), transparent 60%),
        #070c17;
    background-attachment: fixed;
    color: #e6edf7;
}
html[data-pa-theme="dark"] body.pa-blank .pa-site-main a:not([class]) { color: #6ea8ff; }
