/*
 * Public website - mobile / tablet menu (header.php: .site-more button + #siteMobileMenu panel).
 * style1.css hides .site-links below 980px; this adds the three-dot button and a slide-in
 * panel with every page, using the site palette (navy / blue / gold, Inter).
 */

/* menu (hamburger) button: hidden on desktop */
.site-more {
    display: none;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
    transition: background-color .15s ease;
}

/* three horizontal lines */
.site-more span {
    display: block;
    width: 24px;
    height: 2.5px;
    border-radius: 3px;
    background: #14213d;
    transition: transform .25s ease, opacity .2s ease, background-color .15s ease;
}

.site-more:hover {
    background: #f1f5ff;
}

.site-more:hover span {
    background: #1f5eff;
}

/* open: lines turn into an X */
.site-more[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.site-more[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.site-more[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

.site-more:focus-visible {
    outline: 3px solid rgba(31, 94, 255, .35);
    outline-offset: 2px;
}

/* slide-in panel */
.site-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 1990;
    background: rgba(7, 21, 45, .45);
    opacity: 0;
    transition: opacity .25s ease;
}

.site-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    width: min(86vw, 340px);
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: -20px 0 60px rgba(6, 22, 51, .2);
    transform: translateX(100%);
    transition: transform .25s ease;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.site-mobile-menu[hidden],
.site-mobile-overlay[hidden] {
    display: none;
}

body.smm-open {
    overflow: hidden;
}

body.smm-open .site-mobile-menu {
    transform: translateX(0);
}

body.smm-open .site-mobile-overlay {
    opacity: 1;
}

.smm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
    background: linear-gradient(90deg, #07152d, #123061);
}

.smm-title {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .2px;
}

.smm-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.smm-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px 16px;
}

.smm-group {
    margin: 14px 8px 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #8b6b23;
}

.smm-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 12px;
    color: #14213d;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.smm-link:hover,
.smm-link:focus-visible {
    background: #f1f5ff;
    color: #1f5eff;
    outline: none;
}

.smm-sub {
    font-size: 14px;
    font-weight: 600;
}

.smm-ico {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--dc, #1f5eff);
    color: #fff;
    font-size: 16px;
    font-family: Inter, "Segoe UI Emoji", "Apple Color Emoji", Arial, sans-serif;
}

.smm-foot {
    padding: 14px 16px 18px;
    border-top: 1px solid #eef2f7;
}

.smm-register {
    display: block;
    text-align: center;
    padding: 13px 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #07152d, #1f5eff 60%, #c9a24a);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(31, 94, 255, .25);
}

.smm-register:hover {
    color: #fff;
    opacity: .94;
}

/* ---------------------------------------------------------------- logged-in user (header.php)
 * Replaces "Log in" when a session exists: initial + name + "User Panel" / "Admin Panel" link.
 */
/* menu items never squeeze into each other (Register used to overlap the account chip) */
.site-links > *,
.site-register {
    flex-shrink: 0;
    white-space: nowrap;
}

.site-account {
    margin-left: 4px;
}

.site-user {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    height: 48px;
    padding: 6px 14px 6px 6px;
    border: 1px solid #dfe7f3;
    border-radius: 999px;
    background: #fff;
    color: #14213d;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(6, 22, 51, .07);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.site-user:hover,
.site-account:hover .site-user {
    border-color: #bcd0f5;
    background: #f7faff;
    box-shadow: 0 10px 26px rgba(31, 94, 255, .14);
    color: #14213d;
}

.site-user .site-chev {
    margin-left: 2px;
    color: #65758e;
}

.site-user-avatar {
    position: relative;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #07152d, #1f5eff 70%, #c9a24a);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .02em;
}

/* small green "signed in" dot */
.site-user-avatar::after {
    content: "";
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #18b875;
    border: 2px solid #fff;
}

.site-user-avatar--lg {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.site-user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
    text-align: left;
}

.site-user-name {
    max-width: 170px;
    font-size: 14px;
    font-weight: 800;
    color: #14213d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-user-panel {
    font-size: 12px;
    font-weight: 600;
    color: #65758e;
}

/* account dropdown (reuses .site-dropdown / .site-login-menu from style1.css) */
.site-account-menu {
    width: 280px;
}

.site-account-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid #eef2f7;
}

.site-account-head b {
    display: block;
    color: #14213d;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
}

.site-account-head small {
    display: block;
    margin-top: 2px;
    color: #18a06a;
    font-size: 12px;
    font-weight: 700;
}

/* mobile menu version */
.smm-user {
    border: 1px solid #dce7f6;
    margin-bottom: 4px;
}

.smm-user .site-user-name {
    white-space: normal;
}

/* ---------------------------------------------------------------- show on tablet / mobile */
@media (max-width: 980px) {
    .site-more {
        display: inline-flex;
    }

    .site-nav {
        gap: 12px;
    }

    .site-brand {
        min-width: 0;
        flex: 1 1 auto;
    }
}

/* general mobile clean-up for every public page */
@media (max-width: 720px) {
    html,
    body {
        overflow-x: hidden;
    }

    /* the top strip text overlapped on small screens */
    .top {
        line-height: 1.45;
        padding: 8px 14px;
        font-weight: 700;
    }

    .site-brand-title {
        font-size: 17px;
        white-space: normal;
    }

    .site-brand-title small {
        font-size: 9.5px;
        letter-spacing: .12em;
    }

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }
}
