/*
 * TechnicianMarket SiteChrome Transaction Variants v1.2.0
 *
 * Ownership:
 * - SiteChrome compact header for Cart and Account.
 * - SiteChrome sterile header for Checkout and payment routes.
 * - SiteChrome compact footer for Account routes.
 *
 * Boundary:
 * - Presentation only.
 * - No WooCommerce layout, form, gateway, payment, order, or account behavior.
 * - No external resources, imports, data URLs, or script-capable content.
 */

.tm-site-header--compact,
.tm-site-header--sterile {
    position: sticky;
    top: 0;
    z-index: 1000;
    isolation: isolate;
    width: 100%;
    color: #f7f9ff;
    border-bottom: 1px solid rgba(185, 205, 235, .16);
    background:
        radial-gradient(circle at 88% 0%, rgba(255, 90, 31, .12), transparent 32%),
        rgba(7, 9, 13, .97);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.admin-bar .tm-site-header--compact,
.admin-bar .tm-site-header--sterile {
    top: 32px;
}

.tm-site-header--compact::after,
.tm-site-header--sterile::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 90, 31, .34),
        transparent
    );
}

.tm-site-header--compact .tm-site-container,
.tm-site-header--sterile .tm-site-container {
    width: min(1420px, calc(100% - 44px));
    max-width: none;
    margin-inline: auto;
}

.tm-site-compact__inner,
.tm-site-sterile__inner {
    min-height: 76px;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    gap: clamp(18px, 3vw, 38px);
    align-items: center;
}

.tm-site-header--compact .tm-site-brand,
.tm-site-header--sterile .tm-site-brand {
    min-width: 0;
    flex: 0 0 auto;
}

.tm-site-compact__title {
    min-width: 0;
    overflow: hidden;
    color: #dce8f8;
    font-size: clamp(14px, 1.5vw, 17px);
    font-weight: 900;
    letter-spacing: -.018em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tm-site-compact__action,
.tm-site-sterile__return {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(185, 205, 235, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    color: #dce8f8;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color .16s ease,
        border-color .16s ease,
        background-color .16s ease,
        transform .16s ease;
}

.tm-site-compact__action:hover,
.tm-site-compact__action:focus-visible,
.tm-site-sterile__return:hover,
.tm-site-sterile__return:focus-visible {
    color: #fff;
    border-color: rgba(255, 90, 31, .55);
    background: rgba(255, 90, 31, .12);
    transform: translateY(-1px);
}

.tm-site-compact__action:focus-visible,
.tm-site-sterile__return:focus-visible {
    outline: 3px solid rgba(255, 122, 26, .34);
    outline-offset: 3px;
}

.tm-site-sterile__state {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    overflow: hidden;
    color: #e9f7ef;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .015em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tm-site-sterile__state > span {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 30px;
    border: 1px solid rgba(20, 199, 111, .34);
    border-radius: 999px;
    background: rgba(20, 199, 111, .10);
    color: #82f0b3;
}

.tm-site-sterile__state svg {
    width: 15px;
    height: 15px;
}

.tm-site-footer--compact {
    width: 100%;
    border-top: 1px solid rgba(185, 205, 235, .14);
    background: rgba(6, 9, 14, .92);
    color: #98accb;
    font-size: 12.5px;
}

.tm-site-footer--compact .tm-site-container {
    width: min(1320px, calc(100% - 44px));
    max-width: none;
    margin-inline: auto;
}

.tm-site-footer-compact__inner {
    min-height: 68px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    padding-block: 16px;
}

.tm-site-footer--compact nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
}

.tm-site-footer--compact a {
    color: #c6d4e8;
    font-weight: 800;
    text-decoration: none;
    text-underline-offset: 3px;
}

.tm-site-footer--compact a:hover,
.tm-site-footer--compact a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 782px) {
    .admin-bar .tm-site-header--compact,
    .admin-bar .tm-site-header--sterile {
        top: 46px;
    }
}

@media (max-width: 720px) {
    .tm-site-header--compact .tm-site-container,
    .tm-site-header--sterile .tm-site-container,
    .tm-site-footer--compact .tm-site-container {
        width: min(100% - 28px, 1420px);
    }

    .tm-site-compact__inner,
    .tm-site-sterile__inner {
        min-height: 68px;
        grid-template-columns: minmax(0, 1fr) max-content;
        gap: 12px;
    }

    .tm-site-compact__title,
    .tm-site-sterile__state {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: stretch;
        min-height: 42px;
        margin-bottom: 12px;
        padding: 0 14px;
        border: 1px solid rgba(185, 205, 235, .13);
        border-radius: 14px;
        background: rgba(255, 255, 255, .025);
        text-align: left;
    }

    .tm-site-sterile__state {
        justify-content: flex-start;
    }

    .tm-site-compact__action,
    .tm-site-sterile__return {
        min-height: 40px;
        padding-inline: 13px;
        font-size: 12px;
    }

    .tm-site-footer-compact__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .tm-site-compact__action {
        font-size: 0;
    }

    .tm-site-compact__action::after {
        content: "Shop";
        font-size: 12px;
    }

    .tm-site-sterile__return {
        padding-inline: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tm-site-header--compact *,
    .tm-site-header--sterile *,
    .tm-site-footer--compact * {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

@media (forced-colors: active) {
    .tm-site-header--compact,
    .tm-site-header--sterile,
    .tm-site-footer--compact,
    .tm-site-compact__action,
    .tm-site-sterile__return,
    .tm-site-sterile__state > span {
        border-color: CanvasText;
    }

    .tm-site-compact__action:focus-visible,
    .tm-site-sterile__return:focus-visible {
        outline: 2px solid Highlight;
    }
}
