/**
 * Dralys Amazon-Style Account Dropdown CSS
 * Plugin: Dralys Amazon Dropdown
 * Version: 1.0.0
 */

/* ============================================
   DROPDOWN CONTAINER
   ============================================ */
.dralys-amazon-dropdown {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    z-index: 9999;
}

/* ============================================
   TRIGGER BUTTON (Header text)
   ============================================ */
.amazon-dropdown-trigger {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: border-color 0.15s ease;
    white-space: nowrap;
}

.amazon-dropdown-trigger:hover {
    border-color: #fff;
}

.amazon-dropdown-trigger .trigger-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.amazon-dropdown-trigger .greeting {
    font-size: 12px;
    color: #fff;
    font-weight: 400;
}

.amazon-dropdown-trigger .main-text {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 3px;
}

.amazon-dropdown-trigger .arrow {
    font-size: 8px;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.dralys-amazon-dropdown:hover .arrow {
    transform: rotate(180deg);
}

/* ============================================
   DROPDOWN PANEL
   ============================================ */
.amazon-dropdown-panel {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 380px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 10000;
    margin-top: 10px;
}

/* Show on hover */
.dralys-amazon-dropdown:hover .amazon-dropdown-panel,
.dralys-amazon-dropdown.active .amazon-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Arrow pointer at top */
.dropdown-arrow {
    position: absolute;
    top: -8px;
    right: 30px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
    z-index: -1;
}

/* Content wrapper */
.dropdown-content {
    padding: 14px 20px;
}

/* ============================================
   SIGN IN SECTION (for guests)
   ============================================ */
.signin-section {
    text-align: center;
    padding: 10px 0 15px;
}

.signin-button {
    display: inline-block;
    width: 100%;
    max-width: 220px;
    padding: 10px 20px;
    background: linear-gradient(to bottom, #f7dfa5, #f0c14b);
    border: 1px solid #a88734;
    border-radius: 3px;
    color: #111 !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.signin-button:hover {
    background: linear-gradient(to bottom, #f5d78e, #eeb933);
    text-decoration: none !important;
}

.new-customer {
    margin-top: 12px;
    font-size: 12px;
    color: #555;
}

.new-customer a {
    color: #0066c0 !important;
    text-decoration: none !important;
}

.new-customer a:hover {
    color: #c45500 !important;
    text-decoration: underline !important;
}

/* ============================================
   USER WELCOME (for logged in users)
   ============================================ */
.user-welcome {
    text-align: center;
    padding: 10px 0;
}

.welcome-text {
    font-size: 14px;
    color: #333;
}

.welcome-text strong {
    color: #e47911;
}

/* ============================================
   DIVIDER
   ============================================ */
.dropdown-divider {
    height: 1px;
    background: #e7e7e7;
    margin: 10px 0;
}

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */
.dropdown-columns {
    display: flex;
    gap: 30px;
}

.dropdown-column {
    flex: 1;
    min-width: 150px;
}

.column-title {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #e7e7e7;
}

.column-links {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.column-links li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.column-links li::before {
    display: none !important;
}

.column-links li a {
    display: block;
    padding: 5px 0;
    font-size: 13px;
    color: #444 !important;
    text-decoration: none !important;
    transition: color 0.15s ease;
}

.column-links li a:hover {
    color: #c45500 !important;
    text-decoration: underline !important;
}

/* ============================================
   SIGN OUT SECTION
   ============================================ */
.signout-section {
    text-align: center;
    padding: 5px 0;
}

.signout-link {
    display: inline-block;
    padding: 8px 40px;
    background: #f0f0f0;
    border: 1px solid #d5d5d5;
    border-radius: 3px;
    color: #111 !important;
    font-size: 13px;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.signout-link:hover {
    background: #e7e7e7;
    border-color: #c5c5c5;
}

/* ============================================
   DRALYS BRAND COLORS VARIANT
   ============================================ */
.dralys-amazon-dropdown.dralys-theme .signin-button {
    background: linear-gradient(to bottom, #f39c12, #e67e22);
    border-color: #d35400;
}

.dralys-amazon-dropdown.dralys-theme .signin-button:hover {
    background: linear-gradient(to bottom, #e67e22, #d35400);
}

.dralys-amazon-dropdown.dralys-theme .column-links li a:hover {
    color: #e67e22 !important;
}

.dralys-amazon-dropdown.dralys-theme .welcome-text strong {
    color: #e67e22;
}

.dralys-amazon-dropdown.dralys-theme .new-customer a:hover {
    color: #e67e22 !important;
}

/* ============================================
   LIGHT HEADER VARIANT
   ============================================ */
.dralys-amazon-dropdown.light-header .amazon-dropdown-trigger .greeting,
.dralys-amazon-dropdown.light-header .amazon-dropdown-trigger .main-text {
    color: #333;
}

.dralys-amazon-dropdown.light-header .amazon-dropdown-trigger:hover {
    border-color: #333;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .amazon-dropdown-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 80vh;
        overflow-y: auto;
        margin-top: 0;
        transform: translateY(100%);
    }
    
    .dralys-amazon-dropdown:hover .amazon-dropdown-panel,
    .dralys-amazon-dropdown.active .amazon-dropdown-panel {
        transform: translateY(0);
    }
    
    .dropdown-arrow {
        display: none;
    }
    
    .dropdown-columns {
        flex-direction: column;
        gap: 20px;
    }
    
    .dropdown-content {
        padding: 20px;
    }
    
    .amazon-dropdown-trigger .greeting {
        display: none;
    }
    
    .amazon-dropdown-trigger .main-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .signin-button {
        max-width: 100%;
    }
}

/* ============================================
   ANIMATION
   ============================================ */
@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dralys-amazon-dropdown:hover .amazon-dropdown-panel {
    animation: fadeInDropdown 0.2s ease forwards;
}

/* ============================================
   ELEMENTOR OVERRIDES
   ============================================ */
.elementor-widget-dralys_amazon_dropdown .dralys-amazon-dropdown {
    display: flex;
    justify-content: flex-end;
}

.elementor-widget-dralys_amazon_dropdown a {
    box-shadow: none !important;
}

/* Fix for some themes */
.dralys-amazon-dropdown * {
    box-sizing: border-box;
}
