.case-events-calendar-section #case-calendar-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    font-size: 16px;
}

.case-events-calendar-section #case-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.case-events-calendar-section #case-calendar-header button {
    background: #2980b9;
    color: #fff;
    border: none;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.2s;
}

.case-events-calendar-section #case-calendar-header button:hover {
    background: #1f5f87;
}

.case-events-calendar-section #case-calendar {
    width: 100%;
    overflow-x: auto;
}

.case-events-calendar-section #case-calendar table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    table-layout: fixed;
}

.case-events-calendar-section #case-calendar th {
    background: #2c3e50;
    color: #fff;
    padding: 6px;
    font-size: 13px;
}

.case-events-calendar-section #case-calendar td {
    padding: 8px;
    cursor: pointer;
    position: relative;
    vertical-align: top;
    height: 60px;
    border: 1px solid #ddd;
    transition: 0.2s;
    font-size: 14px;
    color: #2c3e50;
    min-width: 44px;
}

.case-events-calendar-section #case-calendar td:hover {
    background: #f0f8ff;
}

.case-events-calendar-section #case-calendar td.case-today {
    background: #ffefc2;
    font-weight: bold;
}

.case-events-calendar-section #case-calendar td.case-past-date {
    background: #fff7ed;
    color: #b26a00;
}

.case-events-calendar-section #case-calendar td.case-active {
    background: #eaf4ff;
    box-shadow: inset 0 0 0 2px #2980b9;
}

.case-events-calendar-section .case-day-number {
    display: block;
}

.case-events-calendar-section .case-event-count {
    display: block;
    font-size: 12px;
    color: white;
    background: #2980b9;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 20px;
    margin: 5px auto 0;
}

.case-events-calendar-section .case-event-count-empty {
    visibility: hidden;
}

.case-events-calendar-section #case-events-wrapper {
    margin-top: 50px;
}

.case-events-calendar-section #case-events {
    margin-top: 20px;
}

.case-events-calendar-section .case-event-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.case-events-calendar-section .case-event-left {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
}

.case-events-calendar-section .case-event-left img {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.case-events-calendar-section .case-event-no-image {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border-radius: 6px;
}

.case-events-calendar-section .case-event-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.case-events-calendar-section .case-event-datetime {
    font-weight: bold;
    color: #2c3e50;
    font-size: 14px;
}

.case-events-calendar-section .case-event-title {
    color: #2980b9;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

.case-events-calendar-section .case-event-title:hover {
    text-decoration: underline;
}

.case-events-calendar-section .case-event-meta {
    font-size: 13px;
    color: #555;
}

.case-events-calendar-section .case-event-meta strong {
    color: #2c3e50;
}

.case-events-calendar-section .case-event-categories {
    font-size: 13px;
    color: #2980b9;
}

.case-events-calendar-section .case-no-events {
    font-size: 14px;
    color: #7f8c8d;
    font-style: italic;
}

@media (max-width: 768px) {

    .case-events-calendar-section #case-calendar td {
        height: 50px;
        font-size: 13px;
    }

    .case-events-calendar-section #case-calendar-header {
        font-size: 16px;
    }

    .case-events-calendar-section #case-calendar-header button {
        padding: 4px 8px;
        font-size: 14px;
    }

    .case-events-calendar-section .case-event-item {
        flex-direction: column;
    }

    .case-events-calendar-section .case-event-left,
    .case-events-calendar-section .case-event-left img,
    .case-events-calendar-section .case-event-no-image {
        width: 100% !important;
        max-width: 100% !important;
        height: 140px !important;
    }

    .case-events-calendar-section #case-events-title {
        font-size: 15px;
        text-align: center;
        line-height: 1.3;
        width: 100%;
    }
}