
/* =========================================================
   1CLICK — Shared Site Shell
   File: /assets/css/site-shell.css
   Scope: Shared header and footer
   ========================================================= */

/* ---------- Shared header ---------- */

.oneclick-shell-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: rgba(245, 243, 238, .97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(16, 24, 39, .12);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #101827;
}

.oneclick-shell-header *,
.oneclick-shell-footer * {
    box-sizing: border-box;
}

.oneclick-shell-header__inner {
    width: min(1200px, calc(100% - 44px));
    min-height: 78px;
    margin: 0 auto;
    padding: 12px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.oneclick-shell-header .oneclick-shell-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    max-width: 100%;
    text-decoration: none;
    color: #101827;
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: .11em;
}

/* Explicitly constrain the header logo */
.oneclick-shell-header .oneclick-shell-brand img {
    display: block;
    width: auto;
    max-width: 160px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
}

.oneclick-shell-brand__fallback {
    display: none;
    align-items: center;
    gap: 8px;
}

.oneclick-shell-brand__mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 11px;
    background: #B8F36B;
    font-size: 1.15rem;
    letter-spacing: -.04em;
}

.oneclick-shell-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 1.6vw, 22px);
    flex-wrap: wrap;
    min-width: 0;
}

.oneclick-shell-nav a {
    color: #39465b;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 650;
    white-space: nowrap;
}

.oneclick-shell-nav a:hover,
.oneclick-shell-nav a[aria-current="page"] {
    color: #101827;
}

.oneclick-shell-nav .oneclick-shell-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 15px;
    border-radius: 10px;
    background: #101827;
    color: #fff;
}

.oneclick-shell-nav .oneclick-shell-logout {
    border: 0;
    background: transparent;
    color: #39465b;
    font: inherit;
    font-size: .88rem;
    font-weight: 650;
    cursor: pointer;
    padding: 8px 0;
}

/* ---------- Shared footer ---------- */

.oneclick-shell-footer {
    margin-top: 40px;
    background: #101827;
    color: #d5dbe5;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.oneclick-shell-footer__inner {
    width: min(1200px, calc(100% - 44px));
    margin: 0 auto;
    padding: 32px 0 24px;
}

.oneclick-shell-footer__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 24px;
}

.oneclick-shell-footer__brand {
    max-width: 360px;
}

.oneclick-shell-footer__brand p {
    margin: 12px 0 0;
    color: #b9c3d1;
    font-size: .91rem;
    line-height: 1.7;
}

.oneclick-shell-footer .oneclick-shell-brand {
    display: inline-flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.oneclick-shell-footer .oneclick-shell-brand img {
    display: block !important;
    width: auto;
    max-width: 155px;
    height: 44px;
    object-fit: contain;
    visibility: visible !important;
    opacity: 1 !important;
}

.oneclick-shell-footer .oneclick-shell-brand__mark {
    color: #101827;
}

.oneclick-shell-footer__links {
    display: flex;
    justify-content: flex-end;
    gap: 12px 22px;
    flex-wrap: wrap;
}

.oneclick-shell-footer__links a {
    color: #e4e8ef;
    text-decoration: none;
    font-size: .88rem;
}

.oneclick-shell-footer__links a:hover {
    color: #B8F36B;
}

.oneclick-shell-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding-top: 18px;
    color: #aeb8c8;
    font-size: .82rem;
}

.oneclick-shell-footer__bottom p {
    margin: 0;
}


/* ---------- Responsive shared shell ---------- */

.oneclick-shell-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid rgba(16, 24, 39, .18);
    border-radius: 10px;
    background: #fff;
    color: #101827;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.oneclick-shell-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}

.oneclick-shell-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(7px) rotate(45deg);
}

.oneclick-shell-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.oneclick-shell-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

/* Tablet and mobile navigation */
@media (max-width: 900px) {
    .oneclick-shell-header__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: center;
        justify-content: initial;
        gap: 12px;
        position: relative;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .oneclick-shell-header .oneclick-shell-brand {
        min-width: 0;
        justify-self: start;
    }

    .oneclick-shell-header .oneclick-shell-brand img {
        max-width: 145px;
        height: 38px;
    }

    .oneclick-shell-menu-toggle {
        display: flex;
        justify-self: end;
    }

    .oneclick-shell-header .oneclick-shell-nav {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        padding: 12px 0 6px;
        border-top: 1px solid rgba(16, 24, 39, .12);
        align-items: stretch;
        justify-content: flex-start;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
    }

    .oneclick-shell-header .oneclick-shell-nav.is-open {
        display: flex;
    }

    .oneclick-shell-header .oneclick-shell-nav > a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 44px;
        padding: 10px 4px;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .oneclick-shell-header .oneclick-shell-nav > form {
        display: block;
        width: 100%;
        margin: 0;
    }

    .oneclick-shell-header .oneclick-shell-nav .oneclick-shell-logout {
        display: block;
        width: 100%;
        min-height: 44px;
        padding: 10px 4px;
        text-align: left;
    }

    .oneclick-shell-header .oneclick-shell-nav .oneclick-shell-cta {
        justify-content: center;
        width: 100%;
        margin-top: 8px;
    }
}

/* Footer layout on smaller screens */
@media (max-width: 600px) {
    .oneclick-shell-header__inner,
    .oneclick-shell-footer__inner {
        width: calc(100% - 30px);
    }

    .oneclick-shell-footer__top {
        flex-direction: column;
        gap: 20px;
    }

    .oneclick-shell-footer__links {
        justify-content: flex-start;
    }

    .oneclick-shell-footer__bottom {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .oneclick-shell-menu-toggle span {
        transition: none;
    }
}
