/*
 * SmartEnvios + ProSupport — melhorias de experiência de frete.
 * Mantém o checkout completo; simplifica somente carrinho e produto.
 */

body.woocommerce-cart .shipping-calculator-button,
body.woocommerce-cart .woocommerce-shipping-destination {
    display: none !important;
}

body.woocommerce-cart .shipping-calculator-form {
    display: block !important;
    margin-top: 12px;
}

body.woocommerce-cart #calc_shipping_postcode_field {
    margin-bottom: 10px;
}

body.woocommerce-cart #calc_shipping_postcode_field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

body.woocommerce-cart #calc_shipping_postcode {
    width: 100%;
    max-width: 210px;
}

body.woocommerce-cart .shipping-calculator-form > p:last-of-type {
    margin-bottom: 0;
}

.smartenvios-product-quote {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.smartenvios-product-quote__title {
    margin-bottom: 8px;
    font-weight: 600;
}

.smartenvios-product-quote__form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: wrap;
}

.smartenvios-product-quote__form .smartenvios-postcode {
    width: 160px;
    min-height: 42px;
}

.smartenvios-product-quote__button {
    min-height: 42px;
}

.smartenvios-product-quote__result {
    margin-top: 12px;
}

.smartenvios-product-quote__destination {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.smartenvios-product-quote__rates {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.smartenvios-product-quote__rate {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.smartenvios-product-quote__service {
    flex: 1 1 auto;
}

.smartenvios-product-quote__price {
    flex: 0 0 auto;
    white-space: nowrap;
}

.smartenvios-product-quote__message {
    padding: 9px 11px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 4px;
}

.smartenvios-product-quote__message--loading {
    opacity: 0.8;
}

.smartenvios-product-quote__message--error {
    font-weight: 500;
}

@media (max-width: 480px) {
    .smartenvios-product-quote__form {
        display: block;
    }

    .smartenvios-product-quote__form .smartenvios-postcode,
    .smartenvios-product-quote__button {
        width: 100%;
    }

    .smartenvios-product-quote__button {
        margin-top: 8px;
    }
}
