/* Empezar con SǝIE, bienvenida y suscripción: una tarjeta clara sobre la banda azul del sitio. */

body {
    min-height: 100vh;
    background: linear-gradient(180deg, #5364ff 0, #4e60f6 300px, var(--sand) 300px);
}

.checkout {
    width: min(640px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 28px 0 64px;
}

.checkout-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

.checkout-top .logo,
.checkout-top a {
    color: #ffffff;
}

.checkout-top a:not(.logo) {
    font-size: 14px;
    font-weight: 600;
}

.checkout-card {
    min-width: 0;
    margin-top: 24px;
    padding: 32px 28px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(24, 28, 56, .18);
}

.checkout-card h1 {
    font-size: clamp(28px, 6vw, 36px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -1.4px;
}

.checkout-intro {
    margin: 10px 0 26px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.checkout-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--lime);
    font-size: 13px;
    font-weight: 700;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 14px;
    font-size: 17px;
    font-weight: 700;
}

.checkout-step em {
    font-style: normal;
}

.checkout-step span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--blue);
    color: #ffffff;
    font-size: 13px;
}

/* Formulario corto y amable: lo opcional dice "(opcional)", así que sin asteriscos. */
.checkout .field > label::after,
.checkout .field > .field-label::after {
    content: none;
}

.checkout .field textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    font-size: 16px;
    resize: vertical;
}

.code-input {
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

/* Si un campo del renglón trae ayuda abajo, el de al lado no se estira: las dos cajas
   quedan a la misma altura. */
.field-row > .field {
    align-content: start;
}


/* Áreas y planes */

/* Un fieldset mide por defecto lo que su contenido: sin min-width se sale en celulares. */
.plans,
.areas,
.area-fields {
    display: grid;
    gap: 12px;
    min-width: 0;
    border: 0;
}

.areas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.area-fields {
    gap: 20px;
}

.area .plan-summary {
    font-size: 13px;
}


/* Opciones de un toque (radios con forma de botón): el radio sigue ahí para el teclado. */

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.field .option {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.field .option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.option span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border: 2px solid var(--line);
    border-radius: 999px;
    transition: border-color .15s ease, background .15s ease;
}

.option input:checked + span {
    border-color: var(--blue);
    background: #f5f6ff;
    font-weight: 600;
}

.option input:focus-visible + span {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.option input[aria-invalid="true"] + span {
    border-color: var(--danger);
}

.plan {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 18px 18px 18px 50px;
    border: 2px solid var(--line);
    border-radius: 16px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.plan input {
    position: absolute;
    top: 21px;
    left: 18px;
    width: 20px;
    height: 20px;
    accent-color: var(--blue);
}

.plan:has(input:checked) {
    border-color: var(--blue);
    background: #f5f6ff;
}

.plan:has(input:focus-visible) {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.plan-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
}

.plan-name {
    font-size: 18px;
    font-weight: 700;
}

.plan-price {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.plan-price small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.plan-summary {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.plan-tag {
    justify-self: start;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--lime);
    font-size: 12px;
    font-weight: 700;
}

/* Lo que incluye se despliega solo en el plan elegido, para no saturar. */
.plan-includes {
    display: none;
    gap: 6px;
    margin-top: 6px;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.plan:has(input:checked) .plan-includes {
    display: grid;
}

.plan-includes li::marker {
    color: var(--blue);
}


/* Aceptar términos y garantías */

/* El aviso simplificado: lo que se tiene que leer antes de marcar la casilla. */
.privacy-brief {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--sand);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.terms {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0 6px;
    font-size: 14px;
    line-height: 1.5;
}

.terms input {
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--blue);
}

.terms a,
.checkout-card a:not(.button) {
    color: var(--blue-strong);
    font-weight: 600;
}

.checkout .button-wide {
    width: 100%;
    min-height: 56px;
    font-size: 17px;
}

.trust {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    list-style: none;
}

.trust li {
    position: relative;
    padding-left: 22px;
}

.trust li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--blue);
    font-weight: 700;
}

.notice {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff8d6;
    font-size: 14px;
    line-height: 1.5;
}


/* Bienvenida y suscripción */

.steps {
    display: grid;
    gap: 10px;
    margin: 18px 0 24px;
    padding-left: 22px;
    line-height: 1.5;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.actions .button {
    min-height: 50px;
    text-decoration: none;
}


@media (max-width: 560px) {

    .checkout-card {
        padding: 26px 18px;
    }

    .field-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .plan {
        padding-left: 46px;
    }

}


/* Dos tarjetas de área no caben lado a lado en un celular chico. */
@media (max-width: 480px) {

    .areas {
        grid-template-columns: minmax(0, 1fr);
    }

}


/* Cuestionario del cliente */

.survey .checkout-step {
    margin-top: 32px;
}

.survey-question > label {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.checkout .survey-question textarea {
    min-height: 88px;
}

.survey-status {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

/* SǝIE Clinic: doctores adicionales debajo del plan (empezar.js). Cada uno en su tarjeta,
   y abajo el total del mes con lo que suma cada doctor. */
.extra-doctors {
    gap: 12px;
}

.extra-doctors-list {
    display: grid;
    gap: 12px;
}

.extra-doctor {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #ffffff;
}

.extra-doctor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.extra-doctors #add-doctor {
    justify-self: start;
}

.plan-total {
    margin: 0;
    color: var(--muted);
}

.plan-total strong {
    color: var(--ink);
}

/* Cupón: verde si da el mes gratis, rojo si no sirve (empezar.js). */
.coupon-good {
    color: #1f7a3a;
    font-weight: 600;
}

.coupon-bad {
    color: #b42318;
}
