/**
 * LNC Currency Switcher Styles
 * Matches language switcher styling exactly
 */

.lnc-currency-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 100;
}

.lnc-currency-switcher__trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    transition: opacity 0.15s;
}

.lnc-currency-switcher__trigger:hover {
    opacity: 0.6;
}

.lnc-currency-switcher__current {
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 500;
}

.lnc-currency-switcher__symbol {
    opacity: 0.7;
}

.lnc-currency-switcher__chevron {
    width: 10px;
    height: 10px;
    opacity: 0.6;
    transition: transform 0.2s;
}

.lnc-currency-switcher__chevron.is-open {
    transform: rotate(180deg);
}

/* Dropdown - matches language switcher bubble exactly */
.lnc-currency-switcher__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    padding: 0.5rem;
}

/* Arrow - centered */
.lnc-currency-switcher__dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.04);
    z-index: 1;
}

/* Dropdown transitions */
.lnc-currency-switcher__dropdown--enter {
    transition: opacity 0.15s, transform 0.15s;
}
.lnc-currency-switcher__dropdown--enter-start {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
}
.lnc-currency-switcher__dropdown--enter-end {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.lnc-currency-switcher__dropdown--leave {
    transition: opacity 0.1s, transform 0.1s;
}
.lnc-currency-switcher__dropdown--leave-start {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.lnc-currency-switcher__dropdown--leave-end {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
}

/* Options - matches language switcher */
.lnc-currency-switcher__option {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9375rem;
    text-align: left;
    color: #374151;
    border-radius: 8px;
    transition: background 0.1s ease;
}

.lnc-currency-switcher__option:hover {
    background: #f3f4f6;
    color: #111;
}

.lnc-currency-switcher__option.is-active {
    font-weight: 500;
    color: #111;
}

.lnc-currency-switcher__option-code {
    font-weight: 500;
}

.lnc-currency-switcher__option-symbol {
    opacity: 0.6;
    font-size: 0.875rem;
}

.lnc-currency-switcher__option-default {
    font-size: 0.625rem;
    color: #6b7280;
    margin-left: auto;
}

.lnc-currency-switcher__check {
    margin-left: auto;
    color: #10b981;
    flex-shrink: 0;
}

/* Alpine cloak */
[x-cloak] {
    display: none !important;
}

/* Mobile: hide text, show only code */
@media (max-width: 767px) {
    .lnc-currency-switcher__symbol {
        display: none;
    }
}
