* { box-sizing: border-box; }
body {
    font-family: system-ui, -apple-system, sans-serif; margin: 0; background: #f5f6f8;
    color: #222; padding: 24px 16px;
}

.contenedor-agendamiento { max-width: 760px; margin: 0 auto; }
.contenedor-agendamiento h1 { color: var(--marca-primario, #1a3d5c); font-size: 26px; margin-bottom: 20px; }
.calendario-logo.marca-logo { max-height: 50px; max-width: 220px; display: block; margin-bottom: 10px; }
.calendario-logo.marca-nombre-texto { display: none; } /* el <h1> ya dice "Agenda tu hora", no repetir el nombre */
.contenedor-agendamiento h2 { color: var(--marca-primario, #1a3d5c); font-size: 18px; margin: 28px 0 12px; }

.paso {
    background: white; border: 1px solid #e0e0e0; border-radius: 8px;
    padding: 18px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 14px;
}
.paso label {
    display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #555;
    flex: 1 1 160px;
}
.paso select, .paso input {
    padding: 8px 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px;
}
.paso select:disabled, .paso input:disabled { background: #f0f0f0; color: #999; }

#paso-slots { display: block; }
.grilla-slots { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.slot-btn {
    padding: 10px 14px; border: 1px solid var(--marca-primario, #1a3d5c); border-radius: 6px;
    background: white; color: var(--marca-primario, #1a3d5c); cursor: pointer; font-size: 14px; min-width: 68px;
    transition: background 0.15s, color 0.15s;
}
.slot-btn:hover:not(:disabled) { background: #eaf1f8; }
.slot-btn.seleccionado { background: var(--marca-primario, #1a3d5c); color: white; }
.slot-btn.slot-ocupado { border-color: #ddd; color: #bbb; cursor: not-allowed; background: #f7f7f7; }

#mensaje-sin-cupo { background: #fff6e5; border: 1px solid #f0d99a; padding: 14px; border-radius: 6px; }
#mensaje-sin-cupo button {
    margin-top: 8px; padding: 8px 14px; background: var(--marca-primario, #1a3d5c); color: white;
    border: none; border-radius: 5px; cursor: pointer;
}

#paso-datos-cliente {
    background: white; border: 1px solid #e0e0e0; border-radius: 8px; padding: 18px;
    display: flex; flex-direction: column; gap: 10px; max-width: 400px; position: relative;
}
#paso-datos-cliente label {
    display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #555;
    flex: none; /* anula el flex-grow heredado de .paso label, que estiraba cada
                   campo para llenar todo el alto del contenedor en columna */
}
#paso-datos-cliente input { padding: 8px 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px; }
#paso-datos-cliente textarea {
    padding: 8px 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px;
    font-family: inherit; resize: vertical; min-height: 60px;
}

/* Teléfono: prefijo +569 fijo pegado al campo (solo se escriben 8 dígitos) */
.campo-telefono { display: flex; align-items: stretch; }
.prefijo-telefono {
    display: flex; align-items: center; padding: 0 10px; background: #eef1f5; color: #444;
    border: 1px solid #ccc; border-right: none; border-radius: 5px 0 0 5px; font-size: 14px;
}
#paso-datos-cliente .campo-telefono input { flex: 1; min-width: 0; border-radius: 0 5px 5px 0; }
#btn-cerrar-datos-cliente {
    position: absolute; top: 12px; right: 14px; background: none; border: none;
    font-size: 20px; cursor: pointer; color: #888; line-height: 1;
}
#btn-cerrar-datos-cliente:hover { color: #333; }
#btn-confirmar-reserva {
    padding: 10px 16px; background: var(--marca-primario, #1a3d5c); color: white; border: none;
    border-radius: 5px; cursor: pointer; font-size: 14px; margin-top: 6px;
}
#btn-confirmar-reserva:disabled { background: #9db3c4; cursor: not-allowed; }

.oculto { display: none !important; }

#mensaje-estado { padding: 12px 16px; border-radius: 6px; margin-top: 16px; font-size: 14px; }
.estado-exito { background: #d7f4de; color: #16693a; border: 1px solid #a6e6bb; }
.estado-error { background: #fddede; color: #a8271b; border: 1px solid #f5b3ac; }

@media (max-width: 480px) {
    .paso { flex-direction: column; }
    .paso label { flex: 1 1 auto; }
}

/* Vista "Gestionar mi reserva" */
.acciones-gestionar { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.acciones-gestionar button {
    padding: 9px 16px; border-radius: 5px; cursor: pointer; font-size: 14px; border: 1px solid var(--marca-primario, #1a3d5c);
}
#btn-mostrar-reagendar { background: var(--marca-primario, #1a3d5c); color: white; }
#btn-cancelar-reserva { background: white; color: #a8271b; border-color: #e59a8e; }
#zona-reagendar { margin-top: 14px; }
#zona-reagendar label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #555; margin-bottom: 10px; }
#zona-reagendar input { padding: 8px 10px; border: 1px solid #ccc; border-radius: 5px; }

/* Vista "Resultado del pago" */
.ayuda-pago { font-size: 13px; color: #666; background: #f7f7f7; padding: 12px 14px; border-radius: 6px; margin-top: 10px; }

/* Reclamar cupo de lista de espera: formulario (motivo + forma de pago) */
#contenido-oferta label {
    display: flex; flex-direction: column; gap: 4px; margin-top: 14px; font-size: 13px; color: #555;
}
#contenido-oferta textarea, #contenido-oferta select {
    padding: 8px 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 14px; font-family: inherit;
}
#contenido-oferta textarea { resize: vertical; min-height: 60px; }
#btn-reclamar {
    margin-top: 16px; width: 100%; padding: 11px 16px; border: none; border-radius: 6px; cursor: pointer;
    background: var(--marca-primario, #1a3d5c); color: white; font-size: 14px; font-weight: 600;
}
#btn-reclamar:hover { background: var(--marca-primario-mas-oscuro, #14324c); }
#btn-reclamar:disabled { opacity: .6; cursor: not-allowed; }
#contenido-oferta #mensaje-estado { margin-top: 12px; }

/* Lista de espera: formulario propio (antes eran ventanas emergentes del navegador) */
#paso-lista-espera { flex-direction: column; flex-wrap: nowrap; gap: 10px; max-width: 400px; position: relative; }
#paso-lista-espera h2 { margin: 0; }
#paso-lista-espera .ayuda-pago { margin: 0; }
#form-lista-espera { display: flex; flex-direction: column; gap: 10px; }
#form-lista-espera label { flex: none; }
#form-lista-espera .campo-telefono input { flex: 1; min-width: 0; border-radius: 0 5px 5px 0; }
.btn-cerrar-paso {
    position: absolute; top: 12px; right: 14px; background: none; border: none;
    font-size: 20px; cursor: pointer; color: #888; line-height: 1;
}
.btn-cerrar-paso:hover { color: #333; }
#btn-enviar-lista-espera {
    padding: 10px 16px; background: var(--marca-primario, #1a3d5c); color: white; border: none;
    border-radius: 5px; cursor: pointer; font-size: 14px; font-weight: 600; margin-top: 4px;
}
#btn-enviar-lista-espera:hover { background: var(--marca-primario-mas-oscuro, #14324c); }
#btn-enviar-lista-espera:disabled { opacity: .6; cursor: not-allowed; }

/* Mascota en el formulario de reserva */
.grupo-mascota { border: 1px solid #e2e6ea; border-radius: 8px; padding: 10px 12px 4px; margin: 6px 0 10px; }
.grupo-mascota legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.grupo-mascota select { width: 100%; }
