/**
 * 2026 Ecom Experts
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to ecomyseo@gmail.com so we can send you a copy immediately.
 *
 * @author    Ecom Experts <ecomyseo@gmail.com>
 * @copyright 2026 Ecom Experts
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/* ==========================================================================
   SHIPPING CALCULATOR BASE STYLES
   ========================================================================== */
.ecom-shipping-calculator {
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ecom-calc-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.ecom-calc-input {
    width: 100px;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
}

.ecom-calc-btn {
    height: 45px;
    padding: 0 25px;
    border: none;
    border-radius: 8px;
    background-color: #24b9d7;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ecom-calc-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.ecom-calc-results {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.04);
    font-size: 14px;
    border-left: 4px solid #24b9d7;
}

/* ==========================================================================
   MODAL / POPUP STYLES (POPUP-CRO)
   ========================================================================== */
.ecom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.ecom-modal-container {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px;
    padding: 35px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.ecom-modal-content {
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 5px;
}

.ecom-modal-content::-webkit-scrollbar {
    width: 4px;
}

.ecom-modal-content::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}

.ecom-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.ecom-modal-title {
    margin: 0 0 10px 0;
    font-weight: 800;
}

.ecom-modal-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Trigger Button */
.ecom-modal-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.2s;
}

/* Animations */
@keyframes ecomSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ecom-modal-container {
    animation: ecomSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mobile Smartphone Optimization (< 576px) */
@media (max-width: 575.98px) {
    .ecom-modal-overlay {
        padding: 0;
        align-items: flex-end;
        /* Bottom sheet */
    }

    .ecom-modal-container {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 25px 20px 40px 20px;
        margin-bottom: 0;
        max-height: 85vh;
        animation: ecomSlideUpMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ecom-modal-container::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 5px;
        background: #e0e0e0;
        border-radius: 10px;
    }

    @keyframes ecomSlideUpMobile {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .ecom-modal-close {
        top: 10px;
        right: 15px;
        background: #f5f5f5;
        width: 35px;
        height: 35px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
    }

    .ecom-calc-input-group {
        flex-direction: row;
        /* Keep CP input and button side by side if small */
        flex-wrap: wrap;
    }

    .ecom-calc-input {
        width: 80px !important;
    }

    .ecom-calc-btn {
        flex: 1;
    }
}

/* ==========================================================================
   DESIGN PRESETS
   ========================================================================== */

/* 1. MODERN GLASS */
.ecom-design-1 {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.ecom-design-1.ecom-modal-container {
    background: rgba(255, 255, 255, 0.9);
}

.ecom-design-1 .ecom-calc-btn,
.ecom-design-1.ecom-modal-trigger {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 50px;
    color: #fff;
    border: none;
}

/* 2. ELEGANT DARK */
.ecom-design-2 {
    background: #121212;
    color: #ffffff;
    border: 1px solid #333;
}

.ecom-design-2 .ecom-calc-input {
    background: #1e1e1e;
    border-color: #444;
    color: #fff;
}

.ecom-design-2 .ecom-calc-btn,
.ecom-design-2.ecom-modal-trigger {
    background: #fff !important;
    color: #000 !important;
    border: none;
}

.ecom-design-2 .ecom-modal-desc {
    color: #bbb;
}

.ecom-design-2 .ecom-calc-results {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #fff;
}

/* 3. CLEAN MINIMAL */
.ecom-design-3 {
    background: #fff;
    border: 2px solid #000;
}

.ecom-design-3 .ecom-calc-input {
    border: 2px solid #000;
    border-radius: 0;
}

.ecom-design-3 .ecom-calc-btn,
.ecom-design-3.ecom-modal-trigger {
    border-radius: 0 !important;
    background: #000 !important;
    color: #fff !important;
}

/* 4. CONTRAST BLUE */
.ecom-design-4 {
    background: #f8fbff;
    border-left: 6px solid #0066ff;
}

.ecom-design-4 .ecom-calc-btn,
.ecom-design-4.ecom-modal-trigger {
    background: #0066ff !important;
    box-shadow: 0 5px 15px rgba(0, 102, 255, 0.3);
    color: #fff;
}

/* ==========================================================================
   CARDS & UTILS
   ========================================================================== */
.cart-shipping-calculator {
    width: 100%;
    margin-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.d-none {
    display: none !important;
}

/* ==========================================================================
   SELECTABLE SHIPPING ROWS
   ========================================================================== */
.ecom-shipping-row {
    background: #fff;
    margin-bottom: 5px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ecom-shipping-row:hover {
    background: rgba(0, 102, 255, 0.03);
    border-color: rgba(0, 102, 255, 0.2) !important;
    transform: translateX(3px);
}

.ecom-shipping-row.selected {
    background: rgba(0, 123, 255, 0.08) !important;
    border-color: #007bff !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.ecom-select-btn {
    border-radius: 20px !important;
    padding: 2px 12px !important;
    font-weight: 600;
}

.ecom-carrier-info .font-weight-bold {
    color: #333;
}

.ecom-design-2 .ecom-shipping-row {
    background: #1e1e1e;
    border-color: #333 !important;
}

.ecom-design-2 .ecom-shipping-row:hover {
    background: #252525;
}

.ecom-design-2 .ecom-carrier-info .font-weight-bold {
    color: #fff;
}

/* ==========================================================================
   ACCORDION (Current Cart Cost collapsed)
   ========================================================================== */
.alert[style*="cursor: pointer"]:hover {
    filter: brightness(0.95);
}

.ecom-accordion-content {
    transition: all 0.3s ease;
}

.ecom-header-price {
    font-size: 1rem;
    color: #fff !important;
    background: #1c9e42;
    /* More intense Green */
    padding: 2px 10px;
    border-radius: 6px;
    margin-left: 8px;
    font-weight: 900 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

.alert-info .ecom-header-price {
    background: #0066cc;
}

.alert-success .ecom-header-price {
    background: #107c10;
    /* Deeper Green */
}

.ecom-section-title {
    opacity: 0.9;
    font-weight: 500;
}

.ecom-shipping-row strong {
    font-weight: 800 !important;
    color: inherit;
}

/* CARRIER LIST HIGHLIGHTS (Te falta X / Envío GRATIS) */
.text-warning.font-weight-bold {
    color: #856404 !important;
    background: #fff3cd;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #ffeeba;
    display: inline-flex !important;
    align-items: center;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.text-success.font-weight-bold {
    color: #155724 !important;
    background: #d4edda;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    display: inline-flex !important;
    align-items: center;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}