/* =============================================================
   EventFlow – Frontend Styles
   All visual defaults. Elementor widget controls override these
   via inline CSS injected by Elementor's style engine.
   ============================================================= */

/* ── Base reset for plugin elements ──────────────────────────── */
.ef-event-grid,
.ef-event-list,
.ef-countdown,
.ef-filter-bar,
.ef-event-card,
.ef-event-list__item,
.ef-event-details-box {
    box-sizing: border-box;
}

.ef-event-card *,
.ef-event-list__item *,
.ef-event-details-box * {
    box-sizing: border-box;
}

/* ── Event Grid ───────────────────────────────────────────────── */
.ef-event-grid {
    display: grid;
    gap: 24px;
}

.ef-event-grid--cols-1 { grid-template-columns: 1fr; }
.ef-event-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ef-event-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ef-event-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .ef-event-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
    .ef-event-grid--cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .ef-event-grid--cols-2,
    .ef-event-grid--cols-3,
    .ef-event-grid--cols-4 { grid-template-columns: 1fr; }
}

/* ── Event Card ───────────────────────────────────────────────── */
.ef-event-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ef-event-card:hover {
    transform: translateY(-3px);
}

.ef-event-card__image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.ef-event-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ef-event-card:hover .ef-event-card__image img {
    transform: scale(1.04);
}

.ef-event-card__badges {
    padding: 16px 16px 0;
}

.ef-event-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.ef-event-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.ef-event-card__title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.ef-event-card__title a:hover {
    color: #6c63ff;
}

.ef-event-card__excerpt {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
}

.ef-event-card__meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.ef-event-card__meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6b7280;
}

.ef-event-card__meta .ef-icon {
    font-size: 14px;
    color: #6c63ff;
    flex-shrink: 0;
}

.ef-event-card__cta {
    display: inline-block;
    background: #6c63ff;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.ef-event-card__cta:hover {
    background: #5b52e0;
    transform: translateY(-1px);
    color: #ffffff;
}

/* ── Badge ────────────────────────────────────────────────────── */
.ef-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #6c63ff;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1;
}

.ef-event-card__badges .ef-badge,
.ef-event-list__meta .ef-badge {
    position: static;
    display: inline-block;
}

.ef-badge--sm {
    font-size: 0.68rem;
    padding: 3px 8px;
}

/* ── No Events ────────────────────────────────────────────────── */
.ef-no-events {
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 40px 0;
}

/* ── Event List ───────────────────────────────────────────────── */
.ef-event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ef-event-list__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 8px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.ef-event-list__item:hover {
    background: #f9f8ff;
}

.ef-event-list__date-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 10px;
    background: #6c63ff;
    color: #ffffff;
    border-radius: 8px;
    text-align: center;
    flex-shrink: 0;
}

.ef-date-day {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.ef-date-month {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.85;
}

.ef-event-list__thumb {
    flex-shrink: 0;
}

.ef-event-list__thumb img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.ef-event-list__info {
    flex: 1;
    min-width: 0;
}

.ef-event-list__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
}

.ef-event-list__title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.ef-event-list__title a:hover { color: #6c63ff; }

.ef-event-list__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    color: #6b7280;
}

.ef-event-list__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ef-event-list__meta .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Status Dot */
.ef-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #9ca3af;
}

.ef-status--upcoming  { background-color: #3b82f6; }
.ef-status--ongoing   { background-color: #10b981; }
.ef-status--live      { background-color: #10b981; }
.ef-status--past      { background-color: #9ca3af; }
.ef-status--cancelled { background-color: #ef4444; }

/* ── Event Details Box ────────────────────────────────────────── */
.ef-event-details-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
}

.ef-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ef-detail-row:last-of-type {
    border-bottom: none;
}

.ef-detail-icon.dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #6c63ff;
    flex-shrink: 0;
    margin-top: 2px;
}

.ef-detail-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ef-detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6c63ff;
}

.ef-detail-value {
    font-size: 0.95rem;
    color: #1a1a2e;
    font-weight: 500;
}

.ef-detail-address,
.ef-detail-time,
.ef-detail-capacity {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 400;
}

.ef-map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6c63ff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 14px;
    transition: opacity 0.2s;
}

.ef-map-link:hover { opacity: 0.75; }

.ef-details-cta {
    display: block;
    width: 100%;
    text-align: center;
    background: #6c63ff;
    color: #ffffff;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 20px;
    transition: background 0.2s ease;
}

.ef-details-cta:hover {
    background: #5b52e0;
    color: #ffffff;
}

/* ── Countdown ────────────────────────────────────────────────── */
.ef-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.ef-countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 16px;
    background: #6c63ff;
    border-radius: 12px;
    text-align: center;
}

.ef-countdown__number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ef-countdown__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.75);
    margin-top: 4px;
}

.ef-countdown--expired {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* ── Filter Bar ───────────────────────────────────────────────── */
.ef-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ef-filter-tab {
    display: inline-flex;
    align-items: center;
    background: #f3f4f6;
    color: #374151;
    border: none;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    outline: none;
}

.ef-filter-tab:hover {
    background: #e5e7eb;
}

.ef-filter-tab.is-active {
    background: #6c63ff;
    color: #ffffff;
}

/* Loading state for filtered grid */
.ef-event-grid.is-loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* ── Utility ──────────────────────────────────────────────────── */
.ef-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
