/* Pasakumu kalendara skata un filtru stili. */

/* ===== KALENDĀRA STILI - MAZS KALENDĀRS ===== */

/* Kalendāra konteiners */
.kalendars-container {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(82,5,5,0.08);
    border: 1px solid rgba(82,5,5,0.1);
    width: 100%;
    max-width: 300px;
}

.kalendars {
    width: 100%;
    font-family: 'Roboto', sans-serif;
}

/* ===== PIELĀGOTAIS TOOLBAR ===== */
.custom-calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 5px 0;
    font-family: 'Roboto', sans-serif;
}

.toolbar-left,
.toolbar-right {
    flex: 0 0 auto;
}

.toolbar-center {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

.toolbar-btn {
    background: none;
    border: none;
    color: #520505;
    font-size: 1rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background-color: rgba(82,5,5,0.1);
    color: #7a0f0f;
}

/* Mēneša selektors */
.month-selector {
    position: relative;
    cursor: pointer;
    padding: 5px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid rgba(82,5,5,0.2);
    min-width: 100px;
    text-align: center;
}

.current-month {
    font-weight: 600;
    color: #520505;
    display: inline-block;
}

/* Mēneša dropdown - 4 rindas, 3 mēneši katrā */
.month-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(82,5,5,0.15);
    list-style: none;
    padding: 12px;
    margin: 8px 0 0;
    z-index: 1000;
    display: none;
    width: 280px;
    border: 1px solid rgba(82,5,5,0.1);
}

.month-dropdown.active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.month-dropdown li {
    padding: 10px 5px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    color: #333;
    text-align: center;
    border-radius: 6px;
    background-color: #f8f9fa;
    border: 2px solid #520505;
    font-weight: 500;
    list-style: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Neizvēlētie mēneši */
.month-dropdown li:not(.current-month-item) {
    border-color: #520505;
    color: #333;
    background-color: #f8f9fa;
}

/* Izvēlētais mēnesis */
.month-dropdown li.current-month-item {
    background-color: #520505;
    color: white;
    font-weight: 600;
    border-color: #520505;
}

.month-dropdown li:hover {
    background-color: #520505;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(82,5,5,0.2);
    border-color: #520505;
}

.month-dropdown.active {
    animation: fadeIn 0.2s ease;
}

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

/* Gada selektors */
.year-selector {
    position: relative;
    cursor: pointer;
    padding: 5px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid rgba(82,5,5,0.2);
    min-width: 80px;
    text-align: center;
}

.current-year {
    font-weight: 600;
    color: #520505;
    display: inline-block;
}

.year-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    margin: 5px 0 0;
    z-index: 1000;
    display: none;
    min-width: 200px;
}

.year-dropdown.active {
    display: block;
}

.year-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.year-nav-btn {
    background: none;
    border: none;
    color: #520505;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.year-nav-btn:hover {
    background-color: rgba(255, 204, 0, 0.1);
    color: #7a0f0f;
}

.year-range {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.year-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.year-list li {
    padding: 5px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.85rem;
    color: #333;
}

.year-list li:hover {
    background-color: rgba(255, 204, 0, 0.1);
    color: #520505;
}

.year-list li.selected {
    background-color: #520505;
    color: white;
    font-weight: 600;
}

/* ===== FULLCALENDAR STILA PIELĀGOJUMI ===== */
.fc {
    --fc-border-color: transparent !important;
    --fc-today-bg-color: rgba(255, 204, 0, 0.08);
    --fc-event-bg-color: transparent;
    --fc-event-border-color: transparent;
    --fc-event-text-color: #520505;
    --fc-page-bg-color: white;
    --fc-neutral-bg-color: transparent;
    font-size: 0.85rem !important;
    border: none !important;
}

/* Noņem visas robežlīnijas */
.fc table,
.fc tbody,
.fc thead,
.fc tr,
.fc th,
.fc td {
    border: none !important;
    border-style: none !important;
    border-width: 0 !important;
}

/* ===== NEDĒĻAS DIENU GALVENES ===== */
.fc .fc-col-header-cell {
    background-color: transparent !important;
    padding: 6px 0 !important;
}

.fc .fc-col-header-cell-cushion {
    font-weight: 600;
    color: #520505;
    text-decoration: none;
    font-size: 0.75rem !important;
    text-transform: uppercase;
}

/* ===== DIENU ŠŪNAS ===== */
.fc .fc-daygrid-day {
    background-color: transparent !important;
    border: none !important;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.fc .fc-daygrid-day:hover {
    background-color: rgba(255, 204, 0, 0.1) !important;
}

.fc .fc-daygrid-day-number {
    color: #333;
    font-size: 0.8rem !important;
    font-weight: 500;
    padding: 4px !important;
    text-decoration: none;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== PAGĀJUŠIE DATUMI (TĀDI PAŠI KĀ NĀKOTNES) ===== */
.fc .fc-day-past .fc-daygrid-day-number {
    color: #333 !important;
    opacity: 1;
}

.fc .fc-day-past.fc-day-with-event .fc-daygrid-day-number {
    background-color: #520505 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(82,5,5,0.2);
}

/* ===== NĀKOTNES DATUMI (MELNI) ===== */
.fc .fc-day-future .fc-daygrid-day-number {
    color: #333 !important;
}

/* ===== PASĀKUMU DIENAS ===== */
.fc-daygrid-day.fc-day-with-event .fc-daygrid-day-number {
    background-color: #520505;
    color: white !important;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin: 0 auto;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem !important;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(82,5,5,0.2);
}

/* Pagājuši pasākumi - tādi paši kā pārējie pasākumi */
.fc-day-past.fc-day-with-event .fc-daygrid-day-number {
    background-color: #520505 !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(82,5,5,0.2);
}

/* ===== ŠODIENAS DIENA ===== */
.fc .fc-day-today {
    background-color: transparent !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    font-weight: 700;
    color: #520505;
    border: 2px solid #ffcc00;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    margin: 0 auto;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Ja šodien ir arī pasākums */
.fc-day-today.fc-day-with-event .fc-daygrid-day-number {
    background-color: #520505;
    color: white !important;
    border: 2px solid #ffcc00;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.22), 0 2px 4px rgba(82,5,5,0.2);
}

/* ===== IZVĒLĒTAIS DATUMS ===== */
.fc-day-selected {
    background-color: rgba(82,5,5,0.1) !important;
    border-radius: 50%;
}

.fc-day-selected .fc-daygrid-day-number {
    font-weight: 700;
    color: #520505 !important;
    transform: scale(1.1);
}

/* ===== PASĀKUMU NOTIKUMI (PASLĒPJAM) ===== */
.fc-event {
    display: none !important;
}

.fc-daygrid-day-events {
    display: none !important;
}

/* ===== RESPONSĪVAIS DIZAINS ===== */
@media (max-width: 992px) {
    .kalendars-container {
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .custom-calendar-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .toolbar-center {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .toolbar-left,
    .toolbar-right {
        order: 1;
    }
}

@media (max-width: 768px) {
    .kalendars-container {
        padding: 12px;
    }
    
    .fc .fc-col-header-cell-cushion {
        font-size: 0.7rem !important;
    }
    
    .fc .fc-daygrid-day-number {
        font-size: 0.75rem !important;
    }
    
    .fc-daygrid-day.fc-day-with-event .fc-daygrid-day-number {
        width: 22px;
        height: 22px;
        font-size: 0.7rem !important;
    }
    
    .month-selector,
    .year-selector {
        min-width: 80px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .kalendars-container {
        padding: 10px;
    }
    
    .toolbar-center {
        flex-wrap: wrap;
    }
    
    .year-dropdown {
        left: -50px;
    }
}

@media (max-width: 480px) {
    .custom-calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-center {
        flex-direction: column;
        align-items: stretch;
    }
    
    .month-selector,
    .year-selector {
        width: 100%;
    }
    
    .year-dropdown {
        left: 0;
        width: 100%;
    }
}