/* ============================================================
   Formulario de inscripción — estilo ACC / referencia UI
   ============================================================ */

/* Variables autocontenidas: no dependen del tema destino */
.vcp-checkout.vcp-isolated {
    --vcp-black:      #000000;
    --vcp-dark:       #1a1a1a;
    --vcp-gray:       #888888;
    --vcp-gray-light: #F4F4F4;
    --vcp-gray-light-hover: #EBEBEB;
    --vcp-page-bg:    #e8e8e8;
    --vcp-white:      #ffffff;
    --vcp-accent:     #fcd200;
    --vcp-accent-hover: #e8c000;
    --vcp-success:    #198754;
    --vcp-danger:     #dc3545;
    --vcp-radius-card: 28px;
    --vcp-radius-input: 10px;
    --vcp-radius-pill: 999px;
}

/* ── Wrapper ── */
.vcp-checkout.vcp-isolated {
    width: 100%;
    max-width: 640px;
    margin: 0 auto 2rem;
    padding: 8px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    color: var(--vcp-dark);
    line-height: 1.5;
    box-sizing: border-box;
    isolation: isolate;
}

.vcp-checkout.vcp-isolated *,
.vcp-checkout.vcp-isolated *::before,
.vcp-checkout.vcp-isolated *::after {
    box-sizing: border-box;
}

/* ── Layout ── */
.vcp-checkout-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vcp-checkout-main,
.vcp-checkout-summary {
    width: 100%;
}

/* ── Cabecera intro (sin tarjeta: título + barra de progreso) ── */
.vcp-checkout-intro {
    padding: 4px 4px 24px;
    margin-bottom: 4px;
}

.vcp-checkout-intro-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 0 0 6px;
    font-size: 2rem;
    font-weight: 700;
    color: var(--vcp-black);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.vcp-checkout-course-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--vcp-radius-pill);
    background: var(--vcp-accent);
    color: var(--vcp-black);
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.2;
    vertical-align: middle;
    white-space: nowrap;
    max-width: 100%;
}

@media (max-width: 520px) {
    .vcp-checkout-course-badge {
        font-size: 0.9375rem;
        padding: 2px 8px;
    }
}

.vcp-checkout-intro-subtitle {
    margin: 0 0 20px;
    font-size: 0.9375rem;
    color: var(--vcp-gray);
    line-height: 1.45;
}

.vcp-checkout-progress {
    width: 100%;
}

.vcp-checkout.vcp-isolated .vcp-checkout-steps {
    display: flex;
    flex-direction: row;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vcp-checkout .vcp-checkout-steps .vcp-step-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #b8b8b8;
    border-radius: var(--vcp-radius-pill);
    background: transparent;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--vcp-gray);
    line-height: 1.2;
    list-style: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vcp-checkout .vcp-step-pill-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.vcp-checkout .vcp-step-pill-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcp-checkout .vcp-checkout-steps .vcp-step-pill.is-active {
    border-color: var(--vcp-accent);
    background: var(--vcp-accent);
    color: var(--vcp-black);
    font-weight: 600;
}

.vcp-checkout .vcp-checkout-steps .vcp-step-pill.is-active .vcp-step-pill-num {
    border-color: var(--vcp-black);
}

.vcp-checkout .vcp-checkout-steps .vcp-step-pill.is-done {
    border-color: var(--vcp-black);
    background: var(--vcp-black);
    color: var(--vcp-white);
    font-weight: 600;
}

.vcp-checkout .vcp-checkout-steps .vcp-step-pill.is-done .vcp-step-pill-num {
    border-color: var(--vcp-white);
}

@media (max-width: 520px) {
    .vcp-checkout-intro {
        padding: 0 0 20px;
    }

    .vcp-checkout-intro-title {
        font-size: 1.625rem;
    }

    .vcp-checkout .vcp-checkout-steps {
        gap: 6px;
    }

    .vcp-checkout .vcp-checkout-steps .vcp-step-pill {
        gap: 6px;
        min-height: 34px;
        padding: 6px 10px;
        font-size: 0.6875rem;
    }

    .vcp-checkout .vcp-step-pill-num {
        width: 20px;
        height: 20px;
        font-size: 0.625rem;
    }
}

/* ── Tarjetas (secciones) ── */
.vcp-checkout-section {
    background: var(--vcp-white);
    border-radius: var(--vcp-radius-card);
    margin-bottom: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.vcp-checkout-section:last-of-type {
    margin-bottom: 0;
}

.vcp-summary-card {
    margin-bottom: 0;
}

/* Cabecera de paso: círculo negro + título */
.vcp-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 32px 32px 0;
    background: transparent;
    border: none;
}

.vcp-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--vcp-black);
    color: var(--vcp-white);
    font-size: 15px;
    font-weight: 700;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
}

.vcp-section-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--vcp-black);
    line-height: 1.3;
}

.vcp-section-body {
    padding: 24px 32px 32px;
}

.vcp-summary-body {
    padding-top: 20px;
}

/* ── Campos ── */
.vcp-field {
    margin-bottom: 20px;
}

.vcp-field:last-child {
    margin-bottom: 0;
}

.vcp-fields-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.vcp-fields-row:last-child {
    margin-bottom: 0;
}

.vcp-fields-row .vcp-field {
    margin-bottom: 0;
    min-width: 0;
}

@media (max-width: 520px) {
    .vcp-section-header,
    .vcp-section-body {
        padding-left: 20px;
        padding-right: 20px;
    }

    .vcp-section-header {
        padding-top: 24px;
    }

    .vcp-section-body {
        padding-bottom: 24px;
    }

    .vcp-fields-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .vcp-fields-row .vcp-field {
        margin-bottom: 20px;
    }

    .vcp-fields-row .vcp-field:last-child {
        margin-bottom: 0;
    }
}

.vcp-required {
    color: var(--vcp-danger);
}

/* Labels */
#formulario-venta-cursos .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--vcp-black);
    text-transform: none;
    letter-spacing: 0;
}

/* Inputs — fondo gris claro, sin borde */
#formulario-venta-cursos .form-control,
#formulario-venta-cursos .form-select {
    display: block;
    width: 100%;
    border: none;
    border-radius: var(--vcp-radius-input);
    padding: 14px 16px;
    min-height: 48px;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--vcp-black);
    background: var(--vcp-gray-light);
    transition: background 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
}

#formulario-venta-cursos .form-select {
    background-color: var(--vcp-gray-light);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

#formulario-venta-cursos .form-control::placeholder {
    color: var(--vcp-gray);
}

#formulario-venta-cursos .form-control:focus,
#formulario-venta-cursos .form-select:focus {
    outline: none;
    background: var(--vcp-gray-light-hover);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

#formulario-venta-cursos .form-control:disabled,
#formulario-venta-cursos .form-select:disabled {
    background: var(--vcp-gray-light-hover);
    color: var(--vcp-gray);
    cursor: not-allowed;
    opacity: 0.8;
}

/* Input group celular */
#formulario-venta-cursos .input-group {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    align-items: stretch;
    background: var(--vcp-gray-light);
    border-radius: var(--vcp-radius-input);
    overflow: hidden;
}

#formulario-venta-cursos .input-group-text {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--vcp-gray);
    padding: 0 0 0 16px;
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

#formulario-venta-cursos .input-group .form-control {
    border-radius: 0;
    background: transparent;
    padding-left: 8px;
    flex: 1 1 0;
    min-width: 0;
    width: 0;
}

#formulario-venta-cursos .input-group .form-control:focus {
    background: transparent;
    box-shadow: none;
}

#formulario-venta-cursos .input-group .form-control:-webkit-autofill,
#formulario-venta-cursos .input-group .form-control:-webkit-autofill:hover,
#formulario-venta-cursos .input-group .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--vcp-black);
    -webkit-box-shadow: 0 0 0 1000px var(--vcp-gray-light) inset;
    box-shadow: 0 0 0 1000px var(--vcp-gray-light) inset;
    transition: background-color 9999s ease-out 0s;
}

#formulario-venta-cursos .input-group:focus-within {
    background: var(--vcp-gray-light-hover);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

/* Validación */
#formulario-venta-cursos .invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--vcp-danger);
}

#formulario-venta-cursos .form-control.is-invalid,
#formulario-venta-cursos .form-select.is-invalid,
#formulario-venta-cursos .was-validated .form-control:invalid,
#formulario-venta-cursos .was-validated .form-select:invalid {
    background: #fde8ea;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

#formulario-venta-cursos .form-control.is-valid,
#formulario-venta-cursos .form-select.is-valid,
#formulario-venta-cursos .was-validated .form-control:valid,
#formulario-venta-cursos .was-validated .form-select:valid {
    background: var(--vcp-gray-light);
    box-shadow: none;
}

#formulario-venta-cursos .form-select.is-invalid ~ .invalid-feedback,
#formulario-venta-cursos .was-validated .form-select:invalid ~ .invalid-feedback,
#formulario-venta-cursos .was-validated .form-control:invalid ~ .invalid-feedback,
#formulario-venta-cursos .form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* ── Extensiones ── */
.vcp-extension-box {
    padding: 16px 18px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: var(--vcp-radius-input);
}

.vcp-extension-box-header {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 12px;
}

.vcp-extension-box-title {
    margin: 0;
    flex: 0 1 auto;
    width: auto;
    max-width: calc(100% - 32px);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--vcp-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}

.vcp-extension-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
    margin: 0;
}

.vcp-extension-help-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--vcp-gray);
    color: var(--vcp-white);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.vcp-extension-help-trigger:hover,
.vcp-extension-help-trigger:focus-visible {
    background: var(--vcp-dark);
    outline: none;
}

.vcp-extension-help-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-28%);
    z-index: 20;
    width: min(300px, calc(100vw - 48px));
    padding: 14px 16px;
    background: var(--vcp-white);
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--vcp-dark);
    text-transform: none;
    letter-spacing: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.vcp-extension-help-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 24%;
    border: 8px solid transparent;
    border-top-color: var(--vcp-white);
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.04));
}

.vcp-extension-help.is-open .vcp-extension-help-tooltip,
.vcp-extension-help:hover .vcp-extension-help-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#formulario-venta-cursos .vcp-extension-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--vcp-white);
    border: 1px solid #e8e8e8;
    border-radius: var(--vcp-radius-input);
    margin-bottom: 10px;
}

#formulario-venta-cursos .vcp-extension-switch:last-child {
    margin-bottom: 0;
}

#formulario-venta-cursos .vcp-extension-switch .form-check-input {
    float: none;
    margin: 0;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: var(--vcp-radius-pill);
    border: none;
    background-color: #ccc;
}

#formulario-venta-cursos .vcp-extension-switch .form-check-input:checked {
    background-color: var(--vcp-black);
}

#formulario-venta-cursos .vcp-extension-switch .form-check-input:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

#formulario-venta-cursos .vcp-extension-switch .form-check-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--vcp-black);
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.vcp-extension-switch-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.vcp-extension-help-inline {
    flex-shrink: 0;
}

#formulario-venta-cursos .vcp-extension-switch .form-check-input:disabled ~ .form-check-label,
#formulario-venta-cursos .vcp-extension-switch .form-check-input:disabled ~ .vcp-extension-switch-label,
#formulario-venta-cursos .vcp-extension-switch .form-check-input:disabled ~ .vcp-extension-switch-label .form-check-label {
    cursor: not-allowed;
    opacity: 0.5;
}

#extension_invalid_feedback {
    display: none;
    margin-top: 10px;
    font-size: 0.8125rem;
    color: var(--vcp-danger);
}

.vcp-extension-loading,
.vcp-cursos-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 14px 16px;
    background: var(--vcp-gray-light);
    border: none;
    border-radius: var(--vcp-radius-input);
    font-size: 0.9375rem;
    color: var(--vcp-gray);
}

.vcp-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: var(--vcp-black);
    border-radius: 50%;
    animation: vcp-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

.vcp-extension-none {
    padding: 14px 16px;
    background: var(--vcp-gray-light);
    border: none;
    border-radius: var(--vcp-radius-input);
    font-size: 0.9375rem;
    color: var(--vcp-gray);
    line-height: 1.4;
}

#sin_cursos_mensaje {
    margin-top: 10px;
    padding: 14px 16px;
    background: var(--vcp-gray-light);
    border-radius: var(--vcp-radius-input);
    font-size: 0.9375rem;
    color: var(--vcp-dark);
    line-height: 1.5;
}

.vcp-price-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    pointer-events: none;
}

/* ── Venta desactivada ── */
.vcp-sale-unavailable-wrap {
    padding: 24px 0;
}

.vcp-sale-unavailable {
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 32px;
    text-align: center;
    background: var(--vcp-white, #fff);
    border: 1px solid var(--vcp-gray-light, #e8e8e8);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.vcp-sale-unavailable-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #fff3cd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcp-sale-unavailable-icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #856404;
}

.vcp-sale-unavailable-title {
    margin: 0 0 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vcp-black, #111);
}

.vcp-sale-unavailable-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 16px;
}

.vcp-sale-unavailable-plus {
    font-weight: 700;
    color: var(--vcp-gray, #666);
}

.vcp-sale-unavailable-message {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--vcp-gray, #555);
}

/* ── Resumen ── */
.vcp-checkout-summary {
    margin-top: 0;
}

.vcp-summary-empty {
    padding: 8px 0 16px;
    color: var(--vcp-gray);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.vcp-summary-empty p {
    margin: 0;
}

.vcp-summary-info {
    margin-bottom: 16px;
}

.vcp-summary-info-row {
    margin-bottom: 14px;
}

.vcp-summary-info-row:last-child {
    margin-bottom: 0;
}

.vcp-summary-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--vcp-black);
    margin-bottom: 4px;
    text-transform: none;
    letter-spacing: 0;
}

.vcp-summary-info-row strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--vcp-black);
    word-break: break-word;
    line-height: 1.4;
}

.vcp-summary-prices {
    margin: 20px 0;
    padding: 16px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.vcp-summary-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

.vcp-summary-price-row:first-child {
    padding-top: 0;
}

.vcp-summary-price-row:last-child {
    padding-bottom: 0;
}

.vcp-summary-price-desc strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--vcp-black);
    line-height: 1.3;
}

.vcp-summary-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vcp-black);
    white-space: nowrap;
}

.vcp-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 24px;
}

.vcp-summary-total span {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--vcp-black);
    text-transform: none;
    letter-spacing: 0;
}

.vcp-summary-total strong {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--vcp-black);
    letter-spacing: -0.02em;
}

/* Botón píldora amarillo — como referencia */
.vcp-btn-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    border: none;
    background: var(--vcp-accent);
    color: var(--vcp-black);
    cursor: pointer;
    border-radius: var(--vcp-radius-pill);
    transition: background 0.15s ease, opacity 0.15s ease;
    margin-bottom: 16px;
}

.vcp-btn-pay:hover:not(:disabled) {
    background: var(--vcp-accent-hover);
}

.vcp-btn-pay:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.vcp-btn-pay-label {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.vcp-btn-pay-sub {
    display: none;
}

.vcp-btn-pay.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.vcp-summary-trust {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 20px;
}

.vcp-summary-trust li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--vcp-gray);
    margin: 0;
    white-space: nowrap;
}

.vcp-summary-trust .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--vcp-success);
    flex-shrink: 0;
}

/* Ocultar estilos bootstrap que interfieren */
#formulario-venta-cursos .was-validated .form-control:valid,
#formulario-venta-cursos .was-validated .form-select:valid {
    border: none;
}

#formulario-venta-cursos .was-validated .form-control:invalid,
#formulario-venta-cursos .was-validated .form-select:invalid {
    border: none;
}
