/* Shared public website chrome. Keep selectors scoped so page and dashboard CSS
   cannot accidentally restyle the website header. */
.tity-site-header {
    --tity-site-action-width: 182px;
    position: sticky;
    top: 0;
    z-index: 1050;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.tity-site-header .navbar {
    min-height: 100px;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    background: rgba(4, 9, 19, .94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.tity-site-header .container-xl {
    display: flex;
    align-items: center;
    min-height: 100px;
}

.tity-site-header .navbar-brand {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    padding: 0;
    margin-right: 35px;
}

.tity-site-header .navbar-brand img {
    display: block;
    width: auto;
    height: 100px;
    max-width: 230px;
    object-fit: contain;
}

.tity-site-header .tity-site-navigation { flex-grow: 1; min-width: 0; }
.tity-site-header .navbar-nav { display: flex; width: 100%; align-items: center; flex-direction: row; justify-content: space-between; gap: 8px; }
.tity-site-header .tity-site-action { display: flex; align-items: center; }

.tity-site-navigation-toggle {
    position: relative;
    display: none;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    border: 1px solid rgba(148, 163, 184, .32);
    border-radius: 11px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, .045);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    place-content: center;
    gap: 5px;
    transition: border-color .2s ease, background .2s ease;
}

.tity-site-navigation-toggle:hover,
.tity-site-navigation-toggle:focus-visible {
    border-color: rgba(34, 211, 238, .72);
    background: rgba(34, 211, 238, .1);
}

.tity-site-navigation-toggle:focus-visible {
    outline: 3px solid rgba(34, 211, 238, .22);
    outline-offset: 2px;
}

.tity-site-navigation-toggle > span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    pointer-events: none;
    transition: transform .22s ease, opacity .18s ease;
}

.tity-site-navigation-toggle[aria-expanded='true'] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tity-site-navigation-toggle[aria-expanded='true'] > span:nth-child(2) { opacity: 0; }
.tity-site-navigation-toggle[aria-expanded='true'] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.tity-site-header .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px !important;
    margin: 0;
    color: #cbd5e1 !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: color .25s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.tity-site-header .nav-link::after {
    position: absolute;
    bottom: 3px;
    left: 50%;
    width: 0;
    height: 3px;
    border-radius: 10px;
    background: linear-gradient(90deg, #00d1b2, #14b8ff, #7657ff);
    content: '';
    transform: translateX(-50%);
    transition: width .3s ease;
}

.tity-site-header .nav-link:hover { color: #fff !important; }
.tity-site-header .nav-link.active {
    color: #67e8f9 !important;
}
.tity-site-header .nav-link:hover::after,
.tity-site-header .nav-link.active::after { width: 70%; }

.tity-site-header .btn-brand,
.tity-site-header .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    margin-top: 0;
    padding: 9px 15px;
    border-radius: 10px;
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transition: transform .25s ease, filter .25s ease, background .25s ease, border-color .25s ease;
}

.tity-site-header .btn-brand {
    border: 0;
    background: linear-gradient(135deg, #00d1b2 0%, #14b8ff 50%, #7657ff 100%);
    box-shadow: 0 8px 22px rgba(20, 184, 255, .16);
}

.tity-site-header .btn-brand:hover { transform: translateY(-1px); filter: brightness(1.08); }
.tity-site-header .login-btn { gap: 9px; border: 1px solid rgba(20, 184, 255, .45); background: rgba(255, 255, 255, .04); box-shadow: none; }
.tity-site-header .login-btn .bi { font-size: 15px; line-height: 1; }
.tity-site-header .header-action-active {
    border-color: #22d3ee;
    color: #fff !important;
    background: linear-gradient(105deg, #0891b2, #2563eb 62%, #7c3aed);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, .2), 0 9px 24px rgba(37, 99, 235, .2);
}

.tity-site-header .btn-outline {
    border: 1px solid rgba(148, 163, 184, .28);
    color: #e2e8f0 !important;
    background: rgba(255, 255, 255, .025);
    font-weight: 700;
}

.tity-site-header .btn-outline:hover { border-color: rgba(20, 184, 255, .55); background: rgba(255, 255, 255, .07); }
.tity-site-header .header-action-icon { flex: 0 0 auto; font-size: 15px; line-height: 1; }
/* Button labels remain centered while page-specific sizing and colors stay intact. */
:is(a, button, input)[class~='btn'],
:is(a, button)[class*='-btn'],
input[type='submit'],
input[type='button'] { text-align: center; }

/* The complete desktop menu needs the full 1320px container. At smaller
   widths it becomes a vertical disclosure menu instead of a horizontal
   scroller, keeping every action reachable without widening the viewport. */
@media (max-width: 1399.98px) {
    .tity-site-header .navbar { min-height: 82px; }
    .tity-site-header .container-xl { flex-wrap: wrap; min-height: 82px; }
    .tity-site-header .navbar-brand { margin-right: auto; }
    .tity-site-header .navbar-brand img { width: 185px; height: 68px; }
    .tity-site-navigation-toggle { display: grid; }
    .tity-site-header .tity-site-navigation {
        display: none;
        width: 100%;
        max-height: calc(100dvh - 82px);
        flex: 0 0 100%;
        padding: 10px 0 14px;
        overflow-x: hidden;
        overflow-y: auto;
        border-top: 1px solid rgba(148, 163, 184, .14);
        scrollbar-width: none;
        overscroll-behavior: contain;
    }
    .tity-site-header .tity-site-navigation::-webkit-scrollbar { display: none; }
    .tity-site-header .tity-site-navigation.is-open { display: block; }
    .tity-site-header.is-navigation-open .navbar { box-shadow: 0 14px 35px rgba(0, 0, 0, .2); }
    .tity-site-header .navbar-nav {
        width: 100%;
        align-items: stretch !important;
        flex-direction: column;
        justify-content: flex-start;
        gap: 3px;
    }
    .tity-site-header .nav-link { width: 100%; justify-content: flex-start; padding: 10px 12px !important; }
    .tity-site-header .nav-link::after { right: auto; left: 12px; transform: none; }
    .tity-site-header .nav-link:hover::after,
    .tity-site-header .nav-link.active::after { width: 34px; }
    .tity-site-header .tity-site-action {
        width: min(100%, var(--tity-site-action-width));
        max-width: 100%;
        align-self: flex-start;
    }
    .tity-site-header .tity-site-action .btn-brand,
    .tity-site-header .tity-site-action .btn-outline {
        width: 100%;
        max-width: 100%;
        margin-top: 0;
    }
    .tity-site-header .nav-item { width: 100%; margin: 0 !important; }
    .tity-site-header .nav-item.tity-site-action { width: min(100%, var(--tity-site-action-width)); }
    .tity-site-header .role-account-menu { width: max-content; margin: 6px 0 2px; }
    .tity-site-header .role-account-menu__dropdown { right: auto; left: 0; max-width: calc(100vw - 32px); }
}

@media (min-width: 1400px) {
    .tity-site-header .navbar,
    .tity-site-header .container-xl {
        min-height: 98px;
        flex-wrap: nowrap;
    }

    .tity-site-header .navbar-brand {
        margin-right: clamp(12px, 1vw, 16px);
    }

    .tity-site-header .navbar-brand img {
        height: 96px;
        max-width: 210px;
    }

    .tity-site-header .tity-site-navigation {
        display: block !important;
        flex: 1 1 auto;
    }

    .tity-site-header .navbar-nav {
        justify-content: space-between;
        gap: clamp(4px, .35vw, 7px);
    }

    .tity-site-header .nav-item {
        flex: 0 0 auto;
        margin: 0 !important;
    }

    .tity-site-header .nav-link {
        padding: 10px 6px !important;
        font-size: 14px;
    }

    .tity-site-header .btn-brand,
    .tity-site-header .btn-outline {
        gap: 6px;
        min-height: 42px;
        padding-inline: 12px;
        font-size: 13px;
    }

    .tity-site-header .header-action-icon {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .tity-site-header .navbar,
    .tity-site-header .container-xl { min-height: 72px; }
    .tity-site-header .navbar-brand img { width: 148px; height: 58px; }
    .tity-site-header .tity-site-navigation { max-height: calc(100dvh - 72px); }
}

@media (prefers-reduced-motion: reduce) {
    .tity-site-navigation-toggle > span { transition: none; }
}
