/* ============================================================
   Agenda Central — Estilos Globais
   Organizado por: Layout Base → Componentes → Animações → Responsivo
   ============================================================ */

/* --- Layout Base --- */
body {
    box-sizing: border-box;
}

/* --- Gradiente principal (header, sidebar, botões) --- */
.gradient-bg {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* --- Sombra de cards --- */
.card-shadow {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* --- Animações --- */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

/* --- Calendário --- */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
}

.calendar-day {
    background-color: white;
    min-height: 80px;
    padding: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    background-color: #f3f4f6;
}

.calendar-day.other-month {
    background-color: #f9fafb;
    color: #9ca3af;
}

.calendar-day.today {
    background-color: #dbeafe;
    border: 2px solid #3b82f6;
}

/* --- Item de evento no calendário --- */
.event-item {
    font-size: 10px;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

/* --- Toast de notificação --- */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease-in-out;
}

.toast.show {
    transform: translateX(0);
}

/* --- Sidebar --- */
.sidebar {
    transition: transform 0.3s ease-in-out;
}

.sidebar-closed {
    transform: translateX(-100%);
}

/* --- Validação de Formulários --- */
.field-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.field-error-msg {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Cards de Aprovação --- */
.approval-card-header {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.approval-info-box {
    transition: all 0.2s ease;
}

.approval-info-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   Responsivo — Mobile (max-width: 640px)
   ============================================================ */
@media (max-width: 640px) {
    #eventModal,
    #genericModal,
    #confirmationModal {
        padding: 0 !important;
    }

    #eventModal .bg-white,
    #genericModal .bg-white,
    #confirmationModal .bg-white {
        max-height: 90vh !important;
        max-width: 95vw !important;
        width: 95vw !important;
        margin: auto !important;
        border-radius: 12px !important;
        overflow-y: auto !important;
    }

    #eventModal .bg-white > div,
    #genericModal .bg-white > div,
    #confirmationModal .bg-white > div {
        max-height: 85vh !important;
        overflow-y: auto !important;
    }

    #eventForm,
    #userForm,
    #ministryForm,
    #locationForm,
    #eventTypeForm {
        padding-bottom: 20px;
    }

    #eventForm button,
    #userForm button,
    #ministryForm button,
    #locationForm button,
    #eventTypeForm button {
        position: sticky;
        bottom: 0;
        background-color: white;
        padding-top: 10px;
        border-top: 1px solid #e5e7eb;
    }
}

/* ============================================================
   Responsivo — Tablet (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .event-item {
        font-size: 8px;
        padding: 1px 2px;
    }
}
