/* ==========================================================================
   EP Event Cancellation - Public Styles
   ========================================================================== */

/* Cancellation Banner */
.epec-cancelled-banner {
    color: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.epec-cancelled-banner-inner {
    padding: 16px 20px;
}

.epec-cancelled-icon {
    font-size: 18px;
    margin-right: 6px;
    vertical-align: middle;
}

.epec-cancelled-banner strong {
    font-size: 16px;
    vertical-align: middle;
}

.epec-cancel-reason {
    margin: 8px 0 0;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Cancelled Event Card Overlay */
.epec-event-cancelled {
    position: relative;
    opacity: 0.7;
}

.epec-event-cancelled::after {
    content: 'CANCELLED';
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    z-index: 10;
    pointer-events: none;
}

/* Hide booking button on cancelled events — exclude our own cancel card */
.epec-event-cancelled .em-events-button,
.epec-event-cancelled .ep-buy-ticket-section:not(.epec-cancelled-card) {
    display: none !important;
}

/* On the single event page the cancel card replaces the badge — hide badge and restore opacity */
.single-em_event .epec-event-cancelled::after {
    display: none;
}

.single-em_event .epec-event-cancelled {
    opacity: 1;
}

/* ==========================================================================
   Threshold Progress Bar
   ========================================================================== */

.epec-threshold-notice {
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid;
}

/* Pending (not reached) */
.epec-threshold-pending {
    border-color: #ffc107;
    background: #fff8e1;
    color: #333;
}

/* Reached */
.epec-threshold-reached {
    border-color: #28a745;
    background: #e8f5e9;
    color: #1b5e20;
}

.epec-threshold-icon-check {
    font-size: 18px;
    color: #28a745;
    margin-right: 6px;
    vertical-align: middle;
}

.epec-threshold-text {
    margin-bottom: 12px;
    text-align: center;
}

.epec-threshold-text strong {
    font-size: 14px;
    line-height: 1.5;
}

/* Progress Bar */
.epec-threshold-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.epec-progress-bar {
    flex: 1;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.epec-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.epec-progress-count {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    color: #555;
    min-width: 50px;
    text-align: right;
}

/* ==========================================================================
   Blocksy position: is-width-constrained wrapper
   ========================================================================== */

.is-width-constrained > .epec-threshold-notice {
    margin-bottom: 24px;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .epec-cancelled-banner-inner {
        padding: 12px 14px;
    }

    .epec-cancelled-banner strong {
        font-size: 14px;
    }

    .epec-threshold-progress {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .epec-progress-count {
        text-align: center;
    }
}
