/* ===================================================
     Colors and Variables
=================================================== */
:root {
    --main-blue: #0066cc;
    --accent-blue: #00aeef;
    --white: #ffffff;
    --gray-bg: #f5f7fa;
    --text-dark: #222;
}

/* ===================================================
    Base HTML and Body Styles
=================================================== */
body,
html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: #f5f6fa;
}

/* ===================================================
    Calendar Wrapper and Container
=================================================== */
#calendar-wrapper {
    position: relative;
    overflow: hidden;
    max-width: 1100px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

#calendar {
    background-color: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    min-height: 85vh;
    overflow-x: auto;
}

.fc .fc-daygrid-day-frame {
    min-height: 70px;
}

/* ===================================================
   Events
=================================================== */
.fc-event {
    border-radius: 10px;
    padding: 2px 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    font-size: 0.78rem;
    font-weight: 500;
    border: none;
    opacity: 0.95;

}

.fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(24, 94, 224, 0.2);
    opacity: 1;
    cursor: pointer;
}

.fc-event.current-event:hover {
    background-image: linear-gradient(to right, #185ee0, #367aff);
}

.fc-event.past-event:hover {
    background-image: linear-gradient(to right, #dfe6e9, #b2bec3);
}

.fc-event.past-event {
    background-image: linear-gradient(to right, #b2bec3, #dfe6e9);
    color: #2d3436 !important;
}

.fc-event.current-event {
    background-image: linear-gradient(to right, #185ee0, #4f9eff);
    color: white;
}

.fc-list-event:hover td {
    color: #1a1a1a !important;
    border-radius: 4px;
}

/* ===================================================
   Close Button
=================================================== */
.close-button {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ===================================================
   Unified Modal Buttons
=================================================== */
.modal-btn {
    padding: 8px 14px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

/* ===================================================
   Event Preview Popup
=================================================== */
#eventPreview {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    background-color: #f1f3f4;
    border-radius: 14px;
    padding: 16px;
    min-width: 260px;
    max-width: 400px;
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #dadce0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    display: none;
    word-break: break-word;
}

#eventPreview.show {
    display: block;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.preview-actions a,
.preview-actions button {
    font-size: 18px;
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    transition: color 0.2s ease;
}

.preview-actions a:hover,
.preview-actions button:hover {
    color: #1a73e8;
}

.preview-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #555;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.preview-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    margin: 12px 0 8px;
    color: #202124;
}

.preview-description.no-expand {
    cursor: default !important;
    pointer-events: none;
}

.event-body div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #3c4043;
    margin-bottom: 5px;
    line-height: 1.4;
    flex-wrap: wrap;
}

.event-body i {
    font-size: 14px;
    color: #5f6368;
}

.event-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.preview-icons button {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #444;
    transition: color 0.2s ease;
}

.preview-icons button:hover {
    color: #1a73e8;
}

#previewOrganizer {
    max-width: 100%;
    max-height: 100px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.preview-description {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px;
    max-width: 100%;
}

.preview-description .desc-text {
    max-width: 100%;
    max-height: 1.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}

.preview-description.expanded,
.preview-description.expanded .desc-text {
    white-space: normal;
    max-height: none;
    max-width: 100%;
}

/* ===================================================
   Toolbar and Tabs
=================================================== */
.fc-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.fc-toolbar-title {
    flex: 1;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.fc-custom-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.container {
    position: relative;
    display: flex;
    background-color: #fff;
    padding: 4px;
    border-radius: 99px;
    box-shadow: 0 0 1px rgba(24, 94, 224, 0.15), 0 6px 12px rgba(24, 94, 224, 0.15);
    gap: 0.25rem;
    min-width: 220px;
    height: 38px;
    align-items: center;
}

.tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    width: 70px;
    font-size: 0.8rem;
    font-weight: 500;
    color: black;
    border-radius: 99px;
    cursor: pointer;
    z-index: 2;
}

.tabs {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.container input[type="radio"] {
    display: none;
}

.container input[type="radio"]:checked+label {
    color: #185ee0;
    font-weight: 600;
}

.glider {
    position: absolute;
    top: 4px;
    left: 0;
    height: 30px;
    width: 70px;
    background-color: #e6eef9;
    border-radius: 99px;
    transition: left 0.25s ease-in-out;
    z-index: 1;
}

/* ===================================================
   Navigation Tabs (Left)
=================================================== */
.nav-tabs {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 99px;
    box-shadow: 0 0 1px rgba(24, 94, 224, 0.15), 0 6px 12px rgba(24, 94, 224, 0.15);
    padding: 4px;
    gap: 6px;
    height: 38px;
}

.nav-tab {
    height: 30px;
    padding: 0 14px;
    background-color: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 99px;
    cursor: pointer;
    color: #202124;
    transition: background-color 0.2s ease;
}

.nav-tab.today {
    background-color: #e6eef9;
    color: #185ee0;
    font-weight: 600;
}

.nav-tab:hover {
    background-color: #f0f4fa;
}

.nav-tab.active {
    background-color: #e6eef9;
    color: #185ee0;
    font-weight: 600;
}

/* ===================================================
   Remove default event dots from Month View
=================================================== */
.fc-daygrid-event-dot {
    display: none !important;
}

/* ===================================================
   Previous / Next Month Navigation Buttons
=================================================== */
#prevBtn,
#nextBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    font-size: 1.2rem;
    padding: 0;
    background: none;
    border: none;
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    vertical-align: middle;
    line-height: 1;
    margin-top: 2px;
}

#prevBtn:hover,
#nextBtn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ===================================================
   Center Align for Middle Toolbar Section (e.g., View Mode Tabs)
=================================================== */
.fc-toolbar-chunk:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fc-toolbar .nav-tabs {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 99px;
    box-shadow: 0 0 1px rgba(24, 94, 224, 0.15),
        0 6px 12px rgba(24, 94, 224, 0.15);
    padding: 0px 6px;
    gap: 6px;
    height: 38px;
}

#todayBtn.nav-tab {
    font-size: 0.85rem;
    font-weight: 550;
    color: #434141;
    background-color: transparent;
    border: none;
    border-radius: 99px;
    padding: 0 14px;
    height: 30px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#todayBtn.nav-tab:hover {
    background-color: #f0f4fa;
}

#todayBtn.nav-tab.active {
    font-weight: 600;
    color: #185ee0;
    background-color: #e6eef9;
}

/* ===================================================
   Mobile-Specific "Today" Button Visibility Control
=================================================== */
#todayBtnMobile {
    display: none;
}

/* ===================================================
   Highlight for "Today" Cell in Month View
=================================================== */
.fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
    height: 100%;
    width: 100%;
    background-color: #e4e9f4;
}

.fc-daygrid-day:hover {
    background-color: #f5f9ff;
}


.fc-col-header-cell {
    background-color: #f9fafc;
    border-radius: 6px;
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.fc-col-header-cell-cushion {
    font-weight: 500;
    color: #333;
}