/* Overlay (hidden by default) */
.currency-popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.45);
    z-index: 9999;

    /* visual hide instead of display:none (so delegated listeners aren't affected by reflows) */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

/* Visible/open state */
.currency-popup.open,
.currency-popup[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Content */
.currency-popup-content {
    background: #111;            /* dark background for contrast */
    color: #fff;                 /* white text */
    padding: 18px;
    border-radius: 10px;
    width: 360px;
    max-width: 92%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    text-align: left;
}

/* Close button */
.currency-close {
    position: absolute;
    right: 12px;
    top: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* Title */
.currency-popup-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

/* List */
.currency-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    max-height: 320px;
    overflow: auto;
}

.currency-list li {
    margin-bottom: 8px;
}

.currency-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,0.03);
    transition: background .18s ease;
}

.currency-item img { border-radius: 3px; }

.currency-item:hover {
    background: rgba(255,255,255,0.07);
}

/* Prevent overlay scroll jump when popup open */
body.currency-popup-open {
    overflow: hidden;
}
