/**
 * Copyright © Inn. All rights reserved.
 * Inn_HeaderActions - Styles
 */

/* ============================================ */
/* HEADER ACTIONS WRAPPER                      */
/* ============================================ */

.header-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

/* ============================================ */
/* USER DROPDOWN                                */
/* ============================================ */

.header-user-dropdown {
    position: relative;
    display: inline-block;
}

.header-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    text-decoration: none;
    color: #0D1307; /* @neutral_color */
    transition: all 0.3s ease;
}

.header-user-trigger:hover {
    background-color: #F8F7F4; /* @light_grey */
    transform: translateY(-2px);
}

.header-user-trigger.active {
    background-color: #F8F7F4; /* @light_grey */
}

.header-user-trigger i {
    font-size: 28px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.header-user-trigger:hover i {
    transform: scale(1.1);
}

.user-name-mobile {
    display: none;
    font-family: 'Onest', sans-serif; /* @mainfont */
    font-size: 14px;
    font-weight: 500;
}

/* ============================================ */
/* DROPDOWN MENU                                */
/* ============================================ */

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 280px;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border: 1px solid #E5E5E5;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* No animation for reduced motion preference */
.user-dropdown-menu.no-animation {
    transition: none;
}

/* ============================================ */
/* DROPDOWN HEADER                              */
/* ============================================ */

.user-dropdown-menu .dropdown-header {
    padding: 20px;
    border-bottom: 1px solid #E5E5E5;
    background: linear-gradient(135deg, #F8F7F4 0%, #FFFFFF 100%);
}

.user-dropdown-menu .welcome-text {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-family: 'Onest', sans-serif; /* @mainfont */
}

.user-dropdown-menu .customer-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #0D1307; /* @neutral_color */
    font-family: 'Onest', sans-serif; /* @mainfont */
}

/* ============================================ */
/* DROPDOWN LINKS                               */
/* ============================================ */

.user-dropdown-menu .dropdown-links {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.user-dropdown-menu .dropdown-links li {
    margin: 0;
}

.user-dropdown-menu .dropdown-links li.divider {
    height: 1px;
    background: #E5E5E5;
    margin: 8px 0;
}

.user-dropdown-menu .dropdown-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #0D1307; /* @neutral_color */
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: 'Onest', sans-serif; /* @mainfont */
    font-size: 14px;
}

.user-dropdown-menu .dropdown-links a:hover {
    background: #F8F7F4; /* @light_grey */
    color: #0D1307; /* @neutral_color */
}

.user-dropdown-menu .dropdown-links a:focus {
    outline: 2px solid #0D1307;
    outline-offset: -2px;
}

.user-dropdown-menu .dropdown-links a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.user-dropdown-menu .dropdown-links .logout-link {
    color: #DC3545;
}

.user-dropdown-menu .dropdown-links .logout-link:hover {
    background: #FFF5F5;
    color: #C82333;
}

/* ============================================ */
/* RESPONSIVE DESIGN                            */
/* ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .header-actions-wrapper {
        gap: 15px;
    }
    
    .header-user-trigger i {
        font-size: 26px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .header-actions-wrapper {
        gap: 10px;
    }
    
    .header-user-trigger {
        padding: 6px 10px;
    }
    
    .header-user-trigger i {
        font-size: 24px;
    }
    
    .user-name-mobile {
        display: inline;
        font-size: 12px;
    }
    
    .user-dropdown-menu {
        min-width: 260px;
        right: -10px;
    }
    
    .user-dropdown-menu .dropdown-header {
        padding: 16px;
    }
    
    .user-dropdown-menu .dropdown-links a {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Very Small Mobile */
@media (max-width: 480px) {
    .user-dropdown-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        min-width: auto;
        max-width: calc(100vw - 20px);
    }
}

/* ============================================ */
/* ACCESSIBILITY                                */
/* ============================================ */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .header-user-trigger {
        border: 2px solid currentColor;
    }
    
    .user-dropdown-menu {
        border: 2px solid #000;
    }
    
    .user-dropdown-menu .dropdown-links a:focus {
        outline: 3px solid #000;
    }
}

/* Focus Visible (modern browsers) */
.header-user-trigger:focus-visible {
    outline: 2px solid #0D1307;
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================ */
/* INTEGRATION WITH EXISTING ICONS              */
/* ============================================ */

/* Ensure all header icons have consistent styling */
.header-actions-wrapper .header-search-trigger,
.header-actions-wrapper .header-user-trigger,
.header-actions-wrapper .minicart-wrapper .action.showcart {
    color: #0D1307 !important;
}

/* Align all icons properly */
.header-actions-wrapper > * {
    display: flex;
    align-items: center;
}

