/* ============================================================
   COTIZADOR DE TRANSPORTE DE PERSONAL
   Rutas + unidades + turnos. Namespace: .cp-
   El markup dinámico lo genera cotizador-personal.js
   ============================================================ */

.cp-section {
    position: relative;
    padding: 100px 20px 110px;
    background: #0b0b0b;
    overflow: hidden;
    font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
}

.cp-section::before {
    content: '';
    position: absolute;
    top: -220px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.13) 0%, transparent 65%);
    pointer-events: none;
}

.cp-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
    pointer-events: none;
}

/* ===== ENCABEZADO ===== */
.cp-header {
    position: relative;
    z-index: 2;
    max-width: 780px;
    margin: 0 auto 46px;
    text-align: center;
}

.cp-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 204, 0, 0.35);
    border-radius: 100px;
    background: rgba(255, 204, 0, 0.08);
    color: #ffcc00;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.cp-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffcc00;
    animation: cp-pulse 2s ease-in-out infinite;
}

@keyframes cp-pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.55);
    }

    50% {
        opacity: 0.55;
        box-shadow: 0 0 0 7px rgba(255, 204, 0, 0);
    }
}

.cp-title {
    font-size: clamp(2rem, 4.6vw, 3.1rem);
    line-height: 1.12;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.cp-title-accent {
    color: #ffcc00;
}

.cp-subtitle {
    font-size: clamp(1rem, 1.7vw, 1.12rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.62);
}

/* ===== PANEL PRINCIPAL ===== */
.cp-panel {
    position: relative;
    z-index: 2;
    max-width: 980px;
    margin: 0 auto;
    /* También aplica en modo embebido, donde no hay .cp-section arriba */
    font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    border-radius: 26px;
    padding: 40px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
}

/* Modo embebido (dentro de otro formulario, p. ej. cotiza.html) */
.cp-panel--embebido {
    max-width: none;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* ===== SELECTOR DE CAMINO (armar / archivo / WhatsApp) ===== */
.cp-vias {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 34px;
}

.cp-via {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 16px;
    border: 1.5px solid #e6e6ea;
    border-radius: 16px;
    background: #fff;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.22s ease;
}

.cp-via:hover {
    border-color: #111;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.09);
}

.cp-via-ico {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #f3f3f5;
    color: #4a4a52;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    transition: all 0.22s ease;
}

.cp-via-txt {
    min-width: 0;
}

.cp-via-txt b {
    display: block;
    font-size: 0.94rem;
    font-weight: 800;
    color: #111;
    line-height: 1.25;
}

.cp-via-txt small {
    display: block;
    margin-top: 3px;
    font-size: 0.77rem;
    line-height: 1.35;
    color: #6b6b73;
}

.cp-via-check {
    position: absolute;
    top: 9px;
    right: 11px;
    font-size: 0.85rem;
    color: #ffcc00;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cp-via.is-active {
    background: #111;
    border-color: #111;
}

.cp-via.is-active .cp-via-ico {
    background: #ffcc00;
    color: #111;
}

.cp-via.is-active .cp-via-txt b {
    color: #fff;
}

.cp-via.is-active .cp-via-txt small {
    color: rgba(255, 255, 255, 0.6);
}

.cp-via.is-active .cp-via-check {
    opacity: 1;
}

.cp-via-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cp-panel-intro .cp-step-desc {
    margin-top: 6px;
    max-width: 62ch;
}

/* ===== PASOS ===== */
.cp-step+.cp-step {
    margin-top: 42px;
    padding-top: 38px;
    border-top: 1px solid #ececee;
}

.cp-panel--embebido .cp-step+.cp-step {
    margin-top: 30px;
    padding-top: 26px;
}

.cp-step-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.cp-step-num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #111;
    color: #ffcc00;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    font-weight: 800;
}

.cp-step-title {
    font-size: 1.28rem;
    font-weight: 800;
    color: #111;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.cp-step-desc {
    margin-top: 4px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #6b6b73;
}

/* ===== TARJETA DE RUTA ===== */
.cp-rutas {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cp-ruta {
    border: 1px solid #e6e6ea;
    border-radius: 18px;
    background: #fafafb;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.cp-ruta:focus-within {
    border-color: #111;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.09);
}

.cp-ruta--error {
    border-color: #e03b3b;
    background: #fff8f8;
}

.cp-ruta-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #111;
    color: #fff;
}

.cp-ruta-num {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffcc00;
}

.cp-ruta-nombre {
    flex: 1;
    min-width: 0;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.28);
    background: transparent;
    color: #fff;
    font-size: 0.92rem;
    font-family: inherit;
    padding: 4px 2px;
    outline: none;
    transition: border-color 0.2s ease;
}

.cp-ruta-nombre::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.cp-ruta-nombre:focus {
    border-bottom-color: #ffcc00;
}

.cp-ruta-acciones {
    display: flex;
    gap: 6px;
}

.cp-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.2s ease;
}

.cp-icon-btn:hover {
    background: #ffcc00;
    border-color: #ffcc00;
    color: #111;
}

.cp-icon-btn--danger:hover {
    background: #e03b3b;
    border-color: #e03b3b;
    color: #fff;
}

.cp-ruta-body {
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== CAMPOS ===== */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cp-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.cp-field--full {
    grid-column: 1 / -1;
}

.cp-grid--compacto {
    gap: 12px;
}

.cp-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #33333a;
    letter-spacing: 0.01em;
}

.cp-label span {
    font-weight: 500;
    color: #9a9aa3;
}

.cp-input,
.cp-select,
.cp-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e6;
    border-radius: 11px;
    background: #fff;
    color: #111;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.cp-textarea {
    resize: vertical;
    min-height: 88px;
    line-height: 1.55;
}

.cp-select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6b73' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 11px;
    padding-right: 36px;
    cursor: pointer;
}

.cp-input:focus,
.cp-select:focus,
.cp-textarea:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.28);
}

.cp-input::placeholder,
.cp-textarea::placeholder {
    color: #b0b0b8;
}

.cp-input--error,
.cp-select--error {
    border-color: #e03b3b;
    background: #fff8f8;
}

.cp-error {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #d32f2f;
}

/* Origen → Destino con flecha */
.cp-ruta-od {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 12px;
}

.cp-od-arrow {
    padding-bottom: 13px;
    color: #c2c2ca;
    font-size: 0.9rem;
}

/* ===== STEPPER NUMÉRICO ===== */
.cp-stepper {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #e0e0e6;
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cp-stepper:focus-within {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.28);
}

.cp-stepper--error {
    border-color: #e03b3b;
}

.cp-stepper-btn {
    width: 42px;
    border: none;
    background: #f3f3f5;
    color: #111;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.cp-stepper-btn:hover {
    background: #ffcc00;
}

.cp-stepper-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f3f3f5;
}

.cp-stepper input {
    flex: 1;
    min-width: 0;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: #111;
    background: transparent;
    padding: 12px 4px;
    -moz-appearance: textfield;
}

.cp-stepper input::-webkit-outer-spin-button,
.cp-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cp-stepper input:focus {
    outline: none;
}

/* ===== SUGERENCIA DE UNIDAD ===== */
.cp-sugerencia {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fffbe8;
    border: 1px solid #ffe580;
}

.cp-sug-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffcc00;
    color: #111;
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.cp-sug-text {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #4a4327;
}

.cp-sug-text strong {
    display: block;
    color: #111;
    font-size: 0.98rem;
    font-weight: 800;
    margin-bottom: 1px;
}

.cp-sug-accion {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-sug-accion .cp-stepper {
    width: 118px;
    border-color: #ffe580;
}

.cp-sug-accion .cp-stepper-btn {
    background: #fff6d6;
}

.cp-sug-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 11px;
    background: #111;
    color: #ffcc00;
    font-size: 0.85rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cp-sug-btn:hover {
    background: #ffcc00;
    color: #111;
}

/* ===== CATÁLOGO DE UNIDADES ===== */
.cp-units-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 12px;
}

.cp-units-head .cp-label {
    margin-right: auto;
}

.cp-units {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
    border-radius: 15px;
}

.cp-units--error {
    outline: 2px solid #e03b3b;
    outline-offset: 6px;
}

.cp-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 14px 10px 12px;
    border: 1.5px solid #e0e0e6;
    border-radius: 15px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.cp-unit:hover {
    border-color: #111;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.cp-unit:focus-visible {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.5);
}

.cp-unit-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f3f3f5;
    color: #4a4a52;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.cp-unit-nombre {
    font-size: 0.87rem;
    font-weight: 800;
    color: #111;
    line-height: 1.2;
}

.cp-unit-cap {
    font-size: 0.73rem;
    line-height: 1.3;
    color: #8a8a93;
}

.cp-unit-add {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    font-size: 0.73rem;
    font-weight: 700;
    color: #9a9aa3;
}

.cp-unit-step {
    display: none;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
}

.cp-unit.is-active {
    background: #111;
    border-color: #111;
}

.cp-unit.is-active .cp-unit-ico {
    background: #ffcc00;
    color: #111;
}

.cp-unit.is-active .cp-unit-nombre {
    color: #fff;
}

.cp-unit.is-active .cp-unit-cap {
    color: rgba(255, 255, 255, 0.55);
}

.cp-unit.is-active .cp-unit-add {
    display: none;
}

.cp-unit.is-active .cp-unit-step {
    display: inline-flex;
}

.cp-unit-btn {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.18s ease;
}

.cp-unit-btn:hover {
    background: #ffcc00;
    border-color: #ffcc00;
    color: #111;
}

.cp-unit-n {
    min-width: 26px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffcc00;
}

.cp-units-nota,
.cp-units-vacio {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #6b6b73;
}

.cp-units-nota i,
.cp-units-vacio i {
    margin-top: 2px;
    color: #b0b0b8;
}

.cp-units-nota b {
    color: #111;
    font-weight: 800;
}

.cp-units-vacio {
    padding: 16px;
    border: 1px dashed #d8d8de;
    border-radius: 13px;
    background: #fafafb;
    margin-top: 0;
}

/* Interruptor: mismas unidades o desglose por turno */
.cp-switch {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
    font-size: 0.8rem;
    font-weight: 700;
    color: #6b6b73;
}

.cp-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cp-switch-track {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 100px;
    background: #d8d8de;
    transition: background 0.2s ease;
}

.cp-switch-dot {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, background 0.2s ease;
}

.cp-switch input:checked+.cp-switch-track {
    background: #111;
}

.cp-switch input:checked+.cp-switch-track .cp-switch-dot {
    transform: translateX(16px);
    background: #ffcc00;
}

.cp-switch input:focus-visible+.cp-switch-track {
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.45);
}

.cp-switch input:checked~.cp-switch-txt {
    color: #111;
}

/* Bloque por turno cuando el desglose está activo */
.cp-tblock {
    border: 1px solid #e6e6ea;
    border-radius: 15px;
    background: #fff;
    padding: 13px;
}

.cp-tblock+.cp-tblock {
    margin-top: 10px;
}

.cp-tblock-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 11px;
}

.cp-tblock-nombre {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.87rem;
    font-weight: 800;
    color: #111;
}

.cp-tblock-nombre i {
    color: #9a9aa3;
    font-size: 0.82rem;
}

.cp-tblock-hora {
    padding: 3px 10px;
    border-radius: 100px;
    background: #f3f3f5;
    font-size: 0.76rem;
    font-weight: 700;
    color: #6b6b73;
}

.cp-tblock-total {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b6b73;
}

/* Capacidad libre ("otra unidad") */
.cp-otra {
    display: none;
    margin-top: 14px;
    padding: 14px;
    border-radius: 13px;
    background: #fffbe8;
    border: 1px solid #ffe580;
}

.cp-otra.is-on {
    display: block;
}

.cp-otra-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 7px;
}

.cp-otra-row .cp-input {
    width: 110px;
}

.cp-otra-row span {
    font-size: 0.85rem;
    color: #6b6b73;
}

/* ===== SUBIR ARCHIVO ===== */
.cp-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 40px 22px;
    border: 2px dashed #d0d0d8;
    border-radius: 18px;
    background: #fafafb;
    text-align: center;
    cursor: pointer;
    transition: all 0.22s ease;
}

.cp-drop:hover,
.cp-drop.is-drag {
    border-color: #111;
    border-style: solid;
    background: #fff;
}

.cp-drop.is-drag {
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.28);
}

.cp-drop.is-lleno {
    padding: 24px 22px;
}

.cp-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cp-drop-ico {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #111;
    color: #ffcc00;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.cp-drop b {
    font-size: 1rem;
    font-weight: 800;
    color: #111;
}

.cp-drop small {
    font-size: 0.82rem;
    color: #6b6b73;
}

.cp-files {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 14px;
}

.cp-file {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid #e6e6ea;
    border-radius: 13px;
    background: #fff;
}

.cp-file-ico {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f3f3f5;
    color: #4a4a52;
    display: grid;
    place-items: center;
}

.cp-file-txt {
    flex: 1;
    min-width: 0;
}

.cp-file-txt b {
    display: block;
    font-size: 0.87rem;
    font-weight: 700;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-file-txt small {
    font-size: 0.75rem;
    color: #9a9aa3;
}

.cp-file-x {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: none;
    background: #f3f3f5;
    color: #6b6b73;
    cursor: pointer;
    transition: all 0.18s ease;
}

.cp-file-x:hover {
    background: #e03b3b;
    color: #fff;
}

/* ===== WHATSAPP DIRECTO ===== */
.cp-rapido {
    text-align: center;
    padding: 6px 0 4px;
}

.cp-rapido-ico {
    width: 66px;
    height: 66px;
    border-radius: 21px;
    background: #25D366;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.9rem;
    margin: 0 auto 16px;
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.32);
}

.cp-rapido .cp-step-desc {
    max-width: 46ch;
    margin: 6px auto 0;
}

/* ===== CHIPS (turnos y días) ===== */
.cp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.cp-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 1.5px solid #e0e0e6;
    border-radius: 100px;
    background: #fff;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 600;
    color: #4a4a52;
    transition: all 0.2s ease;
    user-select: none;
}

.cp-chip:hover {
    border-color: #111;
    color: #111;
}

.cp-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cp-chip i {
    font-size: 0.78rem;
    color: #b0b0b8;
    transition: color 0.2s ease;
}

.cp-chip-hora {
    font-size: 0.76rem;
    font-weight: 600;
    color: #9a9aa3;
    transition: color 0.2s ease;
}

.cp-chip:has(input:checked) {
    background: #111;
    border-color: #111;
    color: #fff;
}

.cp-chip:has(input:checked) i {
    color: #ffcc00;
}

.cp-chip:has(input:checked) .cp-chip-hora {
    color: rgba(255, 255, 255, 0.7);
}

.cp-chip:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.45);
}

/* Fallback para navegadores sin :has() */
.cp-chip.is-active {
    background: #111;
    border-color: #111;
    color: #fff;
}

.cp-chip.is-active i {
    color: #ffcc00;
}

.cp-chip.is-active .cp-chip-hora {
    color: rgba(255, 255, 255, 0.7);
}

.cp-chips--error .cp-chip {
    border-color: #e8a0a0;
}

/* ===== HORARIOS DE TURNOS ACTIVOS ===== */
.cp-horarios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 13px 14px;
    border-radius: 12px;
    background: #f3f3f5;
    border: 1px dashed #d8d8de;
}

.cp-horario-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: #4a4a52;
}

.cp-horario-nombre {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 138px;
    font-weight: 700;
    color: #111;
}

.cp-horario-nombre i {
    color: #9a9aa3;
    font-size: 0.8rem;
}

.cp-time {
    padding: 7px 10px;
    border: 1.5px solid #e0e0e6;
    border-radius: 9px;
    background: #fff;
    color: #111;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
}

.cp-time:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.28);
}

/* ===== PIE DE RUTA (mini resumen) ===== */
.cp-ruta-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 13px 18px;
    background: #f1f1f3;
    border-top: 1px solid #e6e6ea;
    font-size: 0.84rem;
    color: #4a4a52;
}

.cp-ruta-foot b {
    color: #111;
    font-weight: 800;
}

.cp-foot-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.cp-foot-item i {
    color: #9a9aa3;
    font-size: 0.8rem;
}

.cp-foot-vacio {
    color: #9a9aa3;
    font-style: italic;
}

/* ===== BOTÓN AGREGAR RUTA ===== */
.cp-add-ruta {
    width: 100%;
    margin-top: 16px;
    padding: 15px;
    border: 2px dashed #d0d0d8;
    border-radius: 14px;
    background: #fff;
    color: #4a4a52;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.22s ease;
}

.cp-add-ruta:hover {
    border-color: #111;
    border-style: solid;
    background: #111;
    color: #ffcc00;
}

/* ===== RESUMEN TOTAL ===== */
.cp-resumen {
    margin-top: 30px;
    border-radius: 18px;
    background: #111;
    padding: 24px;
    color: #fff;
}

.cp-resumen-titulo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffcc00;
    margin-bottom: 18px;
}

.cp-resumen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.cp-resumen-item {
    text-align: center;
    padding: 4px;
}

.cp-resumen-num {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    color: #ffcc00;
    letter-spacing: -0.02em;
}

.cp-resumen-label {
    display: block;
    margin-top: 7px;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.35;
}

.cp-resumen-nota {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.79rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.cp-resumen-nota i {
    color: #ffcc00;
    margin-top: 2px;
}

/* ===== VISTA PREVIA DEL MENSAJE ===== */
.cp-preview {
    margin-top: 18px;
    border: 1px solid #e6e6ea;
    border-radius: 14px;
    background: #fafafb;
    overflow: hidden;
}

.cp-preview>summary {
    padding: 14px 18px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    color: #33333a;
    display: flex;
    align-items: center;
    gap: 9px;
    list-style: none;
}

.cp-preview>summary::-webkit-details-marker {
    display: none;
}

.cp-preview>summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 0.7rem;
    color: #9a9aa3;
    transition: transform 0.25s ease;
}

.cp-preview[open]>summary::after {
    transform: rotate(180deg);
}

.cp-preview-body {
    padding: 0 18px 18px;
}

.cp-preview-texto {
    margin: 0;
    padding: 16px;
    border-radius: 11px;
    background: #fff;
    border: 1px solid #e6e6ea;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.65;
    color: #33333a;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow-y: auto;
}

/* ===== ACCIONES FINALES ===== */
.cp-acciones {
    margin-top: 26px;
}

.cp-btn-enviar {
    position: relative;
    width: 100%;
    padding: 19px 24px;
    border: none;
    border-radius: 14px;
    background: #25D366;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.32);
}

.cp-btn-enviar i {
    font-size: 1.3rem;
}

.cp-btn-enviar:hover {
    transform: translateY(-2px);
    background: #1eb959;
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.42);
}

.cp-btn-enviar:disabled {
    opacity: 0.75;
    cursor: default;
    transform: none;
}

.cp-btn-secundarios {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.cp-btn-sec {
    flex: 1 1 180px;
    padding: 13px 18px;
    border: 1.5px solid #e0e0e6;
    border-radius: 12px;
    background: #fff;
    color: #33333a;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.2s ease;
}

.cp-btn-sec:hover {
    border-color: #111;
    background: #111;
    color: #fff;
}

.cp-btn-sec i {
    font-size: 0.9rem;
}

.cp-nota-envio {
    margin-top: 14px;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.55;
    color: #6b6b73;
}

.cp-nota-envio i {
    color: #25D366;
}

/* ===== AVISO / TOAST ===== */
.cp-aviso {
    margin-top: 16px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 0.87rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cp-aviso--error {
    background: #fff1f1;
    border: 1px solid #f3c4c4;
    color: #b02525;
}

.cp-aviso--ok {
    background: #edfbf2;
    border: 1px solid #b9e9cc;
    color: #12703c;
}

.cp-borrador {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    padding: 11px 15px;
    border-radius: 11px;
    background: #f3f3f5;
    border: 1px solid #e6e6ea;
    font-size: 0.83rem;
    color: #4a4a52;
}

.cp-borrador button {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #111;
    font-family: inherit;
    font-size: 0.83rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* ===== ENLACE AL COTIZADOR DESDE EL CTA OSCURO ===== */
.cta-cotizador-link {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 16px;
    padding: 13px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 204, 0, 0.28);
    background: rgba(255, 204, 0, 0.07);
    color: #ffcc00;
    font-size: 0.88rem;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.cta-cotizador-link:hover {
    background: rgba(255, 204, 0, 0.14);
    border-color: rgba(255, 204, 0, 0.55);
    transform: translateY(-2px);
}

.cta-cotizador-link i {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.cta-cotizador-link b {
    display: block;
    color: #fff;
    font-weight: 700;
}

/* ===== ATAJO / NOSCRIPT ===== */
.cp-noscript {
    position: relative;
    z-index: 2;
    max-width: 620px;
    margin: 0 auto;
    padding: 26px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.6;
}

.cp-noscript a {
    color: #ffcc00;
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
    .cp-section {
        padding: 74px 16px 84px;
    }

    .cp-panel {
        padding: 26px 20px;
        border-radius: 20px;
    }

    .cp-grid {
        grid-template-columns: 1fr;
    }

    .cp-ruta-od {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cp-od-arrow {
        display: none;
    }

    .cp-resumen-num {
        font-size: 1.6rem;
    }

    .cp-vias {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 26px;
    }

    .cp-sugerencia {
        flex-wrap: wrap;
    }

    .cp-sug-accion {
        width: 100%;
    }

    .cp-sug-accion .cp-stepper {
        flex: 1;
        width: auto;
    }
}

@media (max-width: 560px) {
    .cp-ruta-head {
        flex-wrap: wrap;
        padding: 12px 14px;
    }

    .cp-ruta-nombre {
        order: 3;
        flex-basis: 100%;
    }

    .cp-ruta-acciones {
        margin-left: auto;
    }

    .cp-ruta-body {
        padding: 16px 14px;
    }

    .cp-step-head {
        gap: 11px;
    }

    .cp-chip {
        padding: 9px 13px;
        font-size: 0.82rem;
    }

    .cp-horario-nombre {
        min-width: 100%;
    }

    .cp-resumen-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cp-btn-sec {
        flex-basis: 100%;
    }

    .cp-units {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .cp-unit {
        padding: 12px 8px 10px;
    }

    .cp-unit-ico {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .cp-units-head {
        gap: 8px;
    }

    .cp-tblock-total {
        margin-left: 0;
        flex-basis: 100%;
    }

    .cp-drop {
        padding: 30px 16px;
    }

    .cp-via {
        padding: 13px 14px;
    }
}

/* Títulos y botones en Montserrat, como el resto del sitio */
.cp-title,
.cp-badge,
.cp-step-title,
.cp-step-num,
.cp-via-txt b,
.cp-ruta-num,
.cp-unit-nombre,
.cp-tblock-nombre,
.cp-resumen-titulo,
.cp-resumen-num,
.cp-sug-text strong,
.cp-drop b,
.cp-file-txt b,
.cp-btn-enviar,
.cp-btn-sec,
.cp-add-ruta,
.cp-sug-btn {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}
