/* Kalender Mobile Styles */

/* Style dasar untuk event */
.fc-event-time {
    display: inline-block;
    margin-right: 4px;
    font-weight: 600;
}

.fc-event-title {
    display: inline;
}

/* Style untuk event multi-hari */
.fc-event-multiday .fc-event-time {
    display: none;
}

.fc-event-multiday .fc-event-title::before {
    content: '📅 ';
    font-size: 0.9em;
}

/* Style untuk tampilan mobile */
@media (max-width: 767px) {
    .fc-event {
        white-space: normal !important;
        line-height: 1.3 !important;
        padding: 2px 4px !important;
        margin: 1px 0 !important;
        font-size: 0.8em !important;
    }
    
    .fc-event-multiday .fc-event-title::before {
        content: '📅 ';
        margin-right: 2px;
    }
}

/* Style untuk tampilan rentang tanggal */
.date-range {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.date-start, .date-end, .date-single {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 5px 8px;
    min-width: 50px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.date-separator {
    font-weight: bold;
    color: #555;
}

.date-day {
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 1;
}

.date-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
}

/* Style untuk tampilan mobile */
@media (max-width: 767px) {
    .date-range {
        flex-direction: column;
        gap: 5px;
    }
    
    .date-separator {
        transform: rotate(90deg);
        margin: 2px 0;
    }
    
    .date-start, .date-end, .date-single {
        padding: 4px 6px;
        min-width: 45px;
    }
    
    .date-day {
        font-size: 1rem;
    }
    
    .date-month {
        font-size: 0.6rem;
    }
}

/* Style untuk tampilan mobile */
@media (max-width: 767px) {
    /* Container kalender */
    .fc {
        font-size: 14px;
    }

    /* Header kalender */
    .fc .fc-toolbar.fc-header-toolbar {
        margin-bottom: 0.5em;
        flex-direction: column;
        gap: 10px;
    }

    .fc .fc-toolbar-title {
        font-size: 1.2em;
        margin: 0;
    }

    /* Tombol navigasi */
    .fc .fc-button {
        padding: 0.3em 0.6em;
        font-size: 0.85em;
    }

    /* Event di kalender */
    .fc .fc-daygrid-event {
        margin: 1px 2px !important;
        padding: 2px 4px !important;
        border-radius: 3px !important;
        font-size: 0.8em !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        overflow: hidden;
    }

    /* Event yang berlangsung lebih dari 1 hari */
    .fc .fc-daygrid-event.fc-event-multiday {
        white-space: normal !important;
        padding: 2px 4px !important;
        margin: 1px 0 !important;
        line-height: 1.2 !important;
        min-height: auto !important;
        font-size: 0.75em !important;
    }

    /* Judul event */
    .fc-event-title {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        word-break: break-word;
    }

    /* Waktu event */
    .fc-event-time {
        font-weight: 600;
        margin-right: 4px;
        display: inline-block;
    }

    /* Hari di header */
    .fc .fc-col-header-cell {
        padding: 5px 0;
    }

    .fc .fc-col-header-cell-cushion {
        font-size: 0.8em;
        padding: 2px 4px;
    }

    /* Sel tanggal */
    .fc .fc-daygrid-day {
        min-height: 60px;
    }

    .fc .fc-daygrid-day-number {
        font-size: 0.9em;
        padding: 3px;
    }

    /* Modal detail event */
    .event-details-modal {
        max-width: 95% !important;
        margin: 10px auto !important;
        border-radius: 12px !important;
        padding: 15px !important;
    }

    .event-details-header {
        padding: 10px 0;
        border-bottom: 1px solid #eee;
        margin-bottom: 10px;
    }

    .event-details-body {
        padding: 10px 0;
    }

    /* Tombol tutup modal */
    .modal-close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        font-size: 1.5em;
        cursor: pointer;
        color: #666;
    }

    /* Indikator event tambahan */
    .fc-daygrid-more-link {
        font-size: 0.7em;
        padding: 0 2px;
    }

    /* Tampilan list event di mobile */
    .fc-dayGridMonth-view .fc-daygrid-day-events {
        min-height: 20px;
    }

    /* Sembunyikan beberapa elemen yang tidak perlu di mobile */
    .fc .fc-toolbar-chunk:last-child {
        display: none;
    }
}

/* Style khusus untuk layar sangat kecil */
@media (max-width: 400px) {
    .fc .fc-toolbar-title {
        font-size: 1em;
    }

    .fc .fc-button {
        padding: 0.2em 0.4em;
        font-size: 0.75em;
    }

    .fc .fc-daygrid-day {
        min-height: 50px;
    }

    .fc .fc-daygrid-day-number {
        font-size: 0.8em;
    }
}

/* Style untuk indikator event multi-hari */
.fc-event-multiday .fc-event-time {
    display: inline;
    margin-right: 4px;
}

.fc-event-multiday .fc-event-title {
    display: inline;
}

/* Style untuk event yang sedang berlangsung */
.fc-event-today {
    box-shadow: 0 0 0 2px #ff6600;
}

/* Style untuk event yang dipilih/diklik */
.fc-event-selected {
    box-shadow: 0 0 0 2px #000;
    opacity: 0.8;
}
