/* ===== Event Calendar Plugin — Admin Calendar ===== */
.ec-admin-cal {
    width: 100%; border-collapse: collapse; table-layout: fixed;
}
.ec-admin-cal th {
    padding: 10px 4px; text-align: center; font-size: 0.75rem;
    font-weight: 600; color: #64748b; text-transform: uppercase;
    background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.ec-admin-cal td {
    border: 1px solid #e2e8f0; vertical-align: top;
    padding: 4px; height: 100px; position: relative;
}
.ec-admin-cal td.ec-empty { background: #f8fafc; }
.ec-admin-cal td.ec-today { background: #fef2f2; }
.ec-admin-cal td.ec-today .ec-day-num { color: #e50914; font-weight: 700; }
.ec-day-num {
    font-size: 0.8rem; font-weight: 600; color: #1e293b;
    padding: 2px 6px; display: inline-block;
}
.ec-cal-event {
    display: block; padding: 2px 6px; margin: 1px 0;
    border-radius: 4px; font-size: 0.7rem; color: #fff;
    text-decoration: none; white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; line-height: 1.4;
}
.ec-cal-event:hover { opacity: 0.85; color: #fff; }
.ec-cal-more {
    display: block; font-size: 0.65rem; color: #64748b;
    padding: 1px 6px; cursor: default;
}

/* ===== Frontend Calendar Widget ===== */
.ec-calendar-widget {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #fff; border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    overflow: hidden;
}
.ec-cal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.ec-cal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; color: #1e293b; }
.ec-cal-nav {
    background: none; border: 1px solid #e2e8f0; color: #64748b;
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.2s; font-size: 0.9rem;
}
.ec-cal-nav:hover { background: #e50914; color: #fff; border-color: #e50914; }
.ec-cal-grid { padding: 8px; }
.ec-cal-grid table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ec-cal-grid th {
    padding: 8px 2px; text-align: center; font-size: 0.7rem;
    font-weight: 600; color: #94a3b8; text-transform: uppercase;
}
.ec-cal-grid td {
    text-align: center; padding: 2px; height: 42px; position: relative;
}
.ec-cal-day {
    width: 36px; height: 36px; line-height: 36px; margin: 0 auto;
    border-radius: 50%; font-size: 0.85rem; color: #475569;
    cursor: default; transition: all 0.15s; position: relative;
}
.ec-cal-day.ec-has-events { font-weight: 700; color: #1e293b; cursor: pointer; }
.ec-cal-day.ec-has-events:hover { background: #fef2f2; }
.ec-cal-day.ec-today-day {
    background: #e50914; color: #fff; font-weight: 700;
}
.ec-cal-day.ec-other-month { color: #cbd5e1; }
.ec-cal-dot {
    position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
    width: 5px; height: 5px; border-radius: 50%; background: #e50914;
}
.ec-cal-day.ec-today-day .ec-cal-dot { background: #fff; }

/* View tabs */
.ec-view-tabs {
    display: flex; gap: 4px; padding: 0 20px 12px;
}
.ec-view-tab {
    padding: 6px 14px; border: 1px solid #e2e8f0; background: #fff;
    border-radius: 6px; font-size: 0.78rem; color: #64748b;
    cursor: pointer; transition: all 0.2s;
}
.ec-view-tab:hover { border-color: #e50914; color: #e50914; }
.ec-view-tab.active { background: #e50914; color: #fff; border-color: #e50914; }

/* Event list inside calendar */
.ec-events-list { padding: 0 20px 16px; }
.ec-event-card {
    display: flex; gap: 12px; padding: 12px;
    border: 1px solid #e2e8f0; border-radius: 10px;
    margin-bottom: 10px; transition: all 0.2s;
    text-decoration: none; color: inherit; cursor: pointer;
}
.ec-event-card:hover { border-color: #e50914; box-shadow: 0 2px 12px rgba(233,69,96,0.1); }
.ec-event-date-badge {
    min-width: 50px; text-align: center; padding: 6px 8px;
    background: #fef2f2; border-radius: 8px; flex-shrink: 0;
}
.ec-event-date-badge .ec-month {
    font-size: 0.65rem; font-weight: 700; text-transform: uppercase;
    color: #e50914; line-height: 1;
}
.ec-event-date-badge .ec-day {
    font-size: 1.3rem; font-weight: 800; color: #1e293b; line-height: 1.2;
}
.ec-event-info { flex: 1; min-width: 0; }
.ec-event-title {
    font-size: 0.95rem; font-weight: 600; color: #1e293b;
    margin: 0 0 4px; line-height: 1.3;
}
.ec-event-meta {
    font-size: 0.8rem; color: #64748b; display: flex;
    flex-wrap: wrap; gap: 8px; align-items: center;
}
.ec-event-meta i { font-size: 0.75rem; }
.ec-event-cat {
    display: inline-block; padding: 2px 8px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 600; color: #fff;
}

/* Event detail modal */
.ec-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 10000; display: flex; align-items: center;
    justify-content: center; padding: 20px;
    animation: ecFadeIn 0.2s ease;
}
.ec-modal {
    background: #fff; border-radius: 16px; max-width: 560px;
    width: 100%; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: ecSlideUp 0.3s ease;
}
.ec-modal-header {
    padding: 20px 24px; border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: start; justify-content: space-between;
}
.ec-modal-header h3 { margin: 0; font-size: 1.2rem; font-weight: 700; color: #1e293b; }
.ec-modal-close {
    background: none; border: none; font-size: 1.3rem;
    color: #94a3b8; cursor: pointer; padding: 0; line-height: 1;
}
.ec-modal-close:hover { color: #e50914; }
.ec-modal-body { padding: 20px 24px; }
.ec-modal-body .ec-detail-row {
    display: flex; align-items: start; gap: 10px;
    margin-bottom: 12px; font-size: 0.9rem; color: #475569;
}
.ec-modal-body .ec-detail-row i { color: #e50914; margin-top: 2px; flex-shrink: 0; }

/* RSVP form */
.ec-rsvp-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
.ec-rsvp-form h5 { font-size: 0.95rem; font-weight: 700; color: #1e293b; margin-bottom: 12px; }
.ec-rsvp-form input, .ec-rsvp-form select, .ec-rsvp-form textarea {
    width: 100%; padding: 8px 12px; border: 1px solid #e2e8f0;
    border-radius: 8px; font-size: 0.85rem; margin-bottom: 8px;
    outline: none; transition: border-color 0.2s;
}
.ec-rsvp-form input:focus, .ec-rsvp-form select:focus, .ec-rsvp-form textarea:focus { border-color: #e50914; }
.ec-rsvp-btn {
    width: 100%; padding: 10px; border: none; border-radius: 8px;
    background: #e50914; color: #fff; font-weight: 600;
    font-size: 0.9rem; cursor: pointer; transition: background 0.2s;
}
.ec-rsvp-btn:hover { background: #c73652; }
.ec-rsvp-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.ec-rsvp-success {
    padding: 12px; background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 8px; color: #166534; font-size: 0.85rem; text-align: center;
}

/* Mini calendar widget */
.ec-mini-widget {
    background: #fff; border-radius: 12px; padding: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.ec-mini-widget .ec-cal-grid th { font-size: 0.6rem; padding: 4px 0; }
.ec-mini-widget .ec-cal-day { width: 28px; height: 28px; line-height: 28px; font-size: 0.75rem; }
.ec-mini-widget .ec-cal-dot { width: 4px; height: 4px; bottom: 1px; }

/* Featured event card */
.ec-featured-card {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 16px; overflow: hidden; color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.ec-featured-card .ec-featured-img {
    width: 100%; height: 200px; object-fit: cover;
}
.ec-featured-card .ec-featured-body { padding: 24px; }
.ec-featured-card .ec-featured-date {
    font-size: 0.8rem; color: #e50914; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.ec-featured-card .ec-featured-title {
    font-size: 1.4rem; font-weight: 800; margin: 0 0 8px; line-height: 1.3;
}
.ec-featured-card .ec-featured-meta {
    font-size: 0.85rem; color: #94a3b8; margin-bottom: 16px;
}
.ec-featured-card .ec-featured-btn {
    display: inline-block; padding: 10px 24px; background: #e50914;
    color: #fff; border-radius: 8px; text-decoration: none;
    font-weight: 600; font-size: 0.9rem; transition: background 0.2s;
}
.ec-featured-card .ec-featured-btn:hover { background: #c73652; }

/* Animations */
@keyframes ecFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ecSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Countdown Timer Widget ===== */
.ec-countdown-widget {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #0e2e4e 100%);
    border-radius: 16px; overflow: hidden; color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    text-align: center; padding: 32px 24px;
}
.ec-countdown-header { margin-bottom: 28px; }
.ec-countdown-label {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.5px; color: #e50914; margin-bottom: 8px;
}
.ec-countdown-label i { margin-right: 4px; }
.ec-countdown-title {
    font-size: 1.5rem; font-weight: 800; margin: 0 0 10px;
    line-height: 1.3; color: #fff;
}
.ec-countdown-date {
    font-size: 0.85rem; color: #94a3b8; margin-bottom: 4px;
}
.ec-countdown-date i, .ec-countdown-location i { color: #e50914; margin-right: 4px; }
.ec-countdown-location {
    font-size: 0.82rem; color: #94a3b8;
}
.ec-countdown-boxes {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; margin-bottom: 24px;
}
.ec-countdown-box {
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 16px 12px; min-width: 72px;
    backdrop-filter: blur(4px);
}
.ec-cd-num {
    display: block; font-size: 2.2rem; font-weight: 800;
    line-height: 1; color: #fff; font-variant-numeric: tabular-nums;
}
.ec-cd-label {
    display: block; font-size: 0.65rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
    color: #94a3b8; margin-top: 6px;
}
.ec-countdown-sep {
    font-size: 1.8rem; font-weight: 700; color: #e50914;
    line-height: 1; margin-top: -12px;
}
.ec-countdown-footer { margin-top: 4px; }
.ec-countdown-btn {
    display: inline-block; padding: 10px 28px; background: #e50914;
    color: #fff; border-radius: 8px; text-decoration: none;
    font-weight: 600; font-size: 0.88rem; transition: all 0.2s;
    border: none; cursor: pointer;
}
.ec-countdown-btn:hover { background: #c73652; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(233,69,96,0.4); }
.ec-countdown-empty {
    padding: 30px; color: #64748b; text-align: center;
}
.ec-countdown-empty i { font-size: 2rem; display: block; margin-bottom: 8px; color: #94a3b8; }
.ec-countdown-empty p { margin: 0; font-size: 0.9rem; }

/* Responsive countdown */
@media (max-width: 480px) {
    .ec-countdown-boxes { gap: 4px; }
    .ec-countdown-box { min-width: 56px; padding: 12px 8px; }
    .ec-cd-num { font-size: 1.6rem; }
    .ec-countdown-sep { font-size: 1.3rem; }
    .ec-countdown-title { font-size: 1.2rem; }
}

/* Responsive */
@media (max-width: 768px) {
    .ec-admin-cal td { height: 70px; }
    .ec-admin-cal td .ec-cal-event { font-size: 0.6rem; padding: 1px 3px; }
    .ec-event-card { flex-direction: column; gap: 8px; }
    .ec-event-date-badge { display: flex; gap: 6px; align-items: center; }
}
