/* ═══════════════════════════════════════════════════════════════
   🎨 NOVADEX CALENDAR - BALANCED VIBRANT EDITION
   Elegante + Colorido + Profesional
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────── 
   1. GLOBAL PREMIUM VARIABLES
   ─────────────────────────────────────────────────────────────── */
:root {
    --cal-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --cal-gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --cal-gradient-danger: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    --cal-gradient-info: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --cal-gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ─────────────────────────────────────────────────────────────── 
   2. CALENDAR CONTAINER - COMPACT & CONTRASTED
   ─────────────────────────────────────────────────────────────── */
.calendar-container {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-radius: 12px !important;
    min-height: calc(100vh - 180px) !important;
    max-height: calc(100vh - 180px) !important;
    height: calc(100vh - 180px) !important;
    display: flex;
    flex-direction: column;
    padding: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
    border: 1px solid #cbd5e1;
}

/* ─────────────────────────────────────────────────────────────── 
   3. FULLCALENDAR CORE OVERRIDES
   ─────────────────────────────────────────────────────────────── */
.fc {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Compact Header with Contrast */
.fc .fc-toolbar {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.fc .fc-toolbar-title {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.2px;
    text-transform: capitalize;
}

/* Buttons with Micro-animations - No Metallic Effects */
.fc .fc-button {
    background: #8b5cf6 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.25) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: white !important;
    position: relative;
}

.fc .fc-button:hover {
    background: #7c3aed !important;
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.35) !important;
    transform: translateY(-1px);
}

.fc .fc-button:active {
    background: #6d28d9 !important;
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(139, 92, 246, 0.3) !important;
}

.fc .fc-button-active {
    background: #7c3aed !important;
    box-shadow: 0 3px 6px rgba(139, 92, 246, 0.3) !important;
}

/* ─────────────────────────────────────────────────────────────── 
   4. CALENDAR GRID STYLING - COMPACT & CONTRASTED
   ─────────────────────────────────────────────────────────────── */
.fc .fc-view-harness {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #cbd5e1;
}

.fc .fc-col-header-cell {
    background: #f8fafc;
    border: none !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 10px 6px !important;
    font-weight: 700 !important;
    font-size: 0.7rem !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    color: #475569 !important;
}

.fc .fc-col-header-cell {
    color: #1e293b !important;
    font-weight: 800 !important;
}

.fc .fc-daygrid-day {
    border: 1px solid #e2e8f0 !important;
    transition: background-color 0.15s ease;
    position: relative;
    overflow: visible !important;
    background: white;
    min-height: 80px !important;
}

.fc .fc-daygrid-day:hover {
    background: #f1f5f9;
    z-index: 5;
}

.fc .fc-daygrid-day-frame {
    overflow: visible !important;
}

.fc .fc-daygrid-day-events {
    overflow: visible !important;
}

.fc .fc-daygrid-event {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 22px !important;
    line-height: 1.3 !important;
}

.fc .fc-daygrid-day-number {
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    color: #475569;
    padding: 6px 8px !important;
}

.fc .fc-day-today {
    background: #f3e8ff !important;
    border: 2px solid #8b5cf6 !important;
    position: relative;
}

.fc .fc-day-today .fc-daygrid-day-number {
    color: white !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    background: #8b5cf6;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-view-harness {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.fc-scroller {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

.fc-scroller-liquid-absolute {
    position: relative !important;
}

#fullcalendar {
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

.fc {
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

.fc-view-harness-active > .fc-scroller {
    overflow-y: auto !important;
}

/* ─────────────────────────────────────────────────────────────── 
   5. COMPACT EVENT CARDS WITH AVATARS
   ─────────────────────────────────────────────────────────────── */
.fc-event {
    border: none !important;
    border-radius: 6px !important;
    padding: 4px 8px !important;
    margin: 2px 3px !important;
    font-weight: 500 !important;
    font-size: 0.75rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    position: relative;
    overflow: visible !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1.3 !important;
    min-height: 22px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.fc-event-title {
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.4 !important;
    display: block !important;
}

.fc-event-title-container {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow: visible !important;
}

/* Event hover with micro-animation */
.fc-event:hover {
    opacity: 0.95;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-1px);
    z-index: 10;
}

/* Event creator avatar */
.fc-event-avatar {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
    flex-shrink: 0;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.3);
}

/* Clean Event Colors - Solid, No Gradients */
.fc-event[style*="rgb(99, 102, 241)"] {
    background: #6366f1 !important;
}

.fc-event[style*="rgb(16, 185, 129)"] {
    background: #10b981 !important;
}

.fc-event[style*="rgb(239, 68, 68)"] {
    background: #ef4444 !important;
}

.fc-event[style*="rgb(245, 158, 11)"] {
    background: #f59e0b !important;
}

.fc-event[style*="rgb(148, 163, 184)"] {
    background: #64748b !important;
}

.fc-event[style*="rgb(139, 92, 246)"] {
    background: #8b5cf6 !important;
}

.fc-event[style*="rgb(59, 130, 246)"] {
    background: #3b82f6 !important;
}

/* ─────────────────────────────────────────────────────────────── 
   6. TIME GRID VIEWS
   ─────────────────────────────────────────────────────────────── */
.fc .fc-timegrid-slot {
    height: 3.5em !important;
    border-color: #f1f5f9 !important;
}

.fc .fc-timegrid-slot-label {
    font-weight: 700 !important;
    color: #64748b;
    font-size: 0.8rem;
}

.fc-timegrid-event {
    border-radius: 8px !important;
    border-left: 4px solid currentColor !important;
}

/* ─────────────────────────────────────────────────────────────── 
   7. LIST VIEW
   ─────────────────────────────────────────────────────────────── */
.fc-list-event {
    background: white !important;
    border-left: 4px solid currentColor !important;
    border-radius: 0 12px 12px 0 !important;
    margin: 8px 0 !important;
    padding: 12px !important;
    transition: all 0.2s ease;
}

.fc-list-event:hover {
    background: linear-gradient(90deg, #f8fafc 0%, #eff6ff 100%) !important;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ─────────────────────────────────────────────────────────────── 
   8. POPOVER & TOOLTIPS
   ─────────────────────────────────────────────────────────────── */
.fc .fc-popover {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 16px !important;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.5) !important;
}

.fc .fc-popover-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 12px 16px !important;
    border-radius: 16px 16px 0 0 !important;
    font-weight: 700 !important;
}

/* ─────────────────────────────────────────────────────────────── 
   9. RESPONSIVE - MOBILE OPTIMIZED
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .calendar-container {
        padding: 10px !important;
        border-radius: 16px !important;
        min-height: calc(100vh - 250px) !important;
        max-height: calc(100vh - 250px) !important;
        height: calc(100vh - 250px) !important;
    }

    .fc .fc-toolbar {
        flex-direction: column !important;
        gap: 12px;
        padding: 12px !important;
        margin-bottom: 15px !important;
    }

    .fc .fc-toolbar-title {
        font-size: 1.2rem !important;
        text-align: center;
    }

    .fc .fc-button {
        padding: 8px 12px !important;
        font-size: 0.75rem !important;
    }

    .fc .fc-button-group {
        display: flex;
        gap: 8px;
    }

    .fc .fc-col-header-cell {
        padding: 8px 4px !important;
        font-size: 0.7rem !important;
    }

    .fc .fc-daygrid-day {
        min-height: 60px !important;
    }

    .fc .fc-daygrid-day-number {
        font-size: 0.85rem !important;
        padding: 6px !important;
    }

    .fc-event {
        font-size: 0.65rem !important;
        padding: 3px 5px !important;
        margin: 1px 2px !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow: visible !important;
        height: auto !important;
        min-height: 18px !important;
        line-height: 1.2 !important;
    }
    
    .fc-event-avatar {
        width: 14px !important;
        height: 14px !important;
    }
    
    .fc-event-title,
    .fc-event-title-container {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow: visible !important;
    }

    .fc .fc-view-harness {
        border-radius: 12px !important;
    }

    /* List view para móvil - MEJORADO */
    .fc-list-view {
        font-size: 0.9rem !important;
    }

    .fc-list-event {
        padding: 14px 16px !important;
        margin: 8px 0 !important;
        border-radius: 12px !important;
        background: white !important;
        border-left: 4px solid currentColor !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
        transition: all 0.2s ease !important;
    }

    .fc-list-event:hover {
        transform: translateX(4px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    }

    .fc-list-event-title {
        font-weight: 600 !important;
        color: #1e293b !important;
        line-height: 1.4 !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }

    .fc-list-event-time {
        font-weight: 500 !important;
        color: #64748b !important;
        font-size: 0.85rem !important;
    }

    /* Avatares en lista móvil */
    .fc-list-event .fc-event-avatar {
        width: 32px !important;
        height: 32px !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }

    /* Día header en lista móvil */
    .fc-list-day-cushion {
        background: #f8fafc !important;
        padding: 12px 16px !important;
        font-weight: 700 !important;
        font-size: 0.9rem !important;
        color: #1e293b !important;
        border-bottom: 2px solid #e2e8f0 !important;
    }

    /* Mejorar espaciado en lista */
    .fc-list-event-dot {
        display: none !important;
    }

    /* Scrollbar personalizado para lista móvil */
    .fc-scroller-liquid-absolute {
        padding: 8px !important;
    }
}

/* ─────────────────────────────────────────────────────────────── 
   10. CUSTOM SCROLLBAR
   ─────────────────────────────────────────────────────────────── */
.fc-scroller::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.fc-scroller::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.fc-scroller::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

.fc-scroller::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #f093fb);
}

/* ─────────────────────────────────────────────────────────────── 
   11. NO ANIMATIONS - CLEAN & STABLE
   ─────────────────────────────────────────────────────────────── */
/* Animations removed for better performance and stability */

/* ═══════════════════════════════════════════════════════════════
   🎉 BALANCED VIBRANT CALENDAR - ELEGANT & COLORFUL
   ═══════════════════════════════════════════════════════════════ */