/* ==========================================================================
   Life Nootropics Luxury Currency Switcher Styles
   ========================================================================== */

.ln-currency-dropdown {
    position: relative;
    display: inline-block;
    user-select: none;
    font-family: inherit;
    vertical-align: middle;
}

/* Trigger Button */
.ln-currency-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    color: #111827;
    transition: color 0.2s ease, opacity 0.2s ease;
    border-radius: 4px;
    outline: none !important;
    line-height: 1.4;
}

.ln-currency-toggle:hover {
    color: #c89a3f;
}

.ln-currency-toggle:focus {
    outline: none;
}

.ln-currency-toggle .ln-flag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

.ln-currency-toggle .ln-flag-icon img,
.ln-currency-option .ln-flag-icon img {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    display: block;
}

.ln-currency-toggle .ln-currency-name {
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.ln-currency-toggle .ln-chevron {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    stroke: currentColor;
    margin-left: 2px;
    flex-shrink: 0;
}

.ln-currency-dropdown.is-open .ln-currency-toggle .ln-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu Window */
.ln-currency-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 220px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.16) !important;
    border: 1px solid #e5e7eb !important;
    padding: 6px !important;
    z-index: 10005 !important;
    transform-origin: top right;
    animation: lnCurFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    flex-direction: column !important;
    gap: 3px !important;
    box-sizing: border-box !important;
}

.ln-currency-dropdown.is-open .ln-currency-menu {
    display: flex !important;
}

@keyframes lnCurFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Caret pointer matching theme signature style */
.ln-currency-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 22px;
    width: 11px;
    height: 11px;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    transform: rotate(45deg);
    z-index: 10;
}

/* Dropdown Option Items */
.ln-currency-option {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 12px !important;
    padding: 9px 12px !important;
    border-radius: 7px !important;
    text-decoration: none !important;
    color: #1f2937 !important;
    transition: all 0.16s ease !important;
    cursor: pointer !important;
}

.ln-currency-option:hover {
    background: #f7f8fa;
    color: #111827 !important;
}

.ln-currency-option.active {
    background: #faf7f2;
    color: #c89a3f !important;
}

.ln-currency-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    line-height: 1.25;
}

.ln-cur-code {
    font-size: 13.5px;
    font-weight: 600;
    color: inherit;
}

.ln-cur-full {
    font-size: 11px;
    color: #6b7280;
    font-weight: 400;
}

.ln-currency-option.active .ln-cur-full {
    color: #a87e2b;
}

.ln-cur-check {
    font-size: 13px;
    color: #c89a3f;
    font-weight: 700;
    margin-left: 6px;
}

/* Context: Footer (opens upward) */
.ln-currency-dropdown[data-context="footer"] .ln-currency-menu {
    top: auto;
    bottom: calc(100% + 10px);
    transform-origin: bottom right;
}

.ln-currency-dropdown[data-context="footer"] .ln-currency-menu::before {
    top: auto;
    bottom: -6px;
    border-left: none;
    border-top: none;
    border-right: 1px solid #ebebeb;
    border-bottom: 1px solid #ebebeb;
}

/* Context: Mobile Menu Drawer */
.ln-currency-dropdown[data-context="mobile"] {
    width: 100%;
}

.ln-currency-dropdown[data-context="mobile"] .ln-currency-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.ln-currency-dropdown[data-context="mobile"] .ln-currency-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: 0;
}

.ln-currency-dropdown[data-context="mobile"] .ln-currency-menu::before {
    display: none;
}
