/* ============================================================
   LON Limpia — Formulario de presupuesto (/presupuesto)
   Usa las variables y tipografías del sitio (main.css)
   ============================================================ */

/* El atributo hidden debe ocultar siempre, aunque haya display:flex/grid */
[hidden] { display: none !important; }
.presu-hero {
    background: linear-gradient(135deg, var(--navy, #0a1f4a) 0%, var(--blue-800, #003585) 100%);
    color: #fff;
    padding: calc(var(--header-h, 78px) + 48px) 20px 56px;
    text-align: center;
}
.presu-hero-inner { max-width: 720px; margin: 0 auto; }
.presu-hero h1 {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.1;
}
.presu-hero p { font-size: clamp(15px, 2.4vw, 18px); opacity: .9; margin: 0; line-height: 1.5; }

.presu-wrap { max-width: 760px; margin: -32px auto 64px; padding: 0 16px; }
.presu-form {
    background: var(--paper, #fff);
    border-radius: var(--radius-lg, 24px);
    box-shadow: var(--shadow-lg, 0 18px 50px rgba(10,31,74,.18));
    padding: clamp(20px, 4vw, 40px);
}
.presu-section { padding: 22px 0; border-bottom: 1px solid var(--gray-200, #e6ecf5); }
.presu-section:first-child { padding-top: 4px; }
.presu-section:last-of-type { border-bottom: none; }
.presu-section h2 {
    font-family: var(--font-display, sans-serif);
    font-size: 19px; font-weight: 700; color: var(--navy, #0a1f4a);
    margin: 0 0 18px; display: flex; align-items: center; gap: 12px;
}
.presu-num {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
    background: var(--blue-600, #0061e5); color: #fff;
    font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

.presu-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.presu-field:last-child { margin-bottom: 0; }
.presu-field label { font-size: 13.5px; font-weight: 600; color: var(--gray-700, #3a425a); }
.presu-field input, .presu-field select, .presu-field textarea {
    padding: 12px 14px; border: 1.5px solid var(--gray-300, #cdd5e3); border-radius: var(--radius-sm, 10px);
    font-size: 15px; font-family: var(--font-body, sans-serif); background: #fff; width: 100%; box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.presu-field input:focus, .presu-field select:focus, .presu-field textarea:focus {
    outline: none; border-color: var(--blue-600, #0061e5); box-shadow: 0 0 0 4px rgba(0, 97, 229, .12);
}
.presu-field textarea { resize: vertical; min-height: 72px; }
.presu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }

.presu-sub { margin-top: 16px; }
.presu-sublabel { display: block; font-size: 13.5px; font-weight: 600; color: var(--gray-700, #3a425a); margin-bottom: 10px; }
.presu-options { display: flex; flex-direction: column; gap: 9px; }
.presu-options-multi { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.presu-opt {
    display: flex; align-items: center; gap: 11px; padding: 12px 14px;
    border: 1.5px solid var(--gray-200, #e6ecf5); border-radius: var(--radius-sm, 10px);
    cursor: pointer; font-size: 14.5px; color: var(--ink, #0b1530); transition: border-color .15s, background .15s;
}
.presu-opt:hover { border-color: var(--blue-300, #7ec0ff); }
.presu-opt input { width: 18px; height: 18px; accent-color: var(--blue-600, #0061e5); flex-shrink: 0; cursor: pointer; }
.presu-opt:has(input:checked) { border-color: var(--blue-600, #0061e5); background: var(--blue-50, #f0f7ff); }

.presu-visit { display: flex; gap: 10px; flex-wrap: wrap; }
.presu-visit-opt {
    flex: 1; min-width: 130px; display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px; border: 1.5px solid var(--gray-200, #e6ecf5); border-radius: var(--radius-sm, 10px);
    cursor: pointer; font-size: 14.5px; font-weight: 600; color: var(--gray-700, #3a425a); transition: border-color .15s, background .15s;
}
.presu-visit-opt input { accent-color: var(--blue-600, #0061e5); }
.presu-visit-opt:has(input:checked) { border-color: var(--blue-600, #0061e5); background: var(--blue-50, #f0f7ff); color: var(--navy, #0a1f4a); }

.presu-dates { margin-top: 2px; }
.presu-cal { max-width: 400px; }
.presu-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.presu-cal-month { font-weight: 700; font-size: 16px; color: var(--navy, #0a1f4a); }
.presu-cal-arrow { width: 38px; height: 38px; border: 1.5px solid var(--gray-200, #e6ecf5); background: #fff; border-radius: 10px; cursor: pointer; font-size: 20px; color: var(--navy, #0a1f4a); line-height: 1; display: flex; align-items: center; justify-content: center; }
.presu-cal-arrow:hover:not(:disabled) { border-color: var(--blue-400, #3d9bff); }
.presu-cal-arrow:disabled { opacity: .3; cursor: not-allowed; }
.presu-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.presu-cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--gray-400, #9aa6bc); padding: 4px 0; }
.presu-cal-day { aspect-ratio: 1 / 1; min-height: 42px; display: flex; align-items: center; justify-content: center; border: 1.5px solid transparent; border-radius: 10px; background: var(--gray-100, #f3f6fb); font-size: 14px; font-weight: 600; color: var(--navy, #0a1f4a); cursor: pointer; font-family: inherit; padding: 0; }
button.presu-cal-day:hover { border-color: var(--blue-400, #3d9bff); background: var(--blue-50, #f0f7ff); }
.presu-cal-day.active { background: var(--blue-600, #0061e5); color: #fff; border-color: var(--blue-600, #0061e5); }
.presu-cal-day.today { border-color: var(--blue-400, #3d9bff); }
.presu-cal-day.is-off { background: transparent; color: var(--gray-300, #cdd5e3); cursor: not-allowed; border: none; }
.presu-cal-blank { }
.presu-times { display: flex; flex-wrap: wrap; gap: 8px; }
.presu-time {
    padding: 9px 15px; border: 1.5px solid var(--gray-200, #e6ecf5); border-radius: 999px;
    background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--gray-700, #3a425a);
    font-family: var(--font-body, sans-serif); transition: border-color .15s, background .15s;
}
.presu-time:hover { border-color: var(--blue-300, #7ec0ff); }
.presu-time.active { border-color: var(--blue-600, #0061e5); background: var(--blue-600, #0061e5); color: #fff; }
.presu-muted { font-size: 14px; color: var(--gray-500, #6b7691); }

.presu-error {
    margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius-sm, 10px);
    background: #fef2f2; border: 1px solid #fecaca; color: var(--danger, #dc2626); font-size: 14px; font-weight: 500;
}
.presu-submit { width: 100%; margin-top: 22px; font-size: 16px; padding: 15px; }
.presu-legal { margin: 14px 0 0; font-size: 12px; color: var(--gray-400, #9aa6bc); text-align: center; line-height: 1.5; }

.presu-done { padding: 20px 0; }
.presu-done-card {
    background: var(--paper, #fff); border-radius: var(--radius-lg, 24px); box-shadow: var(--shadow-lg);
    padding: clamp(28px, 5vw, 48px); text-align: center;
}
.presu-done-ico {
    width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
    background: var(--success, #16a34a); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center;
}
.presu-done-card h2 { font-family: var(--font-display, sans-serif); font-size: 26px; color: var(--navy, #0a1f4a); margin: 0 0 12px; }
.presu-done-card p { font-size: 15px; color: var(--gray-700, #3a425a); margin: 0 0 10px; line-height: 1.5; }
.presu-estimate { font-size: 18px !important; color: var(--navy, #0a1f4a) !important; }
.presu-estimate strong { color: var(--blue-600, #0061e5); }
.presu-done-note { font-size: 13px !important; color: var(--gray-500, #6b7691) !important; }
.presu-done-card .btn { margin-top: 18px; }

@media (max-width: 560px) {
    .presu-grid, .presu-options-multi { grid-template-columns: 1fr; }
    .presu-visit-opt { min-width: 0; }
}

/* Alcance del servicio (días/horas a contratar) */
.presu-toggle2 { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.presu-tg { flex: 1; min-width: 140px; padding: 14px; border: 1.5px solid var(--gray-200, #e6ecf5); border-radius: var(--radius-sm, 10px); background: #fff; cursor: pointer; font-size: 14.5px; font-weight: 700; color: var(--gray-700, #3a425a); font-family: inherit; transition: border-color .15s, background .15s, color .15s; }
.presu-tg:hover { border-color: var(--blue-300, #7ec0ff); }
.presu-tg.active { background: var(--blue-600, #0061e5); border-color: var(--blue-600, #0061e5); color: #fff; }
.presu-radios { display: flex; gap: 22px; margin-bottom: 16px; flex-wrap: wrap; }
.presu-radios label { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink, #0b1530); cursor: pointer; }
.presu-radios input { accent-color: var(--blue-600, #0061e5); width: 17px; height: 17px; }
.presu-hours-field { margin-top: 16px; max-width: 260px; }

/* ---- Alcance del servicio: calendario + resumen ---- */
.presu-scope-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 256px); gap: 18px; align-items: start; }
.presu-scope-side { background: var(--gray-50, #f8fafd); border: 1px solid var(--gray-200, #e6ecf5); border-radius: var(--radius-sm, 10px); padding: 14px; }
.presu-summary-title { display: block; font-size: 12.5px; font-weight: 700; color: var(--navy, #0a1f4a); margin-bottom: 10px; }
.presu-summary { display: flex; flex-direction: column; gap: 10px; }
.presu-sum-row { background: #fff; border: 1px solid var(--gray-200, #e6ecf5); border-radius: 9px; padding: 9px 10px; }
.presu-sum-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.presu-sum-date { font-size: 13px; font-weight: 600; color: var(--navy, #0a1f4a); }
.presu-sum-del { border: none; background: transparent; color: var(--gray-400, #9aa6bc); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.presu-sum-del:hover { color: var(--danger, #dc2626); }
.presu-sum-times { display: flex; align-items: center; gap: 6px; }
.presu-sum-times input[type=time] { padding: 6px 8px; border: 1.5px solid var(--gray-200, #e6ecf5); border-radius: 8px; font-size: 13px; font-family: inherit; flex: 1; min-width: 0; }
.presu-sum-times span { font-size: 12px; color: var(--gray-500, #6b7691); }
/* ---- Recurrente ---- */
.presu-mini-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--gray-700, #3a425a); margin: 14px 0 8px; }
.presu-weekdays { display: flex; gap: 6px; flex-wrap: wrap; }
.presu-weekdays button { width: 42px; height: 42px; border: 1.5px solid var(--gray-200, #e6ecf5); background: #fff; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--navy, #0a1f4a); cursor: pointer; font-family: inherit; }
.presu-weekdays button:hover { border-color: var(--blue-400, #3d9bff); }
.presu-weekdays button.active { background: var(--blue-600, #0061e5); color: #fff; border-color: var(--blue-600, #0061e5); }
@media (max-width: 620px) { .presu-scope-layout { grid-template-columns: 1fr; } }

/* ============================================================
   Mejoras del formulario: combo de provincias + selector de horas
   ============================================================ */
/* ---- Provincia: escritura libre + desplegable ---- */
.presu-combo { position: relative; }
.presu-combo-list {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
    background: #fff; border: 1.5px solid var(--gray-200, #e6ecf5); border-radius: var(--radius-sm, 10px);
    box-shadow: var(--shadow-md, 0 8px 24px rgba(10, 31, 74, .12)); max-height: 244px; overflow-y: auto; padding: 6px;
}
.presu-combo-opt {
    padding: 9px 12px; border-radius: 8px; font-size: 14.5px; color: var(--ink, #0b1530); cursor: pointer;
    transition: background .12s, color .12s;
}
.presu-combo-opt:hover, .presu-combo-opt.active { background: var(--blue-50, #f0f7ff); color: var(--blue-700, #0047b3); }
.presu-combo-list::-webkit-scrollbar { width: 8px; }
.presu-combo-list::-webkit-scrollbar-thumb { background: var(--gray-300, #cdd5e3); border-radius: 8px; }

/* ---- Horas del servicio: selector propio (sustituye al input nativo) ---- */
.presu-time-select {
    flex: 1; min-width: 0; padding: 8px 30px 8px 12px; border: 1.5px solid var(--gray-200, #e6ecf5);
    border-radius: 9px; font-size: 14px; font-family: inherit; color: var(--navy, #0a1f4a); background-color: #fff;
    font-weight: 600; cursor: pointer; appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7691' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center; transition: border-color .15s, box-shadow .15s;
}
.presu-time-select:hover { border-color: var(--blue-300, #7ec0ff); }
.presu-time-select:focus { outline: none; border-color: var(--blue-600, #0061e5); box-shadow: 0 0 0 3px rgba(0, 97, 229, .12); }
/* ---- Campo de fecha nativo (Servicio fijo) ---- */
.presu-field input[type="date"] { cursor: pointer; color: var(--navy, #0a1f4a); font-weight: 600; }
.presu-field input[type="date"]:hover { border-color: var(--blue-300, #7ec0ff); }
.presu-field input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer; padding: 5px; border-radius: 7px; opacity: .65; transition: opacity .15s, background-color .15s;
}
.presu-field input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; background-color: var(--blue-50, #f0f7ff); }
/* ---- Campo de hora (texto libre "HH:MM", SIN desplegable nativo del sistema operativo) ---- */
.presu-field input.presu-time-text {
    cursor: text; color: var(--navy, #0a1f4a); font-weight: 600; letter-spacing: .5px; padding-right: 40px;
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7691' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 14'/%3E%3C/svg%3E");
}
.presu-field input.presu-time-text:hover { border-color: var(--blue-300, #7ec0ff); }
.presu-field input.presu-time-text:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230061e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 14'/%3E%3C/svg%3E");
}


/* Fase 2 — botones del PDF en la confirmación */
.presu-done-pdf { margin: 18px 0 6px !important; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.presu-done-pdf .btn { margin-top: 0; }
.presu-pdf-dl { font-size: 14px; color: var(--blue-600, #0061e5); text-decoration: underline; cursor: pointer; }
.presu-pdf-dl:hover { color: var(--navy, #0a1f4a); }
.presu-done-home { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--gray-500, #6b7691); text-decoration: underline; }
.presu-done-home:hover { color: var(--navy, #0a1f4a); }

/* Descuento cliente nuevo en la confirmación */
.presu-discount { font-size: 15px !important; color: #0a7d36 !important; background: #eafaf0; border-radius: 8px; padding: 8px 14px; display: inline-block; }
.presu-discount strong { color: #0a7d36; }

/* ---- Sub-variantes en el formulario (tarifa y extras) ---- */
.presu-subvar { margin: 8px 0 4px 6px; padding-left: 12px; border-left: 2px solid var(--blue-200, #cfe2ff); }
.presu-subvar-t { font-size: 13px; color: #5a6066; margin: 6px 0 4px; }
.presu-opt-sm { padding: 8px 12px; font-size: 14px; }
.presu-extra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.presu-extra .presu-opt { flex: 1 1 auto; }
.presu-exvar, .presu-exqty { padding: 9px 11px; border: 1px solid var(--line, #e3e7ec); border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; max-width: 220px; }
.presu-exqty { max-width: 120px; }
.presu-exvar:focus { outline: none; border-color: var(--blue, #0061e5); box-shadow: 0 0 0 3px rgba(0,97,229,.12); }

.presu-exlink { display:inline-block; margin-left:10px; font-size:12.5px; color:#0061e5; font-weight:600; background:#eef5ff; border:1px solid #cfe2ff; border-radius:8px; padding:4px 10px; }
