/* Estilos específicos para la agenda */

.agenda-container {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.agenda-header {
    text-align: center;
    margin-bottom: 2rem;
}

.agenda-header h2 {
    color: #1e3c72;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.agenda-header p {
    color: #666;
}

/* Controles del calendario */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-controls h3 {
    margin: 0;
    color: #1e3c72;
    font-size: 1.5rem;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Grid del calendario */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 2rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background: #1e3c72;
    color: white;
    border-radius: 5px;
}

.calendar-day {
    min-height: 100px;
    padding: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-day:hover {
    background: #f8f9fa;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calendar-day.empty {
    background: #f8f9fa;
    cursor: default;
}

.calendar-day.empty:hover {
    transform: none;
    box-shadow: none;
}

.calendar-day.today {
    border: 2px solid #ffd700;
    background: #fffde7;
}

.calendar-day.selected {
    border: 2px solid #1e3c72;
    background: #e3f2fd;
}

.calendar-day-number {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.day-events {
    font-size: 0.75rem;
}

.event-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin: 1px;
}

.event-item-small {
    background: #e3f2fd;
    padding: 2px 4px;
    border-radius: 3px;
    margin: 2px 0;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sección de eventos */
.events-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.events-section h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
}

#selectedDate {
    font-weight: bold;
    color: #666;
    margin-bottom: 1rem;
}

#eventsList {
    margin-bottom: 1rem;
}

.event-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    border-left: 4px solid #1e3c72;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.event-content {
    flex: 1;
}

.event-time {
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 0.25rem;
}

.event-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.event-description {
    color: #666;
    font-size: 0.9rem;
}

.event-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.btn-edit,
.btn-delete {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.btn-edit:hover {
    background-color: #e3f2fd;
}

.btn-delete:hover {
    background-color: #ffebee;
}

.no-events {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    color: #1e3c72;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3c72;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 2px;
    }

    .calendar-day-header {
        font-size: 0.8rem;
        padding: 5px;
    }

    .calendar-day-number {
        font-size: 0.8rem;
    }

    .event-item-small {
        font-size: 0.6rem;
    }

    .calendar-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-controls h3 {
        font-size: 1.2rem;
    }

    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 40px;
    }

    .calendar-day-number {
        font-size: 0.7rem;
    }

    .event-item-small {
        display: none;
    }

    .day-events .event-dot {
        display: inline-block;
    }

    .event-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-actions {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-end;
    }
}