/**
 * Frontend stylesheet for EUR/BGN Dual Currency plugin
 *
 * @package EUR_BGN_Dual_Currency
 * @since   3.0.1
 */

/* =============================================================================
   Converted Price Display
   ============================================================================= */

.ebdc-converted {
    font-size: 0.9em;
    color: #666666;
    font-weight: normal;
    transition: opacity 0.2s ease;
    opacity: 1 !important;
    display: inline !important;
}

/* Same-style converted prices (1:1 styling) - no custom styles */
.ebdc-same-style-converted {
    /* Completely remove all custom styling for true 1:1 display */
}

bdi.ebdc-same-style-converted,
span.ebdc-same-style-converted {
    /* No custom styles - inherit everything naturally from parent */
}

.ebdc-converted:hover {
    opacity: 0.8;
}

.ebdc-converted.ebdc-highlight {
    color: #2271b1 !important;
    font-weight: 600;
    animation: highlight-pulse 1s ease-in-out;
}

.ebdc-converted.ebdc-full-replace {
    color: inherit !important;
    font-size: 1em;
    font-weight: inherit;
}

.ebdc-converted.ebdc-animated {
    animation: fadeInPrice 0.3s ease-in;
}

@keyframes highlight-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes fadeInPrice {
    from { opacity: 0; transform: translateY(-2px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Prevent display none issues */
.price .ebdc-converted,
.woocommerce-variation-price .ebdc-converted {
    display: inline !important;
    visibility: visible !important;
}
}

/* =============================================================================
   Cart & Checkout Specific Styles
   ============================================================================= */

.woocommerce-cart .amount bdi,
.woocommerce-checkout .amount bdi {
    white-space: nowrap;
}

.woocommerce-cart .ebdc-converted,
.woocommerce-checkout .ebdc-converted {
    display: block;
    margin-top: 2px;
    font-size: 0.85em;
    line-height: 1.2;
}

.woocommerce-cart-form .ebdc-converted {
    font-size: 0.8em;
    margin-top: 3px;
}

/* Cart totals styling */
.cart-subtotal .ebdc-converted,
.shipping .ebdc-converted,
.order-total .ebdc-converted {
    font-weight: 500;
    margin-top: 3px;
}

/* =============================================================================
   Product Page Styles
   ============================================================================= */

.single-product .price .ebdc-converted {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

.single-product .price .ebdc-converted br {
    display: none;
}

/* Variable product pricing */
.single-product .woocommerce-variation-price .ebdc-converted {
    font-size: 0.85em;
    margin-left: 10px;
}

/* =============================================================================
   Shop & Archive Pages
   ============================================================================= */

.woocommerce ul.products li.product .price .ebdc-converted {
    display: block;
    margin-top: 2px;
    font-size: 0.8em;
    text-align: center;
}

.woocommerce ul.products li.product .price .ebdc-converted br {
    display: none;
}

/* =============================================================================
   Rate Messages
   ============================================================================= */

.ebdc-rate-message {
    font-size: 0.85em;
    color: #666;
    text-align: center;
    margin: 10px 0;
    padding: 8px 15px;
    background: #f8f8f8;
    border-radius: 4px;
    border-left: 3px solid #ddd;
    transition: all 0.3s ease;
}

.ebdc-rate-message:hover {
    background: #f0f0f0;
    border-left-color: #2271b1;
}

.ebdc-product-rate {
    margin: 15px 0;
    padding: 12px 15px;
    background: #e7f3ff;
    border-left: 3px solid #2271b1;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ebdc-product-rate::before {
    content: "ℹ️";
    margin-right: 8px;
    font-size: 1.1em;
}

/* =============================================================================
   Checkout Message
   ============================================================================= */

.ebdc-checkout-message {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #e7f3ff;
    border: 1px solid #72aee6;
    border-radius: 4px;
    color: #1d2327;
    line-height: 1.5;
}

.ebdc-checkout-message p {
    margin: 0;
}

.ebdc-checkout-message a {
    color: #2271b1;
    text-decoration: none;
}

.ebdc-checkout-message a:hover {
    text-decoration: underline;
}

/* =============================================================================
   Email Styles (Inline CSS Fallbacks)
   ============================================================================= */

.ebdc-converted-email {
    font-size: 14px !important;
    color: #666666 !important;
    font-weight: normal !important;
    display: block !important;
    margin-top: 5px !important;
}

/* =============================================================================
   Widget Areas
   ============================================================================= */

.widget .ebdc-converted {
    font-size: 0.8em;
    display: block;
    margin-top: 3px;
}

.widget_price_filter .ebdc-converted {
    display: inline;
    margin-left: 5px;
}

/* =============================================================================
   Special Product Types
   ============================================================================= */

/* Grouped products */
.grouped_form .ebdc-converted {
    font-size: 0.8em;
    margin-left: 8px;
}

/* External products */
.product-type-external .ebdc-converted {
    margin-top: 5px;
}

/* Sale badges area */
.onsale + .images .ebdc-converted {
    position: relative;
    z-index: 1;
}

/* =============================================================================
   Mini Cart Widget
   ============================================================================= */

.widget_shopping_cart .ebdc-converted,
.woocommerce-mini-cart .ebdc-converted {
    font-size: 0.75em;
    display: block;
    margin-top: 2px;
    line-height: 1.3;
}

.woocommerce-mini-cart-item .ebdc-converted {
    margin-top: 3px;
    color: #777;
}

/* =============================================================================
   Loading States
   ============================================================================= */

.ebdc-converted.loading {
    opacity: 0.5;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* =============================================================================
   Dark Mode Support
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    .ebdc-rate-message {
        background: #2a2a2a;
        color: #e0e0e0;
        border-left-color: #555;
    }

    .ebdc-rate-message:hover {
        background: #333;
        border-left-color: #4a9eff;
    }

    .ebdc-product-rate {
        background: #1a2332;
        border-left-color: #4a9eff;
        color: #e0e0e0;
    }

    .ebdc-checkout-message {
        background: #1a2332;
        border-color: #4a9eff;
        color: #e0e0e0;
    }
}

/* =============================================================================
   High Contrast Mode
   ============================================================================= */

@media (prefers-contrast: high) {
    .ebdc-converted {
        color: #000 !important;
        font-weight: 600;
    }

    .ebdc-rate-message {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }

    .ebdc-product-rate {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
}

/* =============================================================================
   Print Styles
   ============================================================================= */

@media print {
    .ebdc-rate-message {
        background: none !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }

    .ebdc-converted {
        color: #000 !important;
    }

    .ebdc-product-rate {
        background: none !important;
        border: 1px solid #000 !important;
        color: #000 !important;
    }
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

@media screen and (max-width: 768px) {
    .woocommerce-cart .ebdc-converted,
    .woocommerce-checkout .ebdc-converted {
        font-size: 0.8em;
        margin-top: 5px;
    }

    .ebdc-rate-message {
        font-size: 0.8em;
        padding: 6px 12px;
        margin: 8px 0;
    }

    .ebdc-product-rate {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    .single-product .price .ebdc-converted {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }

    .woocommerce ul.products li.product .price .ebdc-converted {
        font-size: 0.75em;
        margin-top: 3px;
    }
}

@media screen and (max-width: 480px) {
    .ebdc-converted {
        font-size: 0.85em;
    }

    .ebdc-rate-message {
        font-size: 0.75em;
        padding: 5px 10px;
        text-align: left;
    }

    .ebdc-checkout-message {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .widget .ebdc-converted {
        font-size: 0.75em;
    }
}

/* =============================================================================
   Accessibility Enhancements
   ============================================================================= */

.ebdc-converted:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
}

/* Screen reader support */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ebdc-converted,
    .ebdc-rate-message,
    .ebdc-product-rate,
    .ebdc-checkout-message {
        transition: none !important;
        animation: none !important;
    }
}