/* ═══════════════════════════════════════════════════════════════
   Checkout Chile — Billing Module Styles
   Slot: ExperimentalOrderMeta (right-side order summary panel)
═══════════════════════════════════════════════════════════════ */

/* Remove WooCommerce native billing UI completely */

.wc-block-checkout__billing-address,
.wc-block-checkout__use-address-for-billing,
.wc-block-components-checkout-step[data-step-id="billing-address"],
.wc-block-components-checkbox:has( input[name="use_shipping_as_billing"] ) {
    display: none !important;
}

/* ── Module Container ────────────────────────────────────────── */

.cc-module {
    background: transparent !important;
    border: none !important;
    padding: 16px 20px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cc-module * {
    box-sizing: border-box !important;
}

/* ── Two Column Row ──────────────────────────────────────────── */

.cc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cc-row .cc-field {
    margin-bottom: 0;
}

/* ── Header ───────────────────────────────────────────── */

.cc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.cc-header-icon {
    font-size: 28px;
    line-height: 1;
}

.cc-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #1a1a1a;
    margin: 0 0 2px !important;
    line-height: 1.3 !important;
}

.cc-subtitle {
    font-size: 12px !important;
    color: #888 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* ── Type Selector (Radio Cards) ─────────────────────────────── */

.cc-type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.cc-type-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
    position: relative;
}

.cc-type-option:hover {
    border-color: #bbb;
    background: #f5f5f5;
}

.cc-type-option.is-active {
    border-color: #1a1a1a;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cc-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-type-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-type-icon {
    font-size: 20px;
    line-height: 1;
}

.cc-type-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.2;
}

.cc-type-desc {
    display: block;
    font-size: 11px;
    color: #999;
    line-height: 1.2;
    margin-top: 1px;
}

.cc-type-check {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 12px;
    font-weight: bold;
    color: #1a1a1a;
    background: #f0f0f0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Divider ────────────────────────────────────────────────── */

.cc-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cc-divider::before,
.cc-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f0f0f0;
}

/* ── Factura Fields ─────────────────────────────────────────── */

.cc-factura-fields {
    animation: cc-fadein 0.3s ease;
}

@keyframes cc-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Form Fields ─────────────────────────────────────────────── */

.cc-field {
    margin-bottom: 14px;
}

.cc-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.cc-required {
    font-weight: 400;
    color: #bbb;
    font-size: 11px;
    margin-left: 4px;
}

.cc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cc-input {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box !important;
    outline: none;
    margin: 0 !important;
}

.cc-input:focus {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}

.cc-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27%23333%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}

.cc-field.has-error .cc-input {
    border-color: #e2401c;
    box-shadow: 0 0 0 3px rgba(226,64,28,0.1);
}

.cc-field.is-valid .cc-input {
    border-color: #4bb543;
    box-shadow: 0 0 0 3px rgba(75,181,67,0.1);
}

.cc-input-icon {
    position: absolute;
    right: 12px;
    font-size: 14px;
    font-weight: 700;
}

.cc-input-icon.valid { color: #4bb543; }

.cc-input-icon.error { color: #e2401c; }

.cc-error-msg {
    font-size: 11px;
    color: #e2401c;
    margin: 4px 0 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cc-valid-msg {
    font-size: 11px;
    color: #4bb543;
    margin: 4px 0 0;
}

/* ── Phone Input Wrapper ─────────────────────────────────────── */

.cc-phone-wrapper {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.cc-phone-wrapper:focus-within {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.07);
}

.cc-field.has-error .cc-phone-wrapper {
    border-color: #e2401c;
    box-shadow: 0 0 0 3px rgba(226,64,28,0.1);
}

.cc-field.is-valid .cc-phone-wrapper {
    border-color: #4bb543;
    box-shadow: 0 0 0 3px rgba(75,181,67,0.1);
}

.cc-prefix {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    border-right: 1px solid #e0e0e0;
    user-select: none;
    white-space: nowrap;
}

.cc-input-phone {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0;
    width: 100% !important;
}

/* ── Boleta Info ─────────────────────────────────────────────── */

.cc-boleta-info {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.cc-info-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

