/* ═══════════════════════════════════════════
   Calculadora de Frete — Integrada na Sidebar
   ═══════════════════════════════════════════ */

/* ── Esconde a row de shipping nativa do WC Blocks ── */
.ec-shipping-active .wc-block-components-totals-shipping {
    display: none !important;
}

/* ── Container ── */
.ec-shipping-calc {
    padding: 16px 0;
    border-bottom: 1px solid #e0e0e0;
}

/* ── Titulo ── */
.ec-calc__title {
    font-size: 13px;
    font-weight: 600;
    color: #1e1e1e;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

/* ── Form ── */
.ec-calc__form {
    margin-bottom: 4px;
}

.ec-calc__input-row {
    display: flex;
    gap: 8px;
}

.ec-calc__input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 500;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 1px;
    color: #333;
    background: #fff;
}

.ec-calc__input:focus {
    border-color: #C0AB8E;
    box-shadow: 0 0 0 2px rgba(192, 171, 142, 0.15);
}

.ec-calc__input::placeholder {
    color: #bbb;
    letter-spacing: 2px;
}

.ec-calc__btn {
    padding: 10px 20px;
    background: #1e1e1e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}

.ec-calc__btn:hover {
    background: #333;
}

.ec-calc__btn:active {
    transform: scale(0.98);
}

.ec-calc__btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.ec-calc__cep-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: #888;
    text-decoration: underline;
    transition: color 0.2s;
}

.ec-calc__cep-link:hover {
    color: #C0AB8E;
}

/* ── Spinner ── */
.ec-calc__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ec-spin 0.6s linear infinite;
}

@keyframes ec-spin {
    to { transform: rotate(360deg); }
}

/* ── Erro ── */
.ec-calc__error {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff8e1;
    border: 1px solid #f0ad4e;
    border-radius: 6px;
    font-size: 12px;
    color: #856404;
    line-height: 1.4;
}

/* ── Resultados / Métodos de envio ── */
.ec-calc__results {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ec-calc__rate {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px solid #eee;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin: 0;
}

.ec-calc__rate:hover {
    border-color: #d0c4b0;
    background: rgba(192, 171, 142, 0.04);
}

.ec-calc__rate--sel {
    border-color: #C0AB8E;
    background: rgba(192, 171, 142, 0.07);
}

.ec-calc__rate input[type="radio"] {
    accent-color: #C0AB8E;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin: 0;
}

.ec-calc__rate-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.ec-calc__rate-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.ec-calc__rate-time {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}

.ec-calc__rate-price {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
}

.ec-calc__rate-free {
    color: #28a745;
}

/* ── Responsivo ── */
@media (max-width: 700px) {
    .ec-shipping-calc {
        padding: 14px 0;
    }

    .ec-calc__input {
        padding: 10px;
        font-size: 14px;
    }

    .ec-calc__btn {
        padding: 10px 14px;
        font-size: 11px;
        min-width: 80px;
    }

    .ec-calc__rate {
        padding: 8px 10px;
        gap: 8px;
    }

    .ec-calc__rate-name {
        font-size: 12px;
    }

    .ec-calc__rate-price {
        font-size: 12px;
    }
}
