/* =========================================
   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;
    position: relative; /* ⭐ FIX CRÍTICO */
    z-index: 0;         /* ⭐ FIX CRÍTICO */
}


/* =========================================
   TÍTULO
========================================= */
h2 {
    font-size: clamp(22px, 5vw, 26px);
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

h2::after {
    content: "🍽️";
    display: block;
    font-size: 18px;
    margin-top: 6px;
}

/* =========================================
   FORMULARIO 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;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   INPUTS Y SELECT (BASE)
========================================= */
#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;
}

#reservaForm input::placeholder {
    color: #8e8e93;
}

#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);
}

/* =========================================
   ESTILO UNIFICADO PARA FECHA Y HORA
========================================= */

/* Color general */
#reservaForm input[type="date"],
#reservaForm select {
    color: #7a7a7a;
    font-weight: 500;
    line-height: 46px;
}

/* INPUT DATE */
#reservaForm input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    text-align: left;
    text-align-last: left;

    padding-left: 14px;
    padding-right: 42px;

    background-color: #fafafa;
    border-radius: 12px;

    /* flecha personalizada (solo móvil/tablet) */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237a7a7a'><path d='M5.5 7.5L10 12l4.5-4.5'/></svg>");
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: right 14px center;
}

/* Texto interno del date */
#reservaForm input[type="date"]::-webkit-datetime-edit,
#reservaForm input[type="date"]::-webkit-datetime-edit-fields-wrapper,
#reservaForm input[type="date"]::-webkit-datetime-edit-text,
#reservaForm input[type="date"]::-webkit-datetime-edit-month-field,
#reservaForm input[type="date"]::-webkit-datetime-edit-day-field,
#reservaForm input[type="date"]::-webkit-datetime-edit-year-field {
    color: #7a7a7a;
    text-align: left;
}

/* Icono nativo */
#reservaForm input[type="date"]::-webkit-calendar-picker-indicator {
    filter: brightness(0.55);
    opacity: 0.9;
    cursor: pointer;
}

/* SELECT HORA */
#reservaForm select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    text-align: left;
    text-align-last: left;

    padding-right: 42px;

    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237a7a7a'><path d='M5.5 7.5L10 12l4.5-4.5'/></svg>");
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: right 14px center;
}

/* Hover */
#reservaForm input[type="date"]:hover,
#reservaForm select:hover {
    color: #3f3f3f;
}

/* Focus */
#reservaForm input[type="date"]:focus,
#reservaForm select:focus {
    color: #3f3f3f;
}

/* =========================================
   ESCRITORIO: ocultar flecha personalizada
========================================= */
@media (min-width: 1024px) {
    #reservaForm input[type="date"] {
        background-image: none !important;
        padding-right: 14px !important;
    }

    #reservaForm input[type="date"]::-webkit-calendar-picker-indicator {
        opacity: 1 !important;
        filter: brightness(0.55);
    }
}

/* =========================================
   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;
}

@media (hover: hover) {
    #reservaForm button:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(124, 124, 255, 0.45);
        filter: brightness(1.05);
    }
}

#reservaForm button:active {
    transform: translateY(0);
}

/* =========================================
   MENSAJE
========================================= */
#mensaje {
    margin: 0 0 10px 0;
    font-size: clamp(13px, 4vw, 14px);
    text-align: center;
    color: #34c759;
}

/* =========================================
   MODAL
========================================= */
.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-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;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.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);
}

.modal-content h2 {
    font-size: clamp(20px, 5vw, 22px);
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
}

.modal-content h2::after {
    content: "⏰";
    display: block;
    font-size: 16px;
    margin-top: 6px;
}

#modalMensaje {
    font-size: 14px;
    color: #6e6e73;
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.4;
}

#modalSugerenciasLista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

#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);
}

.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);
}

/* =========================================
   RESPONSIVE
========================================= */
@media (min-width: 768px) {
    body { padding: 40px; }
}

@media (min-width: 1200px) {
    #reservaForm { max-width: 420px; }
}
