/* Importamos la fuente 'Nunito' desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

/* --- Estilos Generales y Fondo Animado --- */
body {
    margin: 0;
    font-family: 'Nunito', Tahoma, Geneva, Verdana, sans-serif; /* Nueva tipografía romántica */
    background: linear-gradient(-45deg, #FF9137, #FFFC8C, #FFCC4D, #70FFD2);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    color: #2c3e50;
}

/* Animación del fondo */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#app-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    box-sizing: border-box;
}

/* --- Tarjetas (Efecto Glassmorphism) --- */
.card {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 45px 30px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.card.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

h1, h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 700;
}

p {
    color: #546e7a;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* --- Estilos Generales de Botones --- */
button {
    font-family: 'Nunito', sans-serif; /* Forzamos la fuente bonita en los botones */
    font-size: 1.15rem; /* Un pelín más grandes para que sean fáciles de tocar */
    padding: 14px 24px;
    margin: 10px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 800; /* Letra gordita y amigable */
    letter-spacing: 0.5px; /* Un poco de respiración entre letras */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* =========================================
   ESTILOS DE BOTONES Y LAYOUT FLEX
   ========================================= */

/* --- Contenedor de la primera pregunta --- */
.buttons {
    display: flex;
    gap: 15px;
    width: 100%;
}

/* --- Botones Sí y No (Estado Inicial 50/50) --- */
#btn-yes, #btn-no {
    flex: 1;
    width: 100%; 
    margin: 0;
}

/* El gran protagonista */
#btn-yes {
    background: #FF477E; /* Rosa Frambuesa vibrante */
    color: white;
    transition: all 0.4s ease;
}

/* El patito feo (Botón No) */
#btn-no {
    background: #F1F5F9; /* Gris nube aburrido */
    color: #64748B; /* Texto gris azulado discreto */
    transition: top 0.2s ease, left 0.2s ease, transform 0.2s ease;
    z-index: 999;
}

/* =========================================
   CONTENEDOR DE OPCIONES (COMIDA Y PLAN)
   ========================================= */
.options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Sustituye el 1fr 1fr previo */
    gap: 15px;
    width: 100%;
    margin-bottom: 10px;
}

/* --- Botones de Opciones y Submit --- */
.option-btn, #btn-submit {
    background: #FF477E;
    color: white;
    width: 100%;
    min-width: 0; /* Permite que el botón se comprima si es necesario */
    margin: 0;
    padding: 14px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
}

#btn-submit {
    margin-top: 15px;
    box-shadow: 0 6px 20px rgba(255, 71, 126, 0.4); /* Sombra rosa suave para destacar el final */
}

/* --- Efectos Hover (Al pasar el cursor) --- */
#btn-yes:hover, .option-btn:hover, #btn-submit:hover {
    background: #E5386B; /* Rosa Frambuesa más oscuro */
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 71, 126, 0.35);
}

/* --- Formularios --- */
form {
    text-align: left;
}

label {
    font-size: 0.95rem;
    color: #546e7a;
    margin-bottom: 8px;
    display: block;
    font-weight: 600; /* Un poco más de peso para que destaque elegantemente */
}

/* Estilos base para el input de Fecha y el select de Hora */
input, select {
    width: 100%;
    padding: 14px 18px; /* Mejoramos el espacio interno (respiración) */
    margin-bottom: 20px;
    border: 2px solid #dfe4ea;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit; /* Heredamos la misma tipografía bonita del resto de la app */
    color: #2c3e50;
    background-color: rgba(255, 255, 255, 0.9); /* Fondo ligeramente translúcido */
    box-sizing: border-box;
    transition: all 0.3s ease;
    cursor: pointer;
    
    /* EL TRUCO MAGISTRAL: Quitamos los estilos aburridos por defecto del OS/Navegador */
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Flecha personalizada para el Selector de Hora */
select {
    /* Inyectamos una flecha SVG color coral (#ff6b81) para que haga match con tus botones */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff6b81' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* Personalización del ícono del Calendario */
input[type="date"]::-webkit-calendar-picker-indicator {
    background-color: transparent;
    cursor: pointer;
    opacity: 0.5; /* Lo hacemos sutil por defecto */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1; /* Se ilumina al pasar el mouse */
    transform: scale(1.1); /* Efecto "pop" dinámico */
}

/* Efectos al dar clic / interactuar (Foco) */
input:focus, select:focus {
    outline: none;
    border-color: #ff6b81; /* Borde color coral */
    background-color: #ffffff; /* Fondo sólido puro al editar */
    box-shadow: 0 0 0 4px rgba(255, 107, 129, 0.15); /* Sombra difuminada moderna y suave */
}

/* ========================================================= */
/* ESTILOS DE LOS BOTONES FINALES (CALENDAR Y WA)            */
/* ========================================================= */

/* Diseño base: Botones blancos, limpios y elegantes */
a#btn-calendar-link, a#btn-whatsapp {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    width: 100% !important;
    max-width: 350px;
    margin: 15px auto !important;
    padding: 15px 25px !important;
    border-radius: 50px !important;
    font-family: 'Nunito', sans-serif !important; 
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    background-color: #ffffff !important; 
    border: 2px solid transparent !important;
    transition: all 0.4s ease !important;
    box-sizing: border-box !important; /* <--- ¡Agrega esta línea! */
}

/* Diseño Google Calendar: Texto azul y sombra que emite luz */
a#btn-calendar-link {
    color: #4285F4 !important; 
    box-shadow: 0 8px 20px rgba(66, 133, 244, 0.15) !important;
}

/* Diseño WhatsApp: Texto verde y sombra que emite luz */
a#btn-whatsapp {
    color: #1EBE5D !important; /* Un verde ajustado para leerse perfecto sobre blanco */
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.15) !important;
}

/* Efectos Hover (Al pasar el cursor o tocar en el celular) 
   ¡Aquí es donde se llenan de color dando un efecto satisfactorio! */
a#btn-calendar-link:hover {
    background-color: #4285F4 !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 25px rgba(66, 133, 244, 0.3) !important;
}

a#btn-whatsapp:hover {
    background-color: #1EBE5D !important;
    color: #ffffff !important;
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.3) !important;
}