.wec-calendar {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.wec-calendar,
.wec-calendar * {
    box-sizing: border-box;
}

.wec-calendar.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.wec-calendar-wrapper {
    width: 100%;
    max-width: 100%;
    border: 1px solid #dcdfe4;
    border-radius: 12px;
    overflow: visible;
    background: #ffffff;
}

.wec-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #e7eaf0;
    background: #f8fafc;
}

.wec-calendar-nav__title {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 700;
    text-align: center;
    color: #1f2937;
}

.wec-calendar-nav__link {
    appearance: none;
    border: 1px solid #d0d7e2;
    background: #ffffff;
    color: #1f2937;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.2;
}

.wec-calendar-nav__link:hover {
    background: #f3f4f6;
}

.wec-calendar-table-wrap {
    width: 100%;
    overflow: visible;
}

.wec-calendar-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.wec-calendar-table th,
.wec-calendar-table td {
    border: 1px solid #e7eaf0;
    width: calc(100% / 7);
}

.wec-calendar-table th {
    padding: 10px 4px;
    text-align: center;
    font-weight: 700;
    font-size: clamp(10px, 1.1vw, 13px);
    background: #ffffff;
    color: #4b5563;
}

.wec-day {
    vertical-align: top;
    height: clamp(44px, 7vw, 56px);
    padding: 6px 8px;
    background: #ffffff;
}

.wec-day.is-outside-month {
    background: #f8fafc;
    color: #9ca3af;
}

.wec-day.is-today {
    background: #eff6ff;
}

.wec-day-number {
    font-size: clamp(11px, 1.2vw, 14px);
    font-weight: 700;
    color: #111827;
}

.wec-day.is-outside-month .wec-day-number {
    color: #9ca3af;
}

.wec-events-row td {
    padding: 4px 4px 8px;
    vertical-align: top;
    background: #ffffff;
}

.wec-events-row.is-empty td {
    height: 14px;
    padding: 0;
    background: #ffffff;
}

.wec-events-spacer {
    background: #ffffff;
}

.wec-event-cell {
    position: relative;
    background: #ffffff;
}

.wec-event-wrap {
    position: relative;
}

.wec-event {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    border: 0;
    cursor: pointer;
    font-size: clamp(10px, 1vw, 12px);
    line-height: 1.3;
    padding: 7px 9px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1e3a8a;
    overflow: hidden;
}


.wec-event.is-related-hover {
    background-color: var(--e-global-color-accent);
	color: #fff;
    box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.18);
}

.wec-event.is-continued-left {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 7px;
}

.wec-event.is-continued-right {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding-right: 7px;
}

.wec-event__title {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wec-event__continuation {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    opacity: 0.85;
}

.wec-event__continuation::before,
.wec-event__continuation::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 3px;
    height: 3px;
    margin-top: -1.5px;
    border-radius: 50%;
    background: currentColor;
}

.wec-event__continuation::before {
    left: 0;
}

.wec-event__continuation::after {
    right: 0;
}

.wec-event-wrap.has-popup .wec-event::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-left: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    vertical-align: middle;
}

.wec-event-wrap.is-open .wec-event::after {
    transform: rotate(-135deg) translateY(-1px);
}

.wec-event-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    width: min(320px, calc(100vw - 32px));
}

.wec-event-popover__inner {
    background: #ffffff;
    border: 1px solid #d0d7e2;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    padding: 14px;
}

.wec-event-popover__title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.wec-event-popover__content {
    font-size: 13px;
    line-height: 1.55;
    color: #374151;
}

.wec-event-popover__content p {
    margin: 0 0 10px;
}

.wec-event-popover__content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .wec-calendar-nav {
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 12px;
    }

    .wec-calendar-nav__title {
        width: 100%;
        order: -1;
        font-size: 17px;
    }

    .wec-calendar-nav__link {
        flex: 0 1 auto;
        font-size: 13px;
        padding: 7px 10px;
    }

    .wec-calendar-table th {
        padding: 8px 2px;
        font-size: 10px;
    }

    .wec-day {
        height: 42px;
        padding: 5px 6px;
    }

    .wec-day-number {
        font-size: 11px;
    }

    .wec-events-row td {
        padding: 3px 2px 6px;
    }

    .wec-event {
        padding: 6px 7px;
        font-size: 10px;
        border-radius: 6px;
    }

    .wec-event-popover {
        left: 0;
        width: min(260px, calc(100vw - 24px));
    }
}
