/**
 * =================================================================
 * THEMES CSS - CALENDARI IOC
 * =================================================================
 * 
 * @file        themes.css
 * @description Regles específiques per mode fosc i adaptacions de tema
 * @author      Ismael Trascastro <itrascastro@ioc.cat>
 * @version     1.0
 * @date        2025-01-16
 * @project     Calendari IOC
 * @repository  https://github.com/itrascastro/calendari-ioc
 * @license     MIT
 * 
 * Aquest fitxer forma part del projecte Calendari IOC,
 * una aplicació web per gestionar calendaris acadèmics.
 * 
 * =================================================================
 */

/* === GESTIÓ DELS LOGOS === */

/* Per defecte (mode clar), mostrem el logo clar i amaguem el fosc */
.light-mode .light-mode-logo {
    display: inline-block;
}

.light-mode .dark-mode-logo {
    display: none;
}

/* En mode fosc, invertim la visibilitat */
.dark-mode .light-mode-logo {
    display: none;
}

.dark-mode .dark-mode-logo {
    display: inline-block;
}


/* === REGLES DEL MODE FOSC === */

/* Botons de vista */
body.dark-mode .view-toggles button.active { 
    background-color: #4a5568; 
}

/* Cel·les del calendari */
body.dark-mode .day-cell[data-action="day-click"]:hover { 
    background-color: #374151; 
}

/* Capçalera del mes en vista global - mateix hover que dies */
body.dark-mode .global-month-header:hover {
    background-color: #374151;
} 

body.dark-mode .day-cell.out-of-month { 
    background-color: #212938; 
}

body.dark-mode .day-cell.out-of-month .day-number { 
    color: #667081;
}

/* Botons d'afegir esdeveniments */
body.dark-mode .add-event-btn { 
    background-color: #4a5568; 
}

body.dark-mode .add-event-btn:hover { 
    background-color: var(--accent-hover); 
    color: white; 
} 

/* Botons secundaris */
body.dark-mode .btn-secondary { 
    background-color: #718096; 
}

body.dark-mode .btn-secondary:hover { 
    background-color: #8b96a8; 
}

/* Elements de la llista d'esdeveniments */
body.dark-mode .unplaced-event-item.active {
    background-color: #4a5568;
}

body.dark-mode .event-list-item:hover {
    background-color: #404a5b;
}

body.dark-mode .event-list-item.is-user-event:hover {
    background-color: #2c3e50;
}

/* Vista diària - drag & drop */
body.dark-mode .day-view-container.drop-target {
    background-color: #1a2f1a;
    border-color: #66bb6a;
}

body.dark-mode .day-view-container.drop-invalid {
    background-color: #2f1a1a;
    border-color: #ef5350;
}

/* Vista semestral */
body.dark-mode[data-current-view="semester"] .day-cell.month-odd {
    background-color: rgba(138, 154, 214, 0.05);
}

/* Components - capçalera */
body.dark-mode .header-button:hover { 
    background-color: #4a5568; 
}

/* Components - llistes de calendaris */
body.dark-mode .calendar-list-item:hover {
    background-color: #404a5b;
}

body.dark-mode .calendar-list-item.active {
    background-color: #4a5568;
}

/* Components - llistes de categories */
body.dark-mode .category-list-item:hover {
    background-color: #404a5b;
}

body.dark-mode .category-list-item.active {
    background-color: #4a5568;
}

/* Components - formularis */
body.dark-mode .category-input {
    background-color: #404a5b;
    color: var(--main-text-color);
}

/* Modals - formularis */
body.dark-mode .modal-body select,
body.dark-mode .modal-body input[type="text"],
body.dark-mode .modal-body input[type="date"],
body.dark-mode .modal-body textarea {
    background-color: #404a5b !important;
    color: var(--main-text-color) !important;
    border-color: #4a5568;
}