﻿

/* ================= ROOT ================= */
.events-calendar {
    font-family: Segoe UI, Arial, sans-serif;
    background: #f5f7fb;
    padding: 18px 24px;
}

/* ================= ADD EVENT ================= */
.add-event-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

    /* IMPORTANT:
   - Do NOT use fixed height with large padding
   - Use min-height + box-sizing
*/
    .add-event-box input,
    .add-event-box select {
        min-height: 32px; /* allows content to size correctly */
        padding: 6px 8px; /* safe vertical padding */
        font-size: 13px;
        border: 1px solid #cfcfcf;
        border-radius: 3px;
        box-sizing: border-box; /* CRITICAL */
        background-color: #fff;
    }

        /* Event Title – slightly larger but still safe */
        .add-event-box input[placeholder="Event Title"] {
            min-height: 40px;
            padding: 8px 12px;
            font-size: 14px;
        }

/* ================= VIEW SWITCH ================= */
.calendar-view-switch {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 10px;
}

    .calendar-view-switch button {
        border: 1px solid #cfcfcf;
        background: #fff;
        padding: 5px 10px;
        font-size: 13px;
        border-radius: 3px;
        cursor: pointer;
    }

        .calendar-view-switch button.active {
            background: #e0e0e0;
            font-weight: 600;
        }

/* ================= HEADER ================= */
.calendar-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    margin: 12px 0;
}

    .calendar-top button {
        border: 1px solid #cfcfcf;
        background: #fff;
        padding: 4px 10px;
        border-radius: 3px;
        cursor: pointer;
    }

.month-title {
    text-align: center;
    font-size: 22px;
    font-weight: 500;
}

/* ================= MAIN LAYOUT ================= */
.calendar-layout {
    display: grid;
    grid-template-columns: 3fr 1.3fr;
    gap: 24px;
}

/* ================= GRID ================= */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 160px;
    background: #fff;
    border: 1px solid #ddd;
}

/* ================= CELLS ================= */
.calendar-cell {
    border: 1px solid #eee;
    padding: 6px;
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

    .calendar-cell.other-month {
        background: #fafafa;
        color: #aaa;
    }

.cell-date {
    font-weight: 600;
    margin-bottom: 4px;
}

/* ================= EVENTS ================= */
.calendar-event {
    padding: 4px 6px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-webinar {
    background: #7b1fa2;
}

.event-seminar {
    background: #d32f2f;
}

.event-free {
    background: #1976d2;
}

/* ================= LIST / WEEK ================= */
.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ================= DAY VIEW ================= */
.calendar-day {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px;
}

/* ================= EVENT DETAILS ================= */
.calendar-details {
    border-left: 1px solid #ddd;
    padding-left: 16px;
}

    .calendar-details h4 {
        font-size: 15px;
        font-weight: 600;
        margin-bottom: 6px;
    }

    .calendar-details p {
        font-size: 13px;
        color: #666;
        margin: 4px 0;
    }

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }

    .calendar-details {
        border-left: none;
        padding-left: 0;
        margin-top: 16px;
    }
}

.add-event-box input[placeholder="Event Title"] {
    width: 360px; /* increase length only */
}
