/* Scoped to the Elementor Loop Item classes configured in the editor. */
.cp-event-card { position:relative; }
.cp-event-card-image { position:relative; }
/* Elementor wraps Shortcode widgets in its own element; position that wrapper over the image. */
.cp-event-card-image .elementor-widget-shortcode:has(.cp-event-card-badge) { position:absolute!important;top:12px;right:12px;z-index:5;width:auto!important;max-width:calc(100% - 24px);margin:0!important; }
.cp-event-card-image .elementor-widget-shortcode:has(.cp-event-card-badge) .elementor-widget-container { margin:0!important;padding:0!important; }
.cp-event-card-image .cp-event-card-badge { position:static; }
.cp-event-card-badge { display:inline-flex;align-items:center;background:#151936;color:#fff;border-radius:16px;padding:4px 11px;gap:5px;line-height:1.3;font-size:11px;font-weight:700;letter-spacing:.02em; }
.cp-event-card--locked { background:#f5f5f6!important;border-color:#dedee2!important; }
.cp-event-card--locked .cp-event-card-image img { filter:grayscale(1);opacity:.48; }
.cp-event-card--locked .cp-event-card-content :is(h2,h3,h4,.elementor-heading-title) { color:#62636c!important; }
.cp-event-card--locked .cp-event-card-content .cp-event-card-link { color:#3547ef!important; }
.cp-event-card-notice {font-size:13px;line-height:1.45;margin:0;color:#555;}
.cp-event-card-notice--expiring {font-style:italic;}
.cp-event-card-notice--locked {font-style:normal;color:#62636c;}
.cp-events-upgrade-banner {display:flex;justify-content:space-between;align-items:center;gap:12px 24px;background:rgb(242, 242, 242);padding:20px 24px;color:#131639;}
.cp-events-upgrade-banner a {font-size:15px;display:inline-block;background:#d4384a;color:#fff!important;border-radius:56px;padding:12px 24px;font-weight:700;text-decoration:none;white-space:nowrap;}
.cp-events-single-promo {background:#151936;color:#fff;padding:32px;border-radius:8px;min-height:100%;display:flex;flex-direction:column;justify-content:center;gap:16px;}
.cp-events-single-promo .cp-events-promo-eyebrow {color:#7ee8c3;font-size:11px;letter-spacing:.07em;font-weight:700;}
.cp-events-single-promo h3 {color:#fff;font-size:25px;line-height:1.2;margin:0;}
.cp-events-single-promo p {color:#d4d6e2;line-height:1.6;margin:0;}
.cp-events-single-promo a {align-self:flex-start;display:inline-block;background:#7ee8c3;color:#151936!important;border-radius:24px;padding:11px 22px;font-weight:700;text-decoration:none;}
@media(max-width:767px){.cp-events-upgrade-banner{flex-direction:column;align-items:flex-start}.cp-events-single-promo{min-height:0}}

/* Muted dates on locked cards only; do not desaturate dates on accessible cards. */
.cp-event-card--locked .cp-event-card-date-range { color:#62636c!important; }
.cp-event-card-badge .cp-event-card-lock { display:block;flex:none;width:12px;height:12px; }
/* Consistent spacing between event images and content */
.cp-event-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 12px !important;
}

/* Image container should not stretch */
.cp-event-card > .cp-event-card-image {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

/* Content starts immediately after the image */
.cp-event-card > .cp-event-card-content {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    padding-top: 0 !important;
}

/* Keep action links at the bottom of each card */
.cp-event-card-content .cp-event-card-link {
    margin-top: auto;
}

/* Consistent image container height for all Event cards */
.cp-event-card .cp-event-card-image {
    position: relative;
    aspect-ratio: 620 / 350;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
}

/* Image fills the container */
.cp-event-card .cp-event-card-image
.elementor-widget-image {
    width: 100%;
}

.cp-event-card .cp-event-card-image img {
    display: block;
    width: 100%;
    aspect-ratio: 620 / 350;
    object-fit: cover;
}

/* Badge stays over the image */
.cp-event-card .cp-event-card-image
.elementor-widget-shortcode {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: auto;
}

/* Make the content container fill the remaining card height */
.cp-event-card .cp-event-card-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0;
}

/* Push the final action widget to the bottom */
.cp-event-card .cp-event-card-content
.elementor-widget-text-editor:last-child {
    margin-top: auto !important;
}

/* v1.3.23: Switch between two independently configured Elementor containers.
   These classes are set on the archive body in listing-enhancements.php.
   Keep the Elementor Single Loop Grid at 1 column and Standard at 3. */
body.post-type-archive-event.cp-events-single-layout .cp-events-layout-standard,
body.post-type-archive-event.cp-events-standard-layout .cp-events-layout-single {
    display: none !important;
}

/* Do not let old Elementor flex settings compress the single card. */
body.post-type-archive-event.cp-events-single-layout .cp-events-layout-single {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
}
body.post-type-archive-event.cp-events-single-layout .cp-events-layout-single > .elementor-widget-loop-grid {
    flex: 0 0 340px !important;
    width: 340px !important;
    max-width: 340px !important;
}
body.post-type-archive-event.cp-events-single-layout .cp-events-layout-single > .elementor-widget-shortcode {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0;
}
@media (max-width: 767px) {
    body.post-type-archive-event.cp-events-single-layout .cp-events-layout-single {
        flex-direction: column !important;
    }
    body.post-type-archive-event.cp-events-single-layout .cp-events-layout-single > .elementor-widget-loop-grid,
    body.post-type-archive-event.cp-events-single-layout .cp-events-layout-single > .elementor-widget-shortcode {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 1 auto !important;
    }
}
