/* Contenedor principal */
.agendas-container {
    display: grid; /* Cambiar a grid */
    grid-template-columns: repeat(2, 1fr); /* Dos columnas */
    gap: 0.5rem; /* Espaciado entre filas y columnas */
    padding: 1rem; /* Reducir el relleno general */
    justify-items: center; /* Centrar los elementos en cada celda */
    margin-bottom: 2rem; /* Espaciado inferior para separar del formulario */
}

/* Estilo para cada hora */
.agenda-item {
    padding: 1rem; /* Espaciado cómodo */
    border: none; /* Sin bordes */
    border-radius: 12px; /* Bordes redondeados */
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.9rem; /* Tamaño de texto */
    font-weight: 600; /* Peso medio */
    color: #1f2937; /* Color de texto oscuro */
    background: #f9fafb; /* Fondo claro */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Sombra ligera */
    transition: all 0.3s ease; /* Transiciones suaves */
    cursor: pointer;
    display: flex;
    flex-direction: column; /* Colocar ícono y texto en columna */
    align-items: center;
    justify-content: center;
    width: 100%; /* Asegurar que ocupen todo el ancho de la celda */
    min-height: 80px; /* Altura mínima */
}

.agenda-item i {
    font-size: 1.5rem; /* Tamaño del ícono */
    margin-bottom: 0.5rem; /* Espaciado entre ícono y texto */
    display: block;
}

/* Hover para las horas disponibles */
.agenda-item:hover {
    background: #e5e7eb; /* Fondo más oscuro */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Sombra más pronunciada */
    transform: translateY(-2px); /* Efecto de elevación */
}

/* Estado disponible */
.agenda-item.disponible {
    color: #10b981; /* Verde agradable */
}

.agenda-item.disponible i {
    color: #10b981; /* Ícono verde */
}

/* Estado ocupado */
.agenda-item.ocupado {
    color: #9ca3af; /* Gris claro */
    cursor: not-allowed;
    opacity: 0.6;
}

.agenda-item.ocupado i {
    color: #9ca3af; /* Ícono gris */
}

/* Estado seleccionado */
.agenda-item.seleccionado {
    color: white;
    background: var(--primary-color); /* Fondo principal */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Sombra destacada */
    transform: translateY(-2px); /* Efecto de elevación */
}

.agenda-item.seleccionado i {
    color: white; /* Ícono blanco */
}

/* Mensaje cuando no hay agendas */
.agendas-container p {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin: 2rem 0;
    font-family: var(--font-body);
}

/* Formulario de agendación */
#form-container {
    position: fixed;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: bottom 0.5s ease-in-out;
    z-index: 1000;
}

#form-container.form-visible {
    bottom: 20px;
}

/* Estilo para el formulario */
.form-agendacion {
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff, #f3f4f6); /* Fondo degradado suave */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra ligera */
    max-width: 600px;
    margin: 0 auto 2rem auto; /* Centrar y agregar espaciado inferior */
}

.form-agendacion h2 {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.form-agendacion p {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
}

.form-grupo {
    margin-bottom: 1.5rem;
}

.form-grupo label {
    display: block;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-grupo input,
.form-grupo select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: #374151;
    background: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease;
}

.form-grupo input:focus,
.form-grupo select:focus {
    border-color: #10b981; /* Verde */
    outline: none;
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #10b981; /* Verde */
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #059669; /* Verde más oscuro */
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background: #f9fafb;
    color: #6b7280;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    border-top: 1px solid #e5e7eb;
}

/* Ajuste para evitar que el formulario se vea en el footer */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem; /* Espaciado entre secciones */
}

/* Estilo para el mensaje de confirmación */
.confirmacion {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0); /* Fondo degradado verde */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Sombra ligera */
    max-width: 600px;
    margin: 2rem auto;
    font-family: 'Montserrat', sans-serif;
    color: #065f46; /* Verde oscuro */
}

.confirmacion h2 {
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    color: #047857; /* Verde más intenso */
    margin-bottom: 1rem;
}

.confirmacion p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.confirmacion button {
    padding: 0.8rem 1.5rem;
    background: #10b981; /* Verde */
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.confirmacion button:hover {
    background: #059669; /* Verde más oscuro */
}

/* Nueva sección para el formulario minimalista y profesional */
.formulario-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-container h2 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', serif;
}

.form-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    font-weight: 300;
}

.agendamiento-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.form-group input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.btn-agendar {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
}

.btn-agendar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
}

.btn-agendar:active {
    transform: translateY(-1px);
}

/* Notificaciones */
#notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 15px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: all;
    min-width: 350px;
    max-width: 450px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    gap: 15px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.notification.error .notification-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.notification.warning .notification-icon {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
}

.notification-text {
    flex: 1;
}

.notification-text h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.notification-text p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #adb5bd;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    color: #6c757d;
}

/* Bordes de colores para las notificaciones */
.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.warning {
    border-left: 4px solid #ffc107;
}

/* Responsive para notificaciones */
@media (max-width: 768px) {
    #notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .notification.hide {
        transform: translateY(-100px);
    }
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .form-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .form-container h2 {
        font-size: 2rem;
    }
    
    .formulario-section {
        padding: 2rem 1rem;
    }
}

/* Estilos para las agendas */
.agendas-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.agenda-item {
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.agenda-item.disponible {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    cursor: pointer;
}

.agenda-item.ocupado {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.agenda-item.disponible:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}
