.cbc-calendar {
    border: 1px solid #d9d9d9;
    background: #fff;
    padding: 6px;
    max-width: 100%;
}

.cbc-calendar-title {
    margin: 0 0 16px;
    font-size: 1.5rem;
}

.cbc-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.cbc-calendar-month-label {
    font-weight: 700;
    font-size: 1.1rem;
}

.cbc-nav-button {
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #333;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.cbc-nav-button[disabled] {
    opacity: 0.5;
    cursor: wait;
}

.cbc-calendar-grid-wrapper {
    overflow-x: auto;
}

.cbc-calendar-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.cbc-calendar-grid th,
.cbc-calendar-grid td {
    border: 1px solid #ececec;
    vertical-align: top;
}

.cbc-calendar-grid th {
    padding: 4px 2px;
    background: #f7f7f7;
    text-align: center;
    font-weight: 600;
    font-size: 0.82rem;
}

.cbc-day {
    min-height: 64px;
    padding: 2px 3px;
    background: var(--cbc-bg, #f8f8f8);
    color: var(--cbc-text, #333);
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cbc-mode-compact .cbc-day {
    min-height: 56px;
    padding: 2px;
}

.cbc-mode-sidebar .cbc-calendar-grid th {
    padding: 2px 1px;
    font-size: 0.68rem;
}

.cbc-mode-sidebar .cbc-day {
    min-height: 24px;
    padding: 1px;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.cbc-mode-sidebar .cbc-day-empty {
    min-height: 24px;
}

.cbc-mode-sidebar .cbc-day-number {
    font-size: 0.68rem;
    line-height: 1;
}

.cbc-mode-sidebar .cbc-calendar-header {
    margin-bottom: 4px;
}

.cbc-mode-sidebar .cbc-calendar-month-label {
    font-size: 0.88rem;
}

.cbc-mode-sidebar .cbc-nav-button {
    width: 24px;
    height: 24px;
    font-size: 0.95rem;
}

.cbc-day-clickable {
    position: relative;
    transition: transform 0.14s ease, box-shadow 0.14s ease, outline-color 0.14s ease;
}

.cbc-day-clickable::after {
    content: "";
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(47, 111, 237, 0.7);
    opacity: 0.95;
}

.cbc-mode-sidebar .cbc-day-clickable {
    cursor: pointer;
}

.cbc-mode-sidebar .cbc-day-clickable:hover {
    box-shadow: inset 0 0 0 2px rgba(47, 111, 237, 0.18);
}

.cbc-day-clickable.is-active {
    outline: 2px solid #2f6fed;
    outline-offset: -2px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
    transform: scale(1.03);
}

.cbc-day-empty {
    min-height: 64px;
    background: #fbfbfb;
}

.cbc-day-number {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.15;
}

.cbc-day-status,
.cbc-day-event,
.cbc-day-hours {
    display: block;
    font-size: 0.66rem;
    line-height: 1.2;
    word-break: break-word;
}

.cbc-day-status {
    font-weight: 600;
}

.cbc-day-hours {
    opacity: 0.92;
}

.cbc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.cbc-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.cbc-calendar-note {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e5e5e5;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #444;
    white-space: normal;
}

.cbc-tooltip {
    margin-top: 10px;
    padding: 10px 12px;
    border: 2px solid #2f6fed;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
    box-shadow: 0 10px 28px rgba(47, 111, 237, 0.18);
    font-size: 0.8rem;
    line-height: 1.6;
    color: #1f2a37;
    position: relative;
}

.cbc-tooltip[hidden] {
    display: none;
}

.cbc-tooltip.is-visible {
    animation: cbcTooltipPop 0.18s ease-out;
}

.cbc-tooltip::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 18px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-left: 2px solid #2f6fed;
    border-top: 2px solid #2f6fed;
    transform: rotate(45deg);
}

.cbc-tooltip-date {
    font-weight: 700;
    margin-bottom: 6px;
    color: #1746a2;
    font-size: 0.82rem;
}

.cbc-tooltip-body {
    font-size: 0.78rem;
}

.cbc-mode-sidebar .cbc-legend {
    gap: 8px;
    margin-top: 8px;
}

.cbc-mode-sidebar .cbc-legend-item {
    font-size: 0.78rem;
}

.cbc-mode-sidebar .cbc-legend-swatch {
    width: 10px;
    height: 10px;
}

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

.cbc-legend-swatch {
    width: 14px;
    height: 14px;
    display: inline-block;
}

.cbc-calendar-grid-wrapper .cbc-calendar-grid td {
    border: 1px solid #ccc;
    padding: 0.1em;
    line-height: 2.4;
    background: #fff;
}

@media (max-width: 767px) {
    .cbc-calendar {
        padding: 4px;
    }

    .cbc-mobile-mode-sidebar .cbc-calendar-grid th {
        padding: 2px 1px;
        font-size: 0.68rem;
    }

    .cbc-mobile-mode-sidebar .cbc-day {
        min-height: 24px;
        padding: 1px;
        align-items: center;
        justify-content: center;
    }

    .cbc-mobile-mode-sidebar .cbc-day-empty {
        min-height: 24px;
    }

    .cbc-mobile-mode-sidebar .cbc-day-number {
        font-size: 0.68rem;
        line-height: 1;
    }

    .cbc-mobile-mode-sidebar .cbc-day-clickable {
        cursor: pointer;
    }

    .cbc-mobile-mode-sidebar .cbc-day-clickable:hover {
        box-shadow: inset 0 0 0 2px rgba(47, 111, 237, 0.18);
    }

    .cbc-mobile-mode-sidebar .cbc-day-clickable::after {
        right: 2px;
        bottom: 2px;
        width: 4px;
        height: 4px;
    }

    .cbc-mobile-mode-sidebar .cbc-calendar-header {
        margin-bottom: 4px;
    }

    .cbc-mobile-mode-sidebar .cbc-calendar-month-label {
        font-size: 0.88rem;
    }

    .cbc-mobile-mode-sidebar .cbc-nav-button {
        width: 24px;
        height: 24px;
        font-size: 0.95rem;
    }

    .cbc-mobile-mode-sidebar .cbc-day-status,
    .cbc-mobile-mode-sidebar .cbc-day-event,
    .cbc-mobile-mode-sidebar .cbc-day-hours {
        display: none;
    }

    .cbc-mobile-mode-sidebar .cbc-legend {
        gap: 8px;
        margin-top: 8px;
    }

    .cbc-mobile-mode-sidebar .cbc-legend-item {
        font-size: 0.78rem;
    }

    .cbc-mobile-mode-sidebar .cbc-legend-swatch {
        width: 10px;
        height: 10px;
    }

    .cbc-day {
        min-height: 52px;
        padding: 2px;
    }

    .cbc-day-status,
    .cbc-day-event,
    .cbc-day-hours {
        font-size: 0.62rem;
    }
}