/**
 * Histeel Armada Shipping — Frontend styles.
 *
 * Loaded on cart and checkout pages only. Styles the WhatsApp CTA injected
 * under the "reject" shipping rate when total tonase melebihi kapasitas.
 */

.has-wa-cta {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 8px;
    padding: 14px 16px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-left: 5px solid #f59e0b;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(146, 64, 14, .08);
}

.has-wa-cta__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-weight: 800;
    line-height: 1;
}

.has-wa-cta__content {
    min-width: 0;
}

.has-wa-cta__title {
    display: block;
    margin: 0 0 4px;
    color: #78350f;
    font-size: 14px;
    line-height: 1.35;
}

.has-wa-cta__msg {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #5d4037;
}

.has-wa-cta__weight {
    margin: 0 0 6px;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.has-wa-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s ease;
}

.has-wa-cta__btn:hover,
.has-wa-cta__btn:focus {
    background: #128c7e;
    color: #fff !important;
}

.has-wa-cta__btn::before {
    content: "💬";
    font-size: 16px;
    line-height: 1;
}

#calc_shipping_address_1_field {
    clear: both;
}

.has-shipping-update-required {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 4px;
    background: #fff8e1;
    border: 1px solid #f0c36d;
    color: #5d4037;
    font-size: 13px;
    line-height: 1.45;
}

.checkout-button.has-disabled-checkout {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.25);
}

.has-shipping-over-capacity {
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.has-cart-weight-summary-row td {
    text-align: left !important;
}

.has-cart-weight-summary-title {
    margin: 0 0 8px;
    color: #0f172a;
    font-weight: 800;
    text-align: left;
}

.has-cart-weight-summary {
    display: grid;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.has-cart-weight-summary.is-over-capacity {
    border-color: #fecaca;
    background: #fef2f2;
}

.has-cart-weight-summary__total {
    color: #0f172a;
    font-size: 14px;
}

.has-cart-weight-summary__items {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.has-cart-weight-summary__items li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    line-height: 1.35;
}

.has-cart-weight-summary__name {
    flex: 1 1 180px;
    color: #334155;
}

.has-cart-weight-summary__meta {
    flex: 0 1 auto;
    color: #64748b;
    font-weight: 700;
}

.has-cart-weight-summary__alert {
    padding: 8px 10px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.has-saved-billing-addresses,
.has-cart-save-address {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.has-saved-billing-addresses .description {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

.has-cart-save-address .form-row {
    margin-bottom: 10px;
}

.has-cart-save-address .form-row:last-child {
    margin-bottom: 0;
}

.has-login-required {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
}

.has-readonly-billing,
.has-readonly-select,
.woocommerce-checkout .has-readonly-select + .select2 .select2-selection {
    cursor: not-allowed;
    background: #f1f5f9 !important;
    color: #475569;
}

.has-readonly-select,
.woocommerce-checkout .has-readonly-select + .select2 {
    pointer-events: none;
}

.woocommerce-checkout #has_saved_billing_address_field .has-edit-billing-address,
.woocommerce-checkout .has-saved-billing-addresses .has-edit-billing-address {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 40px;
    margin-top: 10px !important;
    margin-left: 0 !important;
    padding: 8px 14px !important;
    line-height: 1.2 !important;
    vertical-align: middle;
}

@media (max-width: 640px) {
    .woocommerce-checkout #has_saved_billing_address_field .has-edit-billing-address,
    .woocommerce-checkout .has-saved-billing-addresses .has-edit-billing-address {
        display: inline-flex;
        margin-left: 0 !important;
    }
}
