/* User Dropdown CSS */
.header-user-dropdown {
    position: relative;
    display: inline-block;
}

/* Header trigger link — no border, sand bg on hover */
ul.accoutNav li.header-user-dropdown > a {
    border: none !important;
}
ul.accoutNav li.header-user-dropdown > a:hover {
    background-color: #f3e0ab !important;
    color: #000000 !important;
}

/* CRITICAL: Prevent the mobile header from clipping the dropdown panel */
ul.accoutNav.mobile,
ul.accoutNav.mobile li.header-user-dropdown {
    overflow: visible !important;
}

/* ============================================================
   DROPDOWN PANEL
   High z-index + explicit white bg to beat any parent color.
   ============================================================ */
.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 260px;
    background: #ffffff !important;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    list-style: none !important;
    padding: 8px 0 !important;
    margin-left: 0 !important;
    z-index: 99999; /* High enough to sit above everything on mobile */
    text-align: left;
}

/* ============================================================
   LIST ITEMS — reset any inherited mobile nav styles
   ============================================================ */
.user-dropdown-menu li {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    list-style: none !important;
    background: transparent !important;
    border: none !important;
}

/* ============================================================
   LINKS — force dark text regardless of parent header color
   ============================================================ */
.user-dropdown-menu li a,
.user-dropdown-menu li a:visited,
.user-dropdown-menu li a:link {
    display: flex !important;
    align-items: center !important;
    padding: 12px 20px !important;
    text-decoration: none !important;
    color: #222222 !important;   /* Dark — beats white inherited from header */
    font-size: 15px !important;
    font-weight: 500 !important;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    line-height: 1.5 !important;
    background-color: transparent !important;
    border: none !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* Sand hover */
.user-dropdown-menu li a:hover,
.user-dropdown-menu li a:focus {
    background-color: #f3e0ab !important;
    color: #000000 !important;
}

/* Icons — teal default, black on hover */
.user-dropdown-menu li a i.left-icon {
    color: #009d9a !important;
    width: 24px;
    text-align: center;
    font-size: 16px !important;
    margin-right: 12px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.user-dropdown-menu li a:hover i.left-icon {
    color: #000000 !important;
}

.user-dropdown-menu li a i.chevron {
    display: none;
}

/* Divider */
.user-dropdown-menu .dropdown-divider {
    height: 1px !important;
    background-color: #f0f0f0 !important;
    margin: 6px 0 !important;
    padding: 0 !important;
}

/* ============================================================
   MOBILE / TABLET — position & size tweaks
   On touch devices hover won't fire, clicks handle the toggle.
   ============================================================ */
@media (max-width: 991px) {
    .user-dropdown-menu {
        width: 240px;
        right: 0;
        left: auto;
    }
    /* Ensure it doesn't get clipped by the header overflow */
    .accoutNav.mobile,
    .header-user-dropdown {
        overflow: visible !important;
        position: relative;
    }
}

@media (max-width: 480px) {
    .user-dropdown-menu {
        width: 220px;
        font-size: 14px;
    }
    .user-dropdown-menu li a {
        padding: 11px 16px !important;
        font-size: 14px !important;
    }
}

/* ============================================================
   ALPINE TRANSITIONS
   ============================================================ */
.alpine-dropdown-enter-active {
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}
.alpine-dropdown-enter {
    opacity: 0;
    transform: translateY(-8px);
}
.alpine-dropdown-enter-to {
    opacity: 1;
    transform: translateY(0);
}
.alpine-dropdown-leave-active {
    transition: opacity 0.15s ease-in, transform 0.15s ease-in;
}
.alpine-dropdown-leave {
    opacity: 1;
    transform: translateY(0);
}
.alpine-dropdown-leave-to {
    opacity: 0;
    transform: translateY(-8px);
}
