/* =========================================================================
   Formulario público de cotización — Logística Balderrama
   Hoja exclusiva de /cotizacion. Todas las reglas cuelgan de .cot-page para no
   afectar ninguna otra vista del ERP. Mobile-first.
   ========================================================================= */

.cot-page {
    --cot-azul-900: #1a3a5c;
    --cot-azul-700: #1a4f8a;
    --cot-azul-500: #2d6a9f;
    --cot-azul-050: #eef4fb;
    --cot-tinta: #1f2d3d;
    --cot-tinta-suave: #5b6b7f;
    --cot-borde: #d8e0ea;
    --cot-fondo: #f3f6fa;
    --cot-error: #c0392b;
    --cot-radio: 14px;

    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--cot-fondo);
    color: var(--cot-tinta);
    font-family: 'Poppins', 'Segoe UI', Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Encabezado con logotipo (fondo blanco: el logo tiene texto azul oscuro) ---------- */
.cot-page .cot-marca {
    background: #ffffff;
    border-bottom: 1px solid var(--cot-borde);
}
.cot-page .cot-marca__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.cot-page .cot-marca__logo {
    height: 76px;
    width: auto;
    display: block;
}
.cot-page .cot-marca__lema {
    display: none;
    color: var(--cot-tinta-suave);
    font-size: .85rem;
    text-align: right;
    max-width: 280px;
    line-height: 1.35;
}

/* ---------- Banda principal ---------- */
.cot-page .cot-hero {
    background: linear-gradient(135deg, var(--cot-azul-900) 0%, var(--cot-azul-700) 100%);
    color: #ffffff;
    padding: 30px 0 88px;
    position: relative;
    overflow: hidden;
}
.cot-page .cot-hero::after {
    /* Trazo decorativo sutil, sin imágenes externas */
    content: "";
    position: absolute;
    right: -120px;
    top: -140px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 40px solid rgba(255, 255, 255, .06);
    pointer-events: none;
}
.cot-page .cot-hero__eyebrow {
    display: inline-block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 12px;
}
.cot-page .cot-hero__titulo {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 10px;
}
.cot-page .cot-hero__texto {
    font-size: 1rem;
    color: rgba(255, 255, 255, .88);
    margin: 0;
    max-width: 560px;
}

/* ---------- Tarjeta del formulario ---------- */
.cot-page .cot-main {
    flex: 1 0 auto;
    margin-top: -64px;
    padding-bottom: 40px;
    position: relative;
    z-index: 1;
}
.cot-page .cot-card {
    background: #ffffff;
    border-radius: var(--cot-radio);
    box-shadow: 0 10px 30px rgba(26, 58, 92, .12), 0 2px 6px rgba(26, 58, 92, .06);
    padding: 22px 18px;
    max-width: 760px;
    margin: 0 auto;
}

.cot-page .cot-seccion + .cot-seccion {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid #edf1f6;
}
.cot-page .cot-seccion__titulo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cot-azul-900);
    margin: 0 0 18px;
}
.cot-page .cot-seccion__num {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cot-azul-050);
    color: var(--cot-azul-700);
    font-weight: 700;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Campos ---------- */
.cot-page .form-label {
    font-weight: 500;
    font-size: .95rem;
    color: var(--cot-tinta);
    margin-bottom: 6px;
}
.cot-page .cot-requerido {
    color: var(--cot-error);
    margin-left: 2px;
}
.cot-page .cot-opcional {
    color: var(--cot-tinta-suave);
    font-weight: 400;
    font-size: .82rem;
    margin-left: 4px;
}
.cot-page .form-control {
    /* 16px evita el zoom automático de iOS al enfocar */
    font-size: 16px;
    min-height: 50px;
    border-radius: 10px;
    border: 1.5px solid var(--cot-borde);
    padding: 11px 14px;
    color: var(--cot-tinta);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.cot-page textarea.form-control {
    min-height: 120px;
    resize: vertical;
}
.cot-page .form-control:focus {
    border-color: var(--cot-azul-500);
    box-shadow: 0 0 0 4px rgba(45, 106, 159, .15);
}
.cot-page .form-control::placeholder {
    color: #9aa7b6;
}
.cot-page .form-text {
    color: var(--cot-tinta-suave);
    font-size: .82rem;
}
.cot-page .invalid-feedback {
    font-size: .85rem;
    color: var(--cot-error);
}
.cot-page .form-control.is-invalid,
.cot-page .was-validated .form-control:invalid {
    border-color: var(--cot-error);
}

/* ---------- Tipo de servicio: opciones grandes táctiles ---------- */
.cot-page .cot-opciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.cot-page .cot-opcion input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cot-page .cot-opcion label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 92px;
    border: 1.5px solid var(--cot-borde);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    color: var(--cot-tinta);
    padding: 12px 8px;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.cot-page .cot-opcion label .fa {
    font-size: 1.6rem;
    color: var(--cot-azul-500);
}
.cot-page .cot-opcion label small {
    color: var(--cot-tinta-suave);
    font-weight: 400;
    font-size: .78rem;
    line-height: 1.25;
}
.cot-page .cot-opcion input:checked + label {
    border-color: var(--cot-azul-700);
    background: var(--cot-azul-050);
    box-shadow: 0 0 0 3px rgba(26, 79, 138, .14);
}
.cot-page .cot-opcion input:focus-visible + label {
    outline: 3px solid rgba(45, 106, 159, .45);
    outline-offset: 2px;
}
.cot-page .cot-opciones.is-invalid .cot-opcion label {
    border-color: var(--cot-error);
}

/* ---------- Sí / No segmentado ---------- */
.cot-page .cot-sino {
    display: inline-flex;
    border: 1.5px solid var(--cot-borde);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}
.cot-page .cot-sino input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cot-page .cot-sino label {
    min-width: 76px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    font-weight: 500;
    cursor: pointer;
    color: var(--cot-tinta);
    -webkit-tap-highlight-color: transparent;
}
.cot-page .cot-sino label + input + label,
.cot-page .cot-sino label ~ label {
    border-left: 1.5px solid var(--cot-borde);
}
.cot-page .cot-sino input:checked + label {
    background: var(--cot-azul-700);
    color: #ffffff;
}
.cot-page .cot-sino input:focus-visible + label {
    outline: 3px solid rgba(45, 106, 159, .45);
    outline-offset: -3px;
}
.cot-page .cot-certificacion {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 14px 0;
    border-bottom: 1px solid #edf1f6;
}
.cot-page .cot-certificacion:last-of-type {
    border-bottom: 0;
}
.cot-page .cot-certificacion__texto {
    font-weight: 500;
    font-size: .95rem;
}
.cot-page .cot-certificacion__texto small {
    display: block;
    color: var(--cot-tinta-suave);
    font-weight: 400;
    font-size: .8rem;
}

/* ---------- Honeypot (fuera de pantalla, no display:none) ---------- */
.cot-page .cot-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ---------- Alertas ---------- */
.cot-page .cot-alerta {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    background: #fdf1ef;
    border: 1px solid #f3c9c2;
    color: #8e2a1e;
    font-size: .92rem;
}
.cot-page .cot-alerta .fa {
    margin-top: 3px;
}
.cot-page .cot-alerta ul {
    margin: 0;
    padding-left: 18px;
}

/* ---------- Envío ---------- */
.cot-page .cot-enviar {
    margin-top: 28px;
}
.cot-page .cot-btn {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--cot-azul-700) 0%, var(--cot-azul-900) 100%);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 16px rgba(26, 79, 138, .28);
    transition: transform .1s ease, box-shadow .15s ease, opacity .15s ease;
    text-decoration: none;
}
.cot-page .cot-btn:hover,
.cot-page .cot-btn:focus {
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(26, 79, 138, .34);
}
.cot-page .cot-btn:active {
    transform: translateY(1px);
}
.cot-page .cot-btn:disabled {
    opacity: .8;
    cursor: progress;
}
.cot-page .cot-btn .spinner-border {
    width: 1.15rem;
    height: 1.15rem;
    border-width: .16em;
}
.cot-page .cot-btn--secundario {
    background: #ffffff;
    color: var(--cot-azul-700);
    border: 1.5px solid var(--cot-azul-700);
    box-shadow: none;
}
.cot-page .cot-btn--secundario:hover,
.cot-page .cot-btn--secundario:focus {
    color: var(--cot-azul-900);
    background: var(--cot-azul-050);
    box-shadow: none;
}
.cot-page .cot-nota {
    margin: 14px 0 0;
    text-align: center;
    font-size: .82rem;
    color: var(--cot-tinta-suave);
}
.cot-page .cot-nota a {
    color: var(--cot-azul-700);
}

/* ---------- Confirmación ---------- */
.cot-page .cot-gracias {
    text-align: center;
    padding: 34px 20px 28px;
}
.cot-page .cot-gracias__icono {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #e7f6ee;
    color: #1e8e57;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cot-aparecer .45s ease-out both;
}
.cot-page .cot-gracias__titulo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--cot-azul-900);
    margin: 0 0 10px;
}
.cot-page .cot-gracias__texto {
    color: var(--cot-tinta-suave);
    margin: 0 auto 22px;
    max-width: 460px;
}
.cot-page .cot-folio {
    display: inline-block;
    background: var(--cot-azul-050);
    border: 1px dashed #b8cbe2;
    border-radius: 10px;
    padding: 10px 18px;
    margin-bottom: 26px;
}
.cot-page .cot-folio span {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--cot-tinta-suave);
}
.cot-page .cot-folio strong {
    font-size: 1.25rem;
    letter-spacing: .06em;
    color: var(--cot-azul-900);
}
.cot-page .cot-gracias .cot-btn {
    max-width: 320px;
}

@keyframes cot-aparecer {
    from { transform: scale(.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ---------- Pie ---------- */
.cot-page .cot-pie {
    flex-shrink: 0;
    text-align: center;
    padding: 18px 16px 26px;
    font-size: .8rem;
    color: var(--cot-tinta-suave);
}
.cot-page .cot-pie a {
    color: var(--cot-azul-700);
}

/* ---------- Pantallas medianas en adelante ---------- */
@media (min-width: 576px) {
    .cot-page .cot-card {
        padding: 32px 34px;
    }
    .cot-page .cot-hero__titulo {
        font-size: 2.1rem;
    }
    .cot-page .cot-btn {
        width: auto;
        min-width: 280px;
        padding: 0 34px;
    }
    .cot-page .cot-enviar {
        text-align: center;
    }
}
@media (min-width: 768px) {
    .cot-page .cot-marca__logo {
        height: 96px;
    }
    .cot-page .cot-marca__lema {
        display: block;
    }
    .cot-page .cot-hero {
        padding: 44px 0 104px;
    }
    .cot-page .cot-main {
        margin-top: -76px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cot-page *,
    .cot-page *::before,
    .cot-page *::after {
        animation: none !important;
        transition: none !important;
    }
}
