/* Currency Selector Styles - Match Linguistic Selector */
.am-multi-currency .am-currency-select {
    position: relative;
    z-index: 100;
}

.am-multi-currency {
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

.am-currency-anchor {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    pointer-events: auto;
    position: relative;
    z-index: 101;
}

.am-currency-anchor i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.am-currency-anchor:hover {
    opacity: 0.8;
    color: inherit !important; /* Prevent color change to blue */
}

.currency-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 9999;
    padding: 4px 0;
    margin: 0;
    list-style: none !important;
    display: none;
    pointer-events: auto;
}

.currency-menu ul {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.currency-menu ul li {
    list-style: none !important;
}

.currency-menu li {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 4px;
    margin: 2px 8px;
    list-style: none !important;
    text-indent: 0;
    padding-left: 16px;
    pointer-events: auto;
    position: relative;
    z-index: 10000;
}

.currency-menu li:hover {
    background-color: #f8f9fa;
}

.currency-menu li.active {
    background-color: #007bff;
    color: white;
}

.currency-menu li span {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0.5px;
    list-style: none;
    text-indent: 0;
    padding: 0;
    margin: 0;
}

/* Footer specific styling - bright white text */
.am-fnavigation .am-multi-currency .am-currency-anchor {
    color: #ffffff !important;
    font-weight: 500;
}

.am-fnavigation .currency-menu {
    background: #2c3e50;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    bottom: 100% !important; /* Force open upward */
    top: auto !important; /* Override top positioning */
    margin-bottom: 8px; /* Space above dropdown */
    position: absolute;
    right: 0;
}

.am-fnavigation .currency-menu li {
    color: #ffffff !important;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 4px;
    margin: 2px 8px;
    list-style: none !important;
    text-indent: 0;
    padding-left: 16px;
}

.am-fnavigation .currency-menu li:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.am-fnavigation .currency-menu li.active {
    background-color: #007bff;
    color: #ffffff !important;
}

/* Prevent footer from expanding when dropdown opens */
.am-fnavigation {
    overflow: visible !important;
    position: relative;
}

.am-fnavigation .am-currency-select {
    position: relative;
}

/* Force footer dropdown to open upward - Multiple approaches */
.am-fnavigation .currency-menu,
footer .am-fnavigation .currency-menu,
.am-footer .am-fnavigation .currency-menu,
div.am-fnavigation .currency-menu {
    background: #2c3e50;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    bottom: calc(100% + 8px) !important; /* Force open upward with space */
    top: auto !important; /* Override top positioning */
    margin-bottom: 0; /* Remove margin since we use calc */
    position: absolute;
    right: 0;
    transform: translateY(0) !important; /* Prevent any transform */
    max-height: none !important;
    overflow: visible !important;
}

/* Additional override for any conflicting styles */
.am-fnavigation .currency-menu[style*="top"] {
    top: auto !important;
    bottom: calc(100% + 8px) !important;
}

.am-fnavigation .am-currency-select:hover .currency-menu,
.am-fnavigation .am-currency-select:focus-within .currency-menu {
    bottom: calc(100% + 8px) !important;
    top: auto !important;
}

/* Header responsive styling */
.am-loginbtns .am-multi-currency {
    margin-right: 15px;
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

.am-loginbtns .am-currency-select {
    position: relative;
    z-index: 101;
    pointer-events: auto;
}

.am-loginbtns .am-currency-anchor {
    pointer-events: auto;
    position: relative;
    z-index: 102;
}

.am-header_user .am-multi-currency {
    margin-right: 10px;
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

.am-header_user .am-currency-select {
    position: relative;
    z-index: 101;
    pointer-events: auto;
}

.am-header_user .am-currency-anchor {
    pointer-events: auto;
    position: relative;
    z-index: 102;
}

/* Footer bottom currency selector - white and bold arrow */
.am-footer_bottom .am-multi-currency {
    position: relative;
    z-index: 1000;
    pointer-events: auto;
}

.am-footer_bottom .am-currency-select {
    position: relative;
    z-index: 1001;
    pointer-events: auto;
}

.am-footer_bottom .am-currency-anchor {
    color: #ffffff !important;
    font-weight: 600 !important;
    pointer-events: auto;
    position: relative;
    z-index: 1002;
}

.am-footer_bottom .am-currency-anchor i {
    color: #ffffff !important;
    font-weight: 900 !important;
    font-size: 14px !important;
    -webkit-text-stroke: 0.5px #ffffff;
    text-shadow: 0 0 1px #ffffff;
}

.am-footer_bottom .currency-menu {
    background: #2c3e50;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
    bottom: calc(100% + 8px) !important;
    top: auto !important;
    z-index: 9999;
    pointer-events: auto;
}

.am-footer_bottom .currency-menu li {
    color: #ffffff !important;
    pointer-events: auto;
    z-index: 10000;
}

.am-footer_bottom .currency-menu li:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.am-footer_bottom .currency-menu li.active {
    background-color: #007bff;
    color: #ffffff !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .currency-menu {
        right: auto;
        left: 0;
    }
    
    .am-fnavigation .currency-menu {
        bottom: auto;
        top: 100%;
        margin-bottom: 0;
        margin-top: 8px;
    }
}
