/**
 * AgenWebsite Multi-Currency Frontend Styles
 * @since 1.0.0
 * @version 1.1.0
 */

/* ============================================
   CSS Custom Properties (Z-Index Scale)
   ============================================ */
:root {
    --awmc-z-base: 0;
    --awmc-z-floating: 100;
    --awmc-z-dropdown: 200;
    --awmc-z-widget: 350;
    --awmc-z-sticky: 400;
    --awmc-z-tooltip: 500;
    --awmc-z-overlay: 600;
    --awmc-z-modal: 700;
    --awmc-z-notification: 800;
}

/* ============================================
   CSS Reset for Style Isolation
   ============================================ */
.awmc-currency-switcher-widget,
.awmc-currency-switcher,
.awmc-modal-overlay,
.awmc-checkout-notifications {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

.awmc-currency-switcher-widget *,
.awmc-currency-switcher-widget *::before,
.awmc-currency-switcher-widget *::after,
.awmc-modal-overlay *,
.awmc-modal-overlay *::before,
.awmc-modal-overlay *::after,
.awmc-checkout-notifications *,
.awmc-checkout-notifications *::before,
.awmc-checkout-notifications *::after {
    box-sizing: inherit;
}

.awmc-currency-switcher-widget button,
.awmc-currency-switcher-widget select,
.awmc-modal-overlay button,
.awmc-modal-overlay select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* ============================================
   Currency Switcher Widget
   ============================================ */
.awmc-currency-switcher-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: var(--awmc-z-widget, 350);
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}

.awmc-switcher-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.awmc-switcher-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin: 0;
}

.awmc-switcher-label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.awmc-currency-select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    min-width: 100px;
    transition: border-color 0.2s;
}

.awmc-currency-select:hover,
.awmc-currency-select:focus {
    border-color: #2271b1;
    outline: none;
}

/* Dropdown Layout */
.awmc-currency-switcher.awmc-layout-dropdown {
    display: inline-block;
}

.awmc-currency-switcher.awmc-layout-dropdown select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

/* Buttons Layout */
.awmc-currency-switcher.awmc-layout-buttons {
    display: inline-block;
}

.awmc-currency-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.awmc-currency-button {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.awmc-currency-button:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.awmc-currency-button.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

/* List Layout */
.awmc-currency-switcher.awmc-layout-list {
    display: inline-block;
}

.awmc-currency-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.awmc-currency-list li {
    margin: 5px 0;
}

.awmc-currency-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
}

.awmc-currency-link:hover {
    border-color: #2271b1;
    color: #2271b1;
    background: #f0f7ff;
}

.awmc-currency-link.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    font-weight: 600;
}

.awmc-current-indicator {
    font-weight: bold;
    margin-left: 10px;
}

/* Loading State */
.awmc-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .awmc-currency-switcher-widget {
        bottom: 10px;
        right: 10px;
        padding: 10px 15px;
    }

    .awmc-switcher-label {
        font-size: 12px;
    }

    .awmc-currency-select {
        font-size: 13px;
        min-width: 80px;
    }

    .awmc-currency-button {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Admin Product Fields */
.awmc-currency-price-group {
    background: #f9f9f9;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
}

.awmc-variation-prices {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

/* ============================================
   Modal Overlay Styles
   ============================================ */
.awmc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: var(--awmc-z-modal, 700);
    display: none;
    animation: awmc-fadeIn 0.3s ease;
}

.awmc-modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.awmc-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: awmc-slideUp 0.3s ease;
}

.awmc-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.awmc-modal-close:hover {
    color: #000;
}

.awmc-modal-header {
    padding: 30px 30px 20px;
    text-align: center;
}

.awmc-modal-title {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.awmc-modal-description {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.awmc-modal-body {
    padding: 20px 30px 30px;
}

.awmc-currency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.awmc-currency-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.awmc-currency-option:hover:not(.active):not(:disabled) {
    border-color: #2271b1;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.awmc-currency-option.active {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
    cursor: default;
}

.awmc-currency-option:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.awmc-currency-code {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.awmc-currency-symbol {
    font-size: 14px;
    opacity: 0.8;
}

.awmc-currency-current {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 10px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
}

.awmc-modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
}

.awmc-modal-dismiss {
    padding: 12px 30px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.awmc-modal-dismiss:hover {
    background: #e0e0e0;
}

/* Body state when modal is open */
body.awmc-modal-open {
    overflow: hidden;
}

/* Widget Position Variants */
.awmc-currency-switcher-widget.position-top-left {
    top: 20px;
    left: 20px;
    bottom: auto;
    right: auto;
}

.awmc-currency-switcher-widget.position-top-right {
    top: 20px;
    right: 20px;
    bottom: auto;
    left: auto;
}

.awmc-currency-switcher-widget.position-bottom-left {
    bottom: 20px;
    left: 20px;
    top: auto;
    right: auto;
}

.awmc-currency-switcher-widget.position-bottom-right {
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
}

/* Icon-only Widget Mode */
.awmc-widget-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
    transition: all 0.3s;
    border: none;
    font-size: 20px;
}

.awmc-widget-icon:hover {
    background: #135e96;
    transform: scale(1.1);
}

/* Style Variants */
.awmc-currency-button.style-flat {
    border: none;
    background: #f0f0f0;
}

.awmc-currency-button.style-flat:hover {
    background: #e0e0e0;
}

.awmc-currency-button.style-flat.active {
    background: #2271b1;
    color: #fff;
}

.awmc-currency-button.style-outlined {
    border: 2px solid #ddd;
    background: transparent;
}

.awmc-currency-button.style-outlined:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.awmc-currency-button.style-outlined.active {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.awmc-currency-button.style-filled {
    border: none;
    background: #2271b1;
    color: #fff;
}

.awmc-currency-button.style-filled:hover {
    background: #135e96;
}

.awmc-currency-button.style-filled.active {
    background: #0a4b78;
}

/* Font Size Variants */
.awmc-currency-switcher.size-small {
    font-size: 12px;
}

.awmc-currency-switcher.size-small .awmc-currency-select,
.awmc-currency-switcher.size-small .awmc-currency-button {
    font-size: 12px;
    padding: 6px 12px;
}

.awmc-currency-switcher.size-normal {
    font-size: 14px;
}

.awmc-currency-switcher.size-large {
    font-size: 16px;
}

.awmc-currency-switcher.size-large .awmc-currency-select,
.awmc-currency-switcher.size-large .awmc-currency-button {
    font-size: 16px;
    padding: 10px 20px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes awmc-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes awmc-slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes awmc-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes awmc-slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes awmc-slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Mobile Modal Adjustments */
@media (max-width: 600px) {
    .awmc-modal-dialog {
        padding: 0;
        align-items: flex-end;
    }

    .awmc-modal-content {
        border-radius: 12px 12px 0 0;
        max-width: 100%;
        animation: awmc-slideUpMobile 0.3s ease;
    }

    .awmc-modal-header {
        padding: 20px 20px 15px;
    }

    .awmc-modal-title {
        font-size: 24px;
    }

    .awmc-modal-body {
        padding: 15px 20px 20px;
    }

    .awmc-currency-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .awmc-currency-option {
        padding: 12px 8px;
    }

    .awmc-currency-code {
        font-size: 16px;
    }
}

@keyframes awmc-slideUpMobile {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================
   Modal Loading States
   ============================================ */
.awmc-currency-option.awmc-loading {
    position: relative;
    opacity: 0.8;
    pointer-events: none;
}

.awmc-currency-option.awmc-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Spinner for loading state */
.awmc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-left-color: #2271b1;
    border-radius: 50%;
    animation: awmc-spin 0.8s linear infinite;
    vertical-align: middle;
}

.awmc-currency-option.active .awmc-spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-left-color: #fff;
}

/* ============================================
   Checkout Currency Notification Styles
   ============================================ */
.awmc-checkout-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--awmc-z-notification, 800);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.awmc-checkout-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.awmc-checkout-notification.awmc-notification-visible {
    transform: translateX(0);
    opacity: 1;
}

.awmc-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.awmc-notification-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.awmc-notification-message {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #333;
}

/* Notification Types */
.awmc-notification-info {
    border-left: 4px solid #2271b1;
}

.awmc-notification-info .awmc-notification-icon {
    color: #2271b1;
}

.awmc-notification-success {
    border-left: 4px solid #00a32a;
}

.awmc-notification-success .awmc-notification-icon {
    color: #00a32a;
}

.awmc-notification-error {
    border-left: 4px solid #d63638;
}

.awmc-notification-error .awmc-notification-icon {
    color: #d63638;
}

.awmc-notification-warning {
    border-left: 4px solid #dba617;
}

.awmc-notification-warning .awmc-notification-icon {
    color: #dba617;
}

/* Notification Loading Spinner */
.awmc-notification-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: awmc-spin 0.8s linear infinite;
    flex-shrink: 0;
    margin-left: 12px;
}

/* Mobile Responsiveness for Notifications */
@media (max-width: 480px) {
    .awmc-checkout-notifications {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .awmc-checkout-notification {
        transform: translateY(120%);
    }

    .awmc-checkout-notification.awmc-notification-visible {
        transform: translateY(0);
    }

    .awmc-notification-message {
        font-size: 13px;
    }
}

/* RTL Support */
[dir="rtl"] .awmc-checkout-notifications {
    right: auto;
    left: 20px;
}

[dir="rtl"] .awmc-checkout-notification {
    transform: translateX(-120%);
    border-left: none;
    border-right: 4px solid #2271b1;
}

[dir="rtl"] .awmc-checkout-notification.awmc-notification-visible {
    transform: translateX(0);
}

[dir="rtl"] .awmc-notification-info {
    border-right-color: #2271b1;
}

[dir="rtl"] .awmc-notification-success {
    border-right-color: #00a32a;
}

[dir="rtl"] .awmc-notification-error {
    border-right-color: #d63638;
}

[dir="rtl"] .awmc-notification-warning {
    border-right-color: #dba617;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .awmc-checkout-notification {
        transition: opacity 0.2s ease-out;
        transform: none;
    }

    .awmc-checkout-notification.awmc-notification-visible {
        transform: none;
    }

    .awmc-notification-spinner,
    .awmc-spinner {
        animation: none;
        border-color: #2271b1;
    }
}

/* ============================================
   Geolocation Auto-Detect Notification
   ============================================ */
.awmc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: var(--awmc-z-notification, 800);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    max-width: 400px;
}

.awmc-notification.awmc-notification-visible {
    transform: translateX(0);
    opacity: 1;
}

.awmc-notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.awmc-notification-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #333;
}

.awmc-notification-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 0 0 10px;
    transition: color 0.2s;
}

.awmc-notification-close:hover {
    color: #333;
}

.awmc-notification.awmc-notification-success {
    border-left: 4px solid #00a32a;
}

.awmc-notification.awmc-notification-info {
    border-left: 4px solid #2271b1;
}

/* Mobile Responsiveness for Geolocation Notification */
@media (max-width: 480px) {
    .awmc-notification {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(120%);
    }

    .awmc-notification.awmc-notification-visible {
        transform: translateY(0);
    }

    .awmc-notification-text {
        font-size: 13px;
    }
}

/* RTL Support for Geolocation Notification */
[dir="rtl"] .awmc-notification {
    right: auto;
    left: 20px;
    transform: translateX(-120%);
    border-left: none;
    border-right: 4px solid #00a32a;
}

[dir="rtl"] .awmc-notification.awmc-notification-visible {
    transform: translateX(0);
}

[dir="rtl"] .awmc-notification.awmc-notification-info {
    border-right-color: #2271b1;
}

@media (max-width: 480px) {
    [dir="rtl"] .awmc-notification {
        right: 10px;
        left: 10px;
        transform: translateY(120%);
        border-right: none;
        border-bottom: 4px solid #00a32a;
    }

    [dir="rtl"] .awmc-notification.awmc-notification-visible {
        transform: translateY(0);
    }
}

/* ============================================
   Country Flag Icons
   ============================================ */
.awmc-currency-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.awmc-flag {
    display: inline-block;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.awmc-flag-emoji {
    font-size: 1.2em;
    line-height: 1;
}

/* Flag sizes */
.awmc-flag.awmc-flag-small {
    width: 16px;
    height: 12px;
}

.awmc-flag.awmc-flag-medium {
    width: 24px;
    height: 18px;
}

.awmc-flag.awmc-flag-large {
    width: 32px;
    height: 24px;
}

/* Flag in dropdown options */
.awmc-currency-select option .awmc-flag-emoji {
    margin-right: 4px;
}

/* Flag in modal grid */
.awmc-currency-option .awmc-flag,
.awmc-currency-option .awmc-flag-emoji {
    margin-bottom: 4px;
}

/* Flag in button layout */
.awmc-currency-button .awmc-flag,
.awmc-currency-button .awmc-flag-emoji {
    margin-right: 4px;
}

/* Flag in list layout */
.awmc-currency-link .awmc-flag,
.awmc-currency-link .awmc-flag-emoji {
    margin-right: 6px;
}

/* ============================================
   Simple (flag + code) Dropdown Switcher
   ============================================ */
/* Self-contained: every property is set explicitly and scoped with the
   .awmc-currency-switcher.awmc-shortcode-simple prefix so active-theme styles
   for button / ul / li / a / img cannot leak in or override the switcher. */
.awmc-currency-switcher.awmc-shortcode-simple {
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
}

.awmc-currency-switcher.awmc-shortcode-simple *,
.awmc-currency-switcher.awmc-shortcode-simple *::before,
.awmc-currency-switcher.awmc-shortcode-simple *::after {
    box-sizing: border-box;
}

/* Toggle button — neutralize theme <button> styling */
.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-toggle {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e5e9;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    color: #1f2937;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    text-shadow: none;
    cursor: pointer;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-toggle:hover {
    background: #fff;
    border-color: #cdd2d9;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-toggle:focus {
    outline: none;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-toggle:focus-visible {
    outline: 2px solid #015C80;
    outline-offset: 2px;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-current {
    color: inherit;
    font-weight: 600;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-arrow {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    font-size: 18px;
    line-height: 1;
    opacity: .55;
    transition: transform .15s ease;
}

.awmc-currency-switcher.awmc-shortcode-simple.awmc-open .awmc-simple-arrow {
    transform: rotate(180deg);
}

/* Dropdown panel — neutralize theme <ul>/<li> styling */
.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-dropdown {
    display: none;
    position: absolute;
    z-index: 9999;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #e2e5e9;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.awmc-currency-switcher.awmc-shortcode-simple.awmc-open .awmc-simple-dropdown {
    display: block;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-dropdown li {
    margin: 0;
    padding: 0;
    list-style: none;
    background: none;
    text-indent: 0;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-dropdown li::before,
.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-dropdown li::after {
    content: none;
    display: none;
}

/* Dropdown item link — neutralize theme <a> styling */
.awmc-currency-switcher.awmc-shortcode-simple .awmc-currency-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    box-shadow: none;
    color: #1f2937;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-currency-link:hover,
.awmc-currency-switcher.awmc-shortcode-simple .awmc-currency-link:focus {
    background: #f4f6f8;
    color: #1f2937;
    text-decoration: none;
    box-shadow: none;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-currency-link.active {
    font-weight: 600;
}

/* Flags — guard against theme img { max-width / height } rules */
.awmc-currency-switcher.awmc-shortcode-simple .awmc-flag {
    max-width: none;
    margin: 0;
    vertical-align: middle;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-code {
    color: inherit;
    font-weight: 500;
}

.awmc-currency-switcher.awmc-shortcode-simple .awmc-simple-check {
    margin-left: auto;
    padding-left: 12px;
    color: #1a8f3c;
    font-weight: 700;
}

/* ============================================
   Enhanced Mobile Responsiveness
   ============================================ */

/* Mobile custom properties */
@media (max-width: 480px) {
    :root {
        --awmc-tap-target-min: 44px;
        --awmc-mobile-spacing: 16px;
        --awmc-mobile-font-size: 16px;
    }
}

/* Bottom Sheet Modal for Mobile */
@media (max-width: 480px) {
    .awmc-modal-overlay {
        align-items: flex-end;
    }

    .awmc-modal-content {
        max-width: 100%;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
        animation: awmc-slideUpMobile 0.3s cubic-bezier(0.2, 0.8, 0.32, 1);
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Bottom sheet handle indicator */
    .awmc-modal-content::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 12px auto 8px;
    }

    .awmc-modal-header {
        padding: 16px 20px;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 1;
        border-bottom: 1px solid #eee;
    }

    .awmc-modal-close {
        top: 16px;
        right: 16px;
        width: var(--awmc-tap-target-min, 44px);
        height: var(--awmc-tap-target-min, 44px);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .awmc-modal-title {
        font-size: 20px;
        padding-right: 40px;
    }

    .awmc-modal-body {
        padding: 16px 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Larger touch targets for currency options */
    .awmc-currency-option {
        min-height: var(--awmc-tap-target-min, 44px);
        padding: 16px 12px;
        touch-action: manipulation;
    }

    .awmc-currency-option:active {
        transform: scale(0.98);
        background: #f0f7ff;
    }

    .awmc-currency-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .awmc-modal-footer {
        padding: 16px 20px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        position: sticky;
        bottom: 0;
        background: #fff;
        border-top: 1px solid #eee;
    }

    .awmc-modal-dismiss {
        width: 100%;
        min-height: var(--awmc-tap-target-min, 44px);
        font-size: 16px;
    }
}

/* Mobile widget enhancements */
@media (max-width: 480px) {
    .awmc-currency-switcher-widget {
        bottom: calc(16px + env(safe-area-inset-bottom));
        right: 16px;
        left: 16px;
        width: auto;
        padding: 12px 16px;
    }

    .awmc-currency-switcher-widget.position-top-left,
    .awmc-currency-switcher-widget.position-top-right {
        top: calc(16px + env(safe-area-inset-top));
        bottom: auto;
        left: 16px;
        right: 16px;
    }

    .awmc-currency-select {
        min-height: var(--awmc-tap-target-min, 44px);
        font-size: 16px; /* Prevents iOS zoom */
        padding: 10px 12px;
    }

    .awmc-switcher-container {
        flex-direction: column;
        gap: 8px;
    }

    .awmc-switcher-label {
        font-size: 12px;
    }
}

/* Touch feedback for interactive elements */
@media (pointer: coarse) {
    .awmc-currency-button,
    .awmc-currency-link,
    .awmc-currency-option,
    .awmc-modal-dismiss {
        -webkit-tap-highlight-color: rgba(34, 113, 177, 0.1);
        transition: transform 0.1s ease, background 0.2s ease;
    }

    .awmc-currency-button:active,
    .awmc-currency-link:active {
        transform: scale(0.97);
    }

    /* Larger touch targets */
    .awmc-currency-button {
        min-height: 44px;
        min-width: 60px;
    }

    .awmc-currency-link {
        min-height: 44px;
        padding: 12px 16px;
    }
}

/* Icon-only widget for mobile */
@media (max-width: 480px) {
    .awmc-widget-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
        box-shadow: 0 4px 16px rgba(34, 113, 177, 0.3);
    }

    .awmc-widget-icon:active {
        transform: scale(0.95);
    }
}

/* Swipe gesture support for bottom sheet - visual cue */
@media (max-width: 480px) {
    .awmc-modal-content {
        position: relative;
    }

    .awmc-modal-content.awmc-swiping {
        transition: none;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 800px) and (orientation: landscape) {
    .awmc-modal-content {
        max-height: 90vh;
    }

    .awmc-modal-body {
        max-height: 50vh;
    }

    .awmc-currency-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    @media (max-width: 480px) {
        .awmc-currency-switcher-widget {
            bottom: max(16px, env(safe-area-inset-bottom) + 8px);
            left: max(16px, env(safe-area-inset-left) + 8px);
            right: max(16px, env(safe-area-inset-right) + 8px);
        }

        .awmc-modal-footer {
            padding-bottom: max(16px, env(safe-area-inset-bottom) + 12px);
        }
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .awmc-currency-option {
        border-width: 3px;
    }

    .awmc-currency-option.active {
        outline: 3px solid #000;
        outline-offset: 2px;
    }

    .awmc-modal-content {
        border: 2px solid #000;
    }
}

/* Dark mode support (if system prefers) */
@media (prefers-color-scheme: dark) {
    .awmc-modal-content::before {
        background: #555;
    }
}
