/**
 * Currency Switcher - Compact Version for Header
 * Enhanced styling with rounded corners and soft look
 */

/* Main Currency Switcher Container */
.currency-switcher-compact {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

/* Compact Currency Select Dropdown - Enhanced Styling */
.currency-select-compact {
    background: #ffffff;
    border: 2px solid rgba(74, 144, 226, 0.3);
    color: #333;
    padding: 8px 32px 8px 14px;
    border-radius: 12px; /* Rounded corners */
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 95px;
    height: 38px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); /* Soft shadow */
    
    /* Custom dropdown arrow */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a90e2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.currency-select-compact:hover {
    border-color: rgba(74, 144, 226, 0.6);
    background-color: rgba(74, 144, 226, 0.03);
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.15);
    transform: translateY(-1px);
}

.currency-select-compact:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2), 0 3px 10px rgba(74, 144, 226, 0.15);
}

.currency-select-compact:active {
    transform: translateY(0);
}

.currency-select-compact option {
    background: #fff;
    color: #333;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
}

/* Sticky header adjustments */
.header_wrapper.is_stuck .currency-select-compact {
    border-color: rgba(74, 144, 226, 0.3);
    background: #ffffff;
}

/* Dark/Transparent header theme support */
.header_wrapper.header_transparent .currency-select-compact {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header_wrapper.header_transparent .currency-select-compact:hover {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 1);
}

/* Ensure proper flex alignment with user menu */
.user_menu_wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 0;
}

/* Responsive design */
@media (max-width: 1400px) {
    .currency-switcher-compact {
        margin-right: 12px;
    }
    
    .currency-select-compact {
        font-size: 12px;
        padding: 7px 28px 7px 12px;
        min-width: 90px;
        height: 36px;
        border-radius: 10px;
    }
}

@media (max-width: 1200px) {
    .currency-switcher-compact {
        margin-right: 10px;
    }
    
    .currency-select-compact {
        font-size: 12px;
        padding: 6px 26px 6px 10px;
        min-width: 85px;
        height: 34px;
        border-radius: 9px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    }
}

@media (max-width: 991px) {
    .currency-switcher-compact {
        margin-right: 8px;
    }
    
    .currency-select-compact {
        font-size: 11px;
        padding: 5px 24px 5px 9px;
        min-width: 80px;
        height: 32px;
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    .currency-switcher-compact {
        margin-right: 6px;
    }
    
    .currency-select-compact {
        font-size: 11px;
        padding: 5px 22px 5px 8px;
        min-width: 75px;
        height: 30px;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }
}

@media (max-width: 576px) {
    .currency-select-compact {
        font-size: 10px;
        padding: 4px 20px 4px 7px;
        min-width: 70px;
        height: 28px;
        border-radius: 7px;
    }
}

/* Price conversion animation */
.price_area,
.listing_unit_price_wrapper,
.property_price,
.price-value,
.property_listing_price,
.item_price,
.property_listing .price_label,
.listing_unit_price_wrapper .price_label,
.property_unit_price,
.second_line .inforoom,
.property_price_value {
    transition: opacity 0.2s ease;
}

/* Highlight converted prices briefly */
@keyframes priceFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.price-updating {
    animation: priceFlash 0.4s ease;
}

/* Loading state for select */
.currency-select-compact.loading {
    opacity: 0.6;
    cursor: wait;
}

/* Ensure it doesn't interfere with consultation button */
.user_menu_wrapper .submit_consultation_button,
.user_menu_wrapper .submit_listing,
.user_menu_wrapper .submit_action {
    margin-left: 0 !important;
}

/* Fix any spacing issues with adjacent elements */
.currency-switcher-compact + * {
    margin-left: 0;
}

/* Soft glow effect on hover */
.currency-select-compact:hover::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .currency-select-compact {
        background-color: rgba(255, 255, 255, 0.95);
        color: #333;
        border-color: rgba(74, 144, 226, 0.4);
    }
}

/* Print styles - hide currency switcher when printing */
@media print {
    .currency-switcher-compact {
        display: none !important;
    }
}
