/* HUP - Kit Ecommerce Chile — Checkout CSS v2.3 */

.woocommerce-checkout #billing_city.select,
.woocommerce-checkout #shipping_city.select {
    background-color: #fff;
    border: 1px solid #d5d8dc;
    border-radius: 6px;
    box-shadow: none;
    padding: 10px 12px;
    appearance: auto;
    -webkit-appearance: auto;
    width: 100%;
}
.woocommerce-checkout #billing_city.select:hover { border-color: #bfc3c7; }
.woocommerce-checkout #billing_city.select:focus,
.woocommerce-checkout #shipping_city.select:focus { border-color: #999; outline: none; }

/* País fijo en Chile: WooCommerce lo pinta como país único (select de una
   opción). Respaldo para temas y constructores que no cargan forms.css de
   WooCommerce: se ve como texto, no como un desplegable. */
.woocommerce-checkout .country_to_state--single {
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: inherit;
    pointer-events: none;
}

/* Error RUT */
.hupkec-rut-error {
    display: block;
    color: #c00;
    font-size: 12px;
    margin-top: 4px;
}

/* =====================================================
   MÓDULO DE FACTURACIÓN
===================================================== */
.hupkec-billing-module {
    margin-top: 20px;
    border-top: 1px solid #e8e8e8;
    padding-top: 16px;
}

/* Trigger / Checkbox */
.hupkec-billing-trigger { margin-bottom: 0; }
.hupkec-billing-check-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    padding: 8px 0;
}
.hupkec-billing-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0C447C;
    flex-shrink: 0;
}

/* Bloque de campos */
.hupkec-billing-fields {
    display: none;
    overflow: hidden;
}
.hupkec-billing-fields.hupkec-billing-open { display: block; }
.hupkec-billing-fields-inner {
    background: #f8fbfe;
    border: 1px solid #d0e8f7;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

/* Header del bloque */
.hupkec-billing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}
.hupkec-billing-header strong {
    font-size: 14px;
    color: #0C447C;
}

/* Botón copiar */
.hupkec-btn-copy-billing {
    font-size: 12px;
    padding: 5px 12px;
    background: #fff;
    border: 1px solid #378ADD;
    color: #0C447C;
    border-radius: 4px;
    cursor: pointer;
    transition: background .2s;
}
.hupkec-btn-copy-billing:hover { background: #e8f3fb; }
.hupkec-btn-copied {
    background: #e8f5e9 !important;
    border-color: #4caf50 !important;
    color: #1b5e20 !important;
}

/* Grid de campos */
.hupkec-billing-grid { display: block; }
.hupkec-billing-field-row { margin-bottom: 12px; }
.hupkec-billing-field-row label { font-size: 13px; font-weight: 600; margin-bottom: 4px; display: block; }
.hupkec-billing-field-row .input-text,
.hupkec-billing-field-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d5d8dc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}
.hupkec-billing-field-row .input-text:focus,
.hupkec-billing-field-row select:focus {
    border-color: #378ADD;
    outline: none;
    box-shadow: 0 0 0 2px rgba(55,138,221,.15);
}
.hupkec-billing-field-row.woocommerce-invalid .input-text,
.hupkec-billing-field-row.woocommerce-invalid select {
    border-color: #c00;
}

/* =========================================================
   PÁGINA DE GRACIAS — "Información adicional"
   Reglas que antes iban como atributos style en el HTML.
========================================================= */
.hupkec-thankyou-fields { margin-top: 20px; }
.hupkec-thankyou-fields table { width: 100%; }
.hupkec-thankyou-fields th,
.hupkec-thankyou-fields td { padding: 6px 12px; }
.hupkec-thankyou-fields th { text-align: left; }

/* Sección "Datos de facturación" en la página de gracias */
.hupkec-thankyou-billing { margin-top: 30px; }
.hupkec-thankyou-billing table { width: 100%; }
.hupkec-thankyou-billing th,
.hupkec-thankyou-billing td { padding: 6px 12px; }
.hupkec-thankyou-billing th { text-align: left; }
