/* Floating Wrapper */
.rem-currency-floating-wrapper {
    position: fixed;
    z-index: 999999;
}
.rem-currency-floating-wrapper.position-bottom_right { bottom: 20px; right: 20px; }
.rem-currency-floating-wrapper.position-bottom_left { bottom: 20px; left: 20px; }
.rem-currency-floating-wrapper.position-top_right { top: 20px; right: 20px; }
.rem-currency-floating-wrapper.position-top_left { top: 20px; left: 20px; }

/* Custom Dropdown Styles */
.rem-currency-switcher-wrapper {
    position: relative;
    display: inline-block;
    font-family: inherit;
    margin: 5px 0;
    text-transform: none !important;
}

.rem-currency-switcher-wrapper * {
    text-transform: none !important;
}

.rem-currency-custom-select {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.rem-currency-custom-select:hover {
    border-color: #aaa;
}

.rem-currency-selected {
    padding: 8px 30px 8px 15px;
    font-size: 14px;
    font-weight: 500;
    color: inherit;
    position: relative;
}

.rem-currency-selected::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: #666 transparent transparent transparent;
}

.rem-currency-custom-select[data-direction="up"] .rem-currency-selected::after {
    border-width: 0 5px 5px 5px;
    border-color: transparent transparent #666 transparent;
}

.rem-currency-list {
    position: absolute;
    left: 0;
    min-width: 100%;
    white-space: nowrap;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 0;
    padding: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
}

/* Direction Down */
.rem-currency-custom-select[data-direction="down"] .rem-currency-list {
    top: calc(100% + 5px);
    transform: translateY(-10px);
}
.rem-currency-custom-select[data-direction="down"].open .rem-currency-list {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Direction Up */
.rem-currency-custom-select[data-direction="up"] .rem-currency-list {
    bottom: calc(100% + 5px);
    transform: translateY(10px);
}
.rem-currency-custom-select[data-direction="up"].open .rem-currency-list {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.rem-currency-list li {
    padding: 8px 15px;
    font-size: 14px;
    color: #333;
    transition: background 0.2s;
    margin: 0;
}

.rem-currency-list li.rem-currency-placeholder {
    color: #999;
    cursor: default;
    pointer-events: none;
}

.rem-currency-list li:hover, .rem-currency-list li.active {
    background: #f5f5f5;
    color: #28a745;
}

/* Hide native select */
.rem-currency-selector {
    display: none !important;
}

/* Menu Item Fix */
li.rem-currency-menu-item {
    display: flex;
    align-items: center;
}

/* Search Box Styles */
.rem-currency-search-li {
    padding: 8px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: default;
}
.rem-currency-search-li:hover {
    background: #fafafa !important;
}
.rem-currency-search-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    font-family: inherit;
}
.rem-currency-search-input:focus {
    outline: none;
    border-color: #999;
}

/* Country Display Styles */
.rem-currency-list-display,
.rem-currency-selected-text {
    font-weight: 500;
    font-family: inherit, "Segoe UI", "Geeza Pro", "Noto Naskh Arabic", Tahoma, Arial, sans-serif;
}

.rem-aed-symbol {
    display: inline-block;
    direction: rtl;
    unicode-bidi: isolate;
    font-family: "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
    text-transform: none;
    letter-spacing: 0;
}

/* Ensure any SVG or image inside the dropdown fits cleanly */
.rem-currency-selected-text svg, 
.rem-currency-list-display svg,
.rem-currency-selected-text img, 
.rem-currency-list-display img {
    height: 1.2em;
    width: auto;
    max-width: 30px;
    vertical-align: middle;
}
