.uspace-event-calendar-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
    font-family: inherit;
    color: #223235;
}

.uspace-event-calendar-wrapper button,
.uspace-event-calendar-wrapper button:hover,
.uspace-event-calendar-wrapper button:focus,
.uspace-event-calendar-wrapper button:focus-visible,
.uspace-event-calendar-wrapper button:active {
    appearance: none;
    background-image: none !important;
    text-shadow: none !important;
}

.uspace-evt-weekbar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.uspace-evt-weekbar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.uspace-evt-list-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.uspace-evt-selected-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #768b90;
}

.uspace-evt-selected-date {
    font-size: 1.15rem;
    line-height: 1.3;
    color: #17343d;
    font-weight: 500;
}

.uspace-evt-cal-toggle {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dce5e7;
    border-radius: 999px;
    background: #ffffff;
    color: #17343d;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 18px rgba(16, 40, 45, 0.08);
}

.uspace-event-calendar-wrapper .uspace-evt-cal-toggle:hover,
.uspace-event-calendar-wrapper .uspace-evt-cal-toggle:focus,
.uspace-event-calendar-wrapper .uspace-evt-cal-toggle:focus-visible {
    transform: translateY(-1px);
    border-color: #c5d5d8;
    box-shadow: 0 12px 24px rgba(16, 40, 45, 0.12);
    background-image: none !important;
    border-image: none !important;
    text-shadow: none !important;
}

.uspace-evt-cal-toggle:focus,
.uspace-evt-cal-toggle:focus-visible {
    outline: none;
}

.uspace-evt-weekstrip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
}

.uspace-evt-weekday {
    min-width: 0;
    padding: 14px 10px;
    border: 1px solid #dde7e8;
    border-radius: 16px;
    background: #f7faf9;
    color: #4d676f;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    cursor: default;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.uspace-week-align-center .uspace-evt-weekday {
    align-items: center;
}

.uspace-week-align-right .uspace-evt-weekday {
    align-items: flex-end;
}

.uspace-evt-weekday-name {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.uspace-evt-weekday-date {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
}

.uspace-evt-weekday.has-events {
    cursor: pointer;
    background: #eef5f4;
    border-color: #c7d8d6;
    color: #17343d;
}

.uspace-event-calendar-wrapper .uspace-evt-weekday.has-events:hover,
.uspace-event-calendar-wrapper .uspace-evt-weekday.has-events:focus,
.uspace-event-calendar-wrapper .uspace-evt-weekday.has-events:focus-visible {
    transform: translateY(-2px);
    background: #e8f1f0 !important;
    border-color: #c7d8d6 !important;
    border-image: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    outline: none !important;
}

.uspace-evt-weekday.active {
    background: #17343d;
    border-color: #17343d;
    color: #ffffff;
}

.uspace-evt-weekday:disabled {
    opacity: 0.55;
    pointer-events: none;
}

.uspace-evt-list-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.uspace-evt-loader {
    display: none;
    padding: 28px 16px;
    text-align: center;
    font-size: 1rem;
    color: #5f7378;
}

.uspace-evt-inner-list {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.uspace-evt-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e3eaec;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(22, 45, 49, 0.06);
}

.uspace-evt-media {
    width: 100%;
    overflow: hidden;
}

.uspace-evt-img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.uspace-evt-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px 20px 22px;
}

.uspace-evt-date {
    font-size: 0.84rem;
    color: #6c8288;
    margin-bottom: 6px;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.uspace-evt-title {
    margin: 0 0 8px 0 !important;
    font-size: 1.2rem;
    line-height: 1.2;
    color: #2f6774;
    font-weight: 500;
}

.uspace-evt-title a {
    color: inherit;
    text-decoration: none;
}

.uspace-evt-title a:hover {
    text-decoration: underline;
}

.uspace-evt-time {
    font-size: 0.88rem;
    color: #223235;
    margin-bottom: 12px;
}

.uspace-evt-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #566a6f;
}

.uspace-evt-empty {
    padding: 22px 18px;
    background: #f5f7f8;
    border: 1px solid #e4ebed;
    border-radius: 16px;
    text-align: center;
    color: #586d73;
}

.uspace-evt-cal-overlay[hidden] {
    display: none;
}

.uspace-evt-cal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.uspace-evt-cal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 25, 30, 0.48);
    backdrop-filter: blur(2px);
}

.uspace-evt-cal-panel {
    position: relative;
    width: min(100%, 420px);
    background: linear-gradient(180deg, #0f3642 0%, #0c2c36 100%);
    border-radius: 24px;
    padding: 22px;
    color: #fff;
    box-sizing: border-box;
    box-shadow: 0 24px 60px rgba(10, 33, 40, 0.22);
}

.uspace-evt-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 12px;
}

.uspace-evt-cal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.2;
    color: #f0d28e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.uspace-evt-cal-nav {
    display: flex;
    gap: 8px;
}

.uspace-evt-cal-nav button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f0d28e;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.uspace-event-calendar-wrapper .uspace-evt-cal-nav button:hover,
.uspace-event-calendar-wrapper .uspace-evt-cal-nav button:focus,
.uspace-event-calendar-wrapper .uspace-evt-cal-nav button:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    border-image: none !important;
    text-shadow: none !important;
}

.uspace-evt-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    text-align: center;
}

.uspace-evt-cal-dow {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.05em;
    padding-bottom: 6px;
}

.uspace-evt-cal-day {
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.65);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    cursor: default;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.uspace-evt-cal-day.empty {
    visibility: hidden;
}

.uspace-evt-cal-day.has-events {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(240, 210, 142, 0.45);
    color: #fff;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(240, 210, 142, 0.3);
}

.uspace-event-calendar-wrapper .uspace-evt-cal-day.has-events:hover,
.uspace-event-calendar-wrapper .uspace-evt-cal-day.has-events:focus,
.uspace-event-calendar-wrapper .uspace-evt-cal-day.has-events:focus-visible {
    background: rgba(240, 210, 142, 0.18);
    transform: translateY(-1px);
    border-image: none !important;
    text-shadow: none !important;
}

.uspace-evt-cal-day.active {
    background: #f0d28e;
    border-color: #f0d28e;
    color: #14323d;
    font-weight: 700;
}

.uspace-evt-cal-day:disabled {
    opacity: 1;
    pointer-events: none;
}

@media (max-width: 900px) {
    .uspace-evt-weekstrip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .uspace-evt-inner-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .uspace-event-calendar-wrapper {
        gap: 22px;
    }

    .uspace-evt-weekbar-head {
        align-items: flex-start;
    }

    .uspace-evt-weekstrip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .uspace-evt-cal-overlay {
        padding: 16px;
    }

    .uspace-evt-cal-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .uspace-evt-cal-grid {
        gap: 6px;
    }
}
