/* Reset base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Fondo general */
body {
    min-height: 100vh;
    background: linear-gradient(160deg, #ffffff 0%, #f4f4f6 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #1d1d1f;
    padding: 20px;
}

/* Título */
h2 {
    font-size: clamp(22px, 5vw, 26px);
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

/* Detalle divertido */
h2::after {
    content: "🍽️";
    display: block;
    font-size: 18px;
    margin-top: 6px;
}

/* Formulario estilo tarjeta */
#reservaForm {
    background: #ffffff;
    width: 100%;
    max-width: 380px;
    padding: clamp(24px, 5vw, 35px) clamp(22px, 5vw, 40px);
    border-radius: 18px;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.08),
        0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeUp 0.6s ease;
}


.mensaje-exito {
  background: #e8f9f0;
  border-left: 6px solid #28a745;
  padding: 15px 20px;
  margin-top: 15px;
  border-radius: 6px;
  color: #155724;
  font-size: 1.1em;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.4s ease;
}

.mensaje-exito.mostrar {
  opacity: 1;
  transform: translateY(0);
}


.mensaje-centro {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #e8f9f0;
  border-left: 6px solid #28a745;
  padding: 20px 30px;
  border-radius: 10px;
  color: #155724;
  font-size: 1.3em;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  z-index: 9999;
  text-align: center;
  max-width: 80%;
}
.mensaje-centro.mostrar {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}



/* Animación */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs y select */
#reservaForm input,
#reservaForm select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    font-size: clamp(14px, 4vw, 15px);
    background: #fafafa;
    transition: 
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

/* Placeholder */
#reservaForm input::placeholder {
    color: #8e8e93;
}

/* Focus */
#reservaForm input:focus,
#reservaForm select:focus {
    outline: none;
    background: #ffffff;
    border-color: #7c7cff;
    box-shadow: 0 0 0 3px rgba(124, 124, 255, 0.18);
}

/* Botón */
#reservaForm button {
    margin-top: 10px;
    height: 48px;
    width: 100%;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #7c7cff, #5ac8fa);
    color: #ffffff;
    font-size: clamp(15px, 4vw, 16px);
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(124, 124, 255, 0.35);
    transition: 
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

/* Hover solo en pantallas grandes */
@media (hover: hover) {
    #reservaForm button:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(124, 124, 255, 0.45);
        filter: brightness(1.05);
    }
}

/* Click */
#reservaForm button:active {
    transform: translateY(0);
}

/* Mensaje */
#mensaje {
    margin: 0px 0px 10px 0px;
    font-size: clamp(13px, 4vw, 14px);
    text-align: center;
    color: #34c759;
}


/* Ajuste elegante de la flecha del select (hora) */
#reservaForm select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238e8e93'><path d='M5.5 7.5L10 12l4.5-4.5'/></svg>");
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: right 14px center;
    padding-right: 42px;
}



/* ============================
   MODAL - Fondo
============================ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

/* ============================
   MODAL - Contenido
============================ */
.modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: clamp(24px, 5vw, 36px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.18),
        0 6px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    animation: modalPop 0.35s ease;
}

/* Animación de entrada */
@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================
   BOTÓN CERRAR (X)
============================ */
.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 22px;
    color: #8e8e93;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
    color: #1d1d1f;
    transform: scale(1.1);
}

/* ============================
   TÍTULO DEL MODAL
============================ */
.modal-content h2 {
    font-size: clamp(20px, 5vw, 22px);
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
}

/* Emoji sutil */
.modal-content h2::after {
    content: "⏰";
    display: block;
    font-size: 16px;
    margin-top: 6px;
}

/* ============================
   TEXTO DEL MODAL
============================ */
#modalMensaje {
    font-size: 14px;
    color: #6e6e73;
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.4;
}

/* ============================
   LISTA DE SUGERENCIAS
============================ */
#modalSugerenciasLista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}


/* Botones/horarios sugeridos */
#modalSugerenciasLista button {
    height: 42px;
    border-radius: 12px;
    border: 1px solid #d2d2d7;
    background: #fafafa;
    cursor: pointer;
    font-size: 14px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

#modalSugerenciasLista button:hover {
    background: #ffffff;
    border-color: #7c7cff;
    transform: translateY(-1px);
}

/* ============================
   BOTÓN CANCELAR
============================ */
.modal-btn-cancelar {
    width: 100%;
    height: 46px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #ff6b6b, #ff9f9f);
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(255, 107, 107, 0.35);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.modal-btn-cancelar:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(255, 107, 107, 0.45);
}

.modal-btn-cancelar:active {
    transform: translateY(0);
}


/* Tablets */
@media (min-width: 768px) {
    body {
        padding: 40px;
    }
}

/* Pantallas grandes */
@media (min-width: 1200px) {
    #reservaForm {
        max-width: 420px;
    }
}
