/* ==========================================================================
   EventX — Event Showcase widget
   ========================================================================== */

/* Neutralize theme button styling that otherwise leaks in on hover/focus/active. */
.eventx-showcase button {
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    text-shadow: none;
}

.eventx-showcase button:focus {
    outline: none;
    box-shadow: none;
}

.eventx-showcase {
    display: grid;
    /* Card takes all remaining space; calendar gets a fixed, narrow width
       (tunable from Elementor via --eventx-cal-width). */
    grid-template-columns: minmax(0, 1fr) var(--eventx-cal-width, 380px);
    gap: 20px;
    align-items: stretch;
}

.eventx-showcase--empty {
    display: block;
    padding: 30px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    color: #777;
}

/* ---------- Card slider ---------- */
.eventx-showcase__cards {
    position: relative;
    /* min-height acts as a floor; the grid's align-items:stretch makes the
       card match the calendar's height so the two columns stay symmetric. */
    min-height: 340px;
    overflow: hidden;
    border-radius: 10px;
}

.eventx-showcase__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease;
}

.eventx-showcase__slide.is-active {
    opacity: 1;
    visibility: visible;
}

.eventx-showcase__slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
}

.eventx-showcase__slide-bg--placeholder {
    background: linear-gradient(135deg, #3a3a3a, #111);
}

.eventx-showcase__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .8) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0) 75%);
}

.eventx-showcase__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    background: #e4002b;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 8px 14px;
    border-radius: 4px;
}

.eventx-showcase__content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 24px;
    color: #fff;
}

.eventx-showcase__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.eventx-showcase__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10, 10, 10, .55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 8px;
}

.eventx-showcase__pill i {
    font-size: 14px;
}

.eventx-showcase__title {
    margin: 0 0 12px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 700;
    color: #fff;
}

.eventx-showcase__title a {
    color: inherit;
    text-decoration: none;
}

.eventx-showcase__title a:hover {
    text-decoration: underline;
}

.eventx-showcase__location {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    opacity: .9;
}

/* Nav arrows */
.eventx-showcase__nav {
    position: absolute;
    top: 16px;
    z-index: 4;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    border-radius: 6px;
    transition: background .2s ease;
}

.eventx-showcase__nav:hover,
.eventx-showcase__nav:focus,
.eventx-showcase__nav:active {
    background: rgba(0, 0, 0, .75);
    color: #fff;
}

.eventx-showcase__nav--prev {
    right: 58px;
}

.eventx-showcase__nav--next {
    right: 16px;
}

/* Dots */
.eventx-showcase__dots {
    position: absolute;
    bottom: 16px;
    right: 24px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.eventx-showcase__dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: background .2s ease, width .2s ease;
}

.eventx-showcase__dot:hover,
.eventx-showcase__dot:focus,
.eventx-showcase__dot:active {
    background: rgba(255, 255, 255, .7);
}

.eventx-showcase__dot.is-active {
    background: #fff;
    width: 22px;
    border-radius: 5px;
}

/* ---------- Calendar ---------- */
.eventx-showcase__calendar {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
    color: #1a1a1a;
}

.eventx-showcase__calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.eventx-showcase__calendar-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.2px;
}

.eventx-showcase__calendar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.eventx-showcase__calendar-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #888;
    transition: color .15s ease, background .15s ease;
}

.eventx-showcase__calendar-nav button:hover,
.eventx-showcase__calendar-nav button:focus,
.eventx-showcase__calendar-nav button:active {
    background: #f5f5f5;
    color: #222;
}

.eventx-showcase__month {
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 14px;
    color: #1a1a1a;
}

.eventx-showcase__weekdays,
.eventx-showcase__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.eventx-showcase__weekdays span {
    font-size: 12px;
    font-weight: 600;
    color: #9a9a9a;
    padding: 6px 0;
}

.eventx-day {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    color: inherit;
}

.eventx-day--empty {
    visibility: hidden;
}

.eventx-day.has-event {
    cursor: pointer;
    font-weight: 600;
}

.eventx-day.has-event::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #19b5a5;
}

.eventx-day.is-today {
    background: #e4002b;
    color: #fff;
}

.eventx-day.is-today.has-event::after {
    background: #fff;
}

.eventx-day.is-selected {
    background: #19b5a5;
    color: #fff;
}

.eventx-day.is-selected.has-event::after {
    background: #fff;
}

/* Legend */
.eventx-showcase__legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.eventx-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
}

.eventx-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.eventx-legend__dot--today {
    background: #e4002b;
}

.eventx-legend__dot--event {
    background: #19b5a5;
}

/* ---------- Scroll animation ---------- */
@keyframes eventx-cal-unfurl {
    0% {
        clip-path: inset(0 0 100% 0 round 10px);
        transform: translateY(-8px);
        opacity: 0;
    }
    35% {
        opacity: 1;
    }
    100% {
        clip-path: inset(0 0 0% 0 round 10px);
        transform: translateY(0);
        opacity: 1;
    }
}

.eventx-showcase__calendar.eventx-cal-anim-ready {
    clip-path: inset(0 0 100% 0 round 10px);
    opacity: 0;
    transform: translateY(-8px);
    will-change: clip-path, opacity, transform;
}

.eventx-showcase__calendar.eventx-cal-anim-in {
    animation: eventx-cal-unfurl 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
    .eventx-showcase__calendar.eventx-cal-anim-ready {
        clip-path: none;
        opacity: 1;
        transform: none;
    }
    .eventx-showcase__calendar.eventx-cal-anim-in {
        animation: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .eventx-showcase {
        grid-template-columns: 1fr;
    }

    .eventx-showcase__title {
        font-size: 21px;
    }
}
