/**
 * DigiTechPak Currency Switcher — Toggle Widget Styles
 *
 * Lightweight CSS for the floating PKR/USD currency toggle.
 * Uses the existing DigiTechPak Ledger design system tokens.
 *
 * @package DigiTechPak_Currency_Switcher
 * @version 1.0.0
 */

/* ── Toggle Container ── */
.dtp-currency-switcher {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 99999;
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: box-shadow 0.2s ease;
}

.dtp-currency-switcher:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ── Toggle Buttons ── */
.dtp-currency-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.dtp-currency-btn:hover {
    color: #0f172a;
    background: #f8fafc;
}

.dtp-currency-btn:focus-visible {
    outline: 2px solid #0f5132;
    outline-offset: 1px;
}

.dtp-currency-btn.dtp-currency-active {
    background: #0f5132;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 81, 50, 0.3);
}

.dtp-currency-btn.dtp-currency-active:hover {
    background: #0b3d26;
    color: #ffffff;
}

/* ── Currency Symbol ── */
.dtp-currency-symbol {
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

/* ── Checkout USD Note ── */
.dtp-checkout-currency-note {
    margin: 16px 0 8px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #1e40af;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.dtp-checkout-currency-note .dtp-note-icon {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1.3;
}

.dtp-checkout-currency-note strong {
    font-weight: 700;
}

/* ── Hidden State ── */
.dtp-currency-switcher--hidden {
    display: none !important;
}

/* ── Responsive ── */

/* WordPress admin bar offset */
.admin-bar .dtp-currency-switcher {
    top: 132px;
}

/* Tablet */
@media (max-width: 782px) {
    .dtp-currency-switcher {
        top: auto;
        bottom: 20px;
        right: 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .admin-bar .dtp-currency-switcher {
        top: auto;
        bottom: 20px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .dtp-currency-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .dtp-currency-symbol {
        font-size: 12px;
    }

    .dtp-currency-switcher {
        right: 12px;
        bottom: 16px;
    }
}
