.ncsw-custom-dropdown {
    position: relative;
    display: inline-block;
    width: 110px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}
.ncsw-currency-switcher-product {
    margin-bottom: 10px;
    margin-top: 10px;
}
.ncsw-selected-option {
    padding: 5px 5px 5px 10px;
    display: flex;
    align-items: center;
}
.ncsw-flag {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: middle;
}
.ncsw-currency-code {
    flex-grow: 1;
}
.ncsw-arrow {
    position: relative;
    margin: 0 8px !important;
    height: 8px;
    width: 8px;
}
.ncsw-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}
.ncsw-arrow.open {
    transform: rotate(180deg);
}
.ncsw-arrow::before,
.ncsw-arrow::after {
    content: "";
    position: absolute;
    bottom: 0px;
    width: 0.15rem;
    height: 100%;
    transition: all 0.2s;
    background-color: #ccc;
}
.ncsw-arrow::before {
    left: -2px;
    transform: rotate(-45deg);
}
.ncsw-arrow::after {
    left: 3px;
    transform: rotate(45deg);
}
.ncsw-custom-dropdown.open .ncsw-arrow::before {
    left: -2px;
    transform: rotate(45deg);
}
.ncsw-custom-dropdown.open .ncsw-arrow::after {
    left: 3px;
    transform: rotate(-45deg);
}
.ncsw-dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background-color: #fff;
    z-index: 1000;
}
.ncsw-option {
    padding: 8px;
    display: flex;
    align-items: center;
}
.ncsw-option:hover {
    background-color: #f0f0f0;
}
/* 🌐 Floating Button (Mobile Only) */
.ncsw-currency-floating-btn {
    position: fixed;
    right: 0px;
    top: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: black;
    padding: 8px 0px 8px 8px;
    font-size: 14px;
    z-index: 10000;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd; /* Matches desktop */
}

/* Floating Button Contents */
.ncsw-flag-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 50%;
}
.ncsw-label {
    font-weight: 600;
    color: black;
}
.ncsw-arrow {
    font-size: 12px;
    color: #666;
}

/* 📱 Mobile Modal - Better Layout & Border Fix */
.ncsw-mobile-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: flex-end; /* Positions it at the bottom */
    justify-content: center;
    z-index: 99999;
}
.ncsw-mobile-modal.active {
    display: flex;
    animation: slideUp 0.3s ease-in-out;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.ncsw-modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px 12px 0 0; /* Rounded top corners for a mobile-friendly modal */
    max-width: 100%;
    width: 100%;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

/* 📌 Modal Header - Fixed to top */
.ncsw-modal-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    font-size: 18px;
    font-weight: bold;
    color: black;
    border-bottom: 1px solid #ddd;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ncsw-close {
    cursor: pointer;
    font-size: 20px;
    color: #888;
}
.ncsw-close:hover {
    color: black;
}

/* 📦 Currency List - Matches Selected Style */
.ncsw-modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}

/* 💱 Currency Buttons - Matches Desktop Selection */
.ncsw-currency-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ncsw-currency-btn:hover {
    background: #f5f5f5;
}

.ncsw-currency-btn.active {
    background: #e0f0ff;
    border-color: #2E5AAC;
    font-weight: 600;
    color: #2E5AAC;
}

/* Currency Flags & Labels */
.ncsw-currency-flag {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.ncsw-currency-label {
    flex-grow: 1;
    text-align: left;
    color: #000;
}

/* 🖥️ Sticky Sidebar for Desktop (Unchanged) */
.ncsw-currency-switcher {
    position: fixed;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 90px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 9999;
}

/* 🎯 Responsive Rules */
@media (max-width: 768px) {
    .ncsw-currency-floating-btn {
        display: flex !important;
    }
    .ncsw-currency-switcher {
        display: none !important;
    }
}
@media (min-width: 769px) {
    .ncsw-currency-floating-btn,
    .ncsw-mobile-modal {
        display: none !important;
    }
}
li.ncsw-menu-shortcode {
    padding: 0 !important;
}


/* Flag icon next to currency text */
.ncsw-menu-flag-icon {
    display: inline !important;
    margin: 0 4px !important;
    vertical-align: -4px !important;
    background: none !important;
    padding: 0 !important;
    width: 18px !important;
    height: 18px !important;
}
ncsw-menu-label:hover, .ncsw-menu-option:hover {
    color: #333 !important; /* override theme hover styles */
}
/* Modal overlay */
.ncsw-menu-modal {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999999;
    justify-content: flex-end;
    font-family: inherit;
}

/* Modal active state */
.ncsw-menu-modal.ncsw-menu-active {
    display: flex;
}

/* Modal content panel */
.ncsw-menu-modal-content {
    width: 300px;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #333;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
}

/* Modal header */
.ncsw-menu-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

/* Close button */
.ncsw-menu-close {
    all: unset;
    font-size: 20px;
    font-weight: normal;
    color: #666;
    cursor: pointer;
    line-height: 1;
    display: inline-block;
    background: none;
    padding: 0;
}

/* Scrollable modal body */
.ncsw-menu-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
}

/* Currency option button */
.ncsw-menu-option {
    padding: 10px 14px !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    background: #fff !important;
    cursor: pointer !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #333 !important;
    transition: background 0.2s, border-color 0.2s !important;
    justify-content: left !important;
    line-height: 1 !important;
    text-transform: none !important;
    min-height: 18px !important;
}

.ncsw-menu-option:hover {
    background: #f7f7f7 !important;
    border-color: #999 !important;
    color: #000 !important;
}

.ncsw-menu-option.ncsw-menu-active-option {
    background: #e6f0ff !important;
    border-color: #3399ff !important;
    color: #003366 !important;
}
