/* =========================================================
   VEDAPITHAM SHARED SITE HEADER
   One canonical header for Public / Student / Admin
   ========================================================= */

:root {
    --vp-shared-maroon-dark: #3d080e;
    --vp-shared-maroon: #6b111c;
    --vp-shared-gold: #cc9838;
    --vp-shared-gold-light: #e8c66e;
    --vp-shared-header-height: 119px; /* 112px header + 7px gold line */
}

.vp-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: linear-gradient(90deg, #3d080e 0%, #6b111c 50%, #3d080e 100%);
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.vp-site-header,
.vp-site-header * {
    box-sizing: border-box;
}

.vp-site-header a {
    text-decoration: none;
}

.vp-header-inner {
    min-height: 112px;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) max-content;
    align-items: center;
    gap: 24px;
    padding: 0 42px;
}

.vp-site-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.vp-site-logo img {
    width: 130px;
    height: 96px;
    max-width: 130px;
    max-height: 96px;
    display: block;
    object-fit: contain;
}

.vp-main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.vp-main-nav a {
    position: relative;
    padding: 44px 3px 40px;
    color: #fff7e9;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
}

.vp-main-nav a:hover,
.vp-main-nav a.active {
    color: var(--vp-shared-gold-light);
}

.vp-main-nav a::after {
    content: "";
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--vp-shared-gold-light);
    transform: scaleX(0);
    transition: transform .2s ease;
}

.vp-main-nav a:hover::after,
.vp-main-nav a.active::after {
    transform: scaleX(1);
}

/* Logged-out login link */
.vp-login-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    justify-self: end;
    gap: 7px !important;
    color: var(--vp-shared-gold-light) !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px !important;
    line-height: 1 !important;
    white-space: nowrap;
}

.vp-login-link .vp-login-svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex: 0 0 16px !important;
    display: block !important;
}

/* Signed-in account menu */
.vp-account-menu {
    position: relative;
    justify-self: end;
    margin-left: 0;
    min-width: max-content;
    z-index: 1200;
}

.vp-account-menu > summary {
    list-style: none;
}

.vp-account-menu > summary::-webkit-details-marker {
    display: none;
}

.vp-account-summary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    padding: 10px 0;
    color: var(--vp-shared-gold-light);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    line-height: 1.15;
    font-weight: 700;
}

.vp-account-summary:hover,
.vp-account-summary:focus-visible {
    color: #f3d57f;
    outline: none;
}

.vp-account-summary .vp-login-svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    max-height: 16px;
    flex: 0 0 16px;
    display: block;
}

.vp-account-name {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-account-chevron {
    display: inline-block;
    margin-left: 1px;
    font-size: 14px;
    line-height: 1;
    transition: transform .18s ease;
}

.vp-account-menu[open] .vp-account-chevron {
    transform: rotate(180deg);
}

.vp-account-dropdown {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    width: 220px;
    padding: 8px;
    background: #fffaf2;
    border: 1px solid rgba(125, 17, 30, .16);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(31, 7, 10, .22);
    overflow: hidden;
    color: #3d1716;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.3;
}

.vp-account-dropdown-name {
    padding: 10px 12px 9px;
    margin-bottom: 4px;
    color: #6f0d18;
    font-weight: 700;
    border-bottom: 1px solid rgba(125, 17, 30, .10);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vp-account-dropdown a,
.vp-account-logout-form button {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #3d1716;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-weight: 400;
    cursor: pointer;
}

.vp-account-dropdown a:hover,
.vp-account-dropdown a:focus-visible,
.vp-account-logout-form button:hover,
.vp-account-logout-form button:focus-visible {
    background: #f4e8d8;
    color: #6f0d18;
    outline: none;
}

.vp-account-logout-form {
    margin: 4px 0 0;
    padding: 4px 0 0;
    border-top: 1px solid rgba(125, 17, 30, .10);
}

.vp-account-logout-form button {
    color: #8b111d;
    font-weight: 700;
}

/* Gold separator beneath the header */
.vp-header-line {
    height: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--vp-shared-gold);
}

.vp-header-line span {
    height: 1px;
    flex: 1;
    background: var(--vp-shared-gold);
}

.vp-header-line b {
    font-size: 12px;
    font-weight: 700;
}

.vp-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(232, 198, 110, .5);
    border-radius: 7px;
    background: transparent;
}

.vp-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--vp-shared-gold-light);
}

@media (max-width: 1100px) {
    .vp-header-inner {
        grid-template-columns: 150px minmax(0, 1fr) max-content;
        padding: 0 25px;
    }

    .vp-main-nav {
        gap: 10px;
    }

    .vp-main-nav a {
        font-size: 14px;
    }

    .vp-account-name {
        max-width: 170px;
    }
}

@media (max-width: 920px) {
    :root {
        --vp-shared-header-height: 95px; /* 88 + 7 */
    }

    .vp-header-inner {
        display: flex;
        min-height: 88px;
        padding: 0 25px;
    }

    .vp-site-logo img {
        width: 105px;
        height: 72px;
        max-width: 105px;
        max-height: 72px;
    }

    .vp-account-menu,
    .vp-login-link {
        margin-left: auto;
        min-width: 0;
    }

    .vp-account-name {
        max-width: 145px;
    }

    .vp-menu-toggle {
        display: block;
        margin-left: 10px;
    }

    .vp-main-nav {
        position: absolute;
        top: 95px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px 25px 20px;
        background: #42090f;
    }

    .vp-menu-open .vp-main-nav {
        display: flex;
    }

    .vp-main-nav a {
        padding: 13px 5px;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .vp-main-nav a::after {
        display: none;
    }
}

@media (max-width: 600px) {
    .vp-header-inner {
        padding: 0 14px;
    }

    .vp-account-name {
        max-width: 105px;
    }

    .vp-account-dropdown {
        width: min(220px, calc(100vw - 28px));
    }
}

/* =========================================================
   CART + ACCOUNT ACTIONS REFRESH
   ========================================================= */
.vp-header-actions {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: max-content;
}

.vp-header-cart {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--vp-shared-gold-light) !important;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.vp-header-cart:hover,
.vp-header-cart:focus-visible {
    background: rgba(232,198,110,.10);
    color: #f3d57f !important;
    transform: translateY(-1px);
    outline: none;
}

.vp-header-cart svg {
    width: 27px;
    height: 27px;
    display: block;
}

.vp-cart-badge {
    position: absolute;
    top: -3px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1c24f;
    color: #5a0b14;
    border: 2px solid #55101a;
    font: 800 11px/1 Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

/* Make the account / login icon easier to see. */
.vp-account-summary .vp-login-svg {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    flex: 0 0 28px !important;
}

.vp-login-link .vp-login-svg {
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    min-height: 27px !important;
    max-width: 27px !important;
    max-height: 27px !important;
    flex: 0 0 27px !important;
}

@media (max-width: 920px) {
    .vp-header-actions {
        margin-left: auto;
        gap: 8px;
    }

    .vp-account-menu,
    .vp-login-link {
        margin-left: 0;
    }

    .vp-header-cart {
        width: 39px;
        height: 39px;
    }

    .vp-header-cart svg {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 600px) {
    .vp-header-actions {
        gap: 5px;
    }

    .vp-header-cart {
        width: 36px;
        height: 36px;
    }

    .vp-header-cart svg {
        width: 23px;
        height: 23px;
    }

    .vp-account-summary .vp-login-svg,
    .vp-login-link .vp-login-svg {
        width: 25px !important;
        height: 25px !important;
        min-width: 25px !important;
        min-height: 25px !important;
        max-width: 25px !important;
        max-height: 25px !important;
        flex-basis: 25px !important;
    }
}


/* =========================================================
   LARGE ACCOUNT ICON — clean icon-only account trigger
   ========================================================= */
.vp-account-summary {
    gap: 0 !important;
    padding: 4px !important;
    min-width: 46px;
    min-height: 46px;
    justify-content: center !important;
    border-radius: 50%;
}

.vp-account-summary .vp-login-svg {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    flex: 0 0 38px !important;
}

.vp-login-link .vp-login-svg {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    flex: 0 0 36px !important;
}

/* Old chevron is deliberately removed from the markup; hide defensively too. */
.vp-account-chevron {
    display: none !important;
}

@media (max-width: 920px) {
    .vp-account-summary {
        min-width: 42px;
        min-height: 42px;
        padding: 3px !important;
    }

    .vp-account-summary .vp-login-svg,
    .vp-login-link .vp-login-svg {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        flex-basis: 32px !important;
    }
}
