/* ============================================================
   RVP Connect — Events Module CSS v1.0
   ============================================================ */

/* ── Tabs ───────────────────────────────────────── */
.ev-tabs {
  display: flex; gap: 6px;
  background: #f1f5f9; border-radius: 14px;
  padding: 5px; margin: 16px 0 20px;
}
.ev-tab-btn {
  flex: 1; padding: 10px; border: none;
  border-radius: 10px; font-weight: 600; font-size: .85rem;
  cursor: pointer; color: var(--text-muted);
  background: transparent; transition: all .2s;
}
.ev-tab-btn.active {
  background: #fff; color: var(--brand);
  box-shadow: 0 2px 8px rgba(108,43,217,.12);
}

/* ── Event Card ─────────────────────────────────── */
.ev-card { border-radius: var(--radius); overflow: hidden; position: relative; }
.ev-card .card-img-wrap { position: relative; overflow: hidden; height: 160px; background: #f1f5f9; }
.ev-card .card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.ev-card:hover .card-img-wrap img { transform: scale(1.04); }

.ev-date-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--brand); color: #fff;
  border-radius: 10px; padding: 5px 9px;
  text-align: center; line-height: 1.1;
  font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.2);
  min-width: 44px;
}
.ev-date-badge .edb-day { display: block; font-size: 1.2rem; }
.ev-date-badge .edb-mon { display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .04em; }

.ev-status-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: .65rem; font-weight: 700; padding: 3px 8px;
  border-radius: 20px; letter-spacing: .04em; text-transform: uppercase;
}
.ev-status-badge.open    { background: rgba(16,185,129,.85); }
.ev-status-badge.closed  { background: rgba(239,68,68,.75); }
.ev-status-badge.full    { background: rgba(245,158,11,.85); }
.ev-status-badge.past    { background: rgba(100,116,139,.8); }

.ev-card .card-body { padding: 14px; }
.ev-card .card-title { font-size: .95rem; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; line-height: 1.3; }
.ev-meta { font-size: .74rem; color: var(--text-muted); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.ev-card .card-desc { font-size: .78rem; color: var(--text-muted); line-height: 1.5; margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.ev-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.ev-btn {
  flex: 1; padding: 9px 10px; border-radius: 10px; font-weight: 700;
  font-size: .78rem; border: none; cursor: pointer; text-align: center; transition: all .18s;
}
.ev-btn-register  { background: var(--brand); color: #fff; }
.ev-btn-register:hover  { background: var(--brand-dark); }
.ev-btn-register:disabled { background: #94a3b8; cursor: not-allowed; }
.ev-btn-details   { background: var(--brand-light); color: var(--brand); }
.ev-btn-details:hover   { background: #ddd6fe; }
.ev-btn-details a { color: inherit; }

/* ── Event Detail Page ──────────────────────────── */
.ev-detail-hero {
  width: 100%; max-height: 380px; object-fit: cover;
  display: block; border-radius: 0 0 20px 20px;
}
.ev-detail-hero-wrap { position: relative; overflow: hidden; }
.ev-detail-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 40%, transparent 100%);
}
.ev-detail-hero-info {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 20px 24px;
  color: #fff;
}
.ev-detail-hero-info h1 { font-size: 1.4rem; font-weight: 900; line-height: 1.25; margin-bottom: 8px; }
.ev-detail-meta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ev-detail-meta-chip {
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  border-radius: 20px; padding: 4px 10px; font-size: .73rem; font-weight: 600;
}

.ev-detail-body { padding: 16px; max-width: 780px; margin: 0 auto; }
.ev-section { margin-bottom: 24px; }
.ev-section-title {
  font-size: .85rem; font-weight: 800; color: var(--brand);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--brand-light);
}

.ev-highlights-list { list-style: none; padding: 0; margin: 0; }
.ev-highlights-list li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid #f1f5f9;
  font-size: .85rem; color: var(--text-primary);
}
.ev-highlights-list li::before { content: '✅'; flex-shrink: 0; margin-top: 1px; }

.ev-schedule-list { list-style: none; padding: 0; margin: 0; }
.ev-schedule-item {
  display: flex; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid #f1f5f9; font-size: .84rem;
}
.ev-schedule-time { font-weight: 700; color: var(--brand); min-width: 64px; flex-shrink: 0; }
.ev-schedule-label { color: var(--text-primary); }

.ev-gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.ev-gallery-grid img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; cursor: zoom-in; transition: transform .2s;
}
.ev-gallery-grid img:hover { transform: scale(1.03); }

.ev-organizer-card {
  background: var(--brand-light); border-radius: 14px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
}
.ev-organizer-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; flex-shrink: 0;
}
.ev-organizer-name  { font-weight: 700; font-size: .9rem; }
.ev-organizer-phone { font-size: .8rem; color: var(--text-muted); }
.ev-organizer-call {
  margin-left: auto; background: var(--brand); color: #fff;
  border-radius: 10px; padding: 7px 14px; font-size: .78rem; font-weight: 700;
  text-decoration: none; flex-shrink: 0; transition: background .15s;
}
.ev-organizer-call:hover { background: var(--brand-dark); }

.ev-map-link {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #e3f2fd; color: #1565c0; border-radius: 12px;
  padding: 12px; font-size: .88rem; font-weight: 700; text-decoration: none;
  transition: background .15s;
}
.ev-map-link:hover { background: #bbdefb; }

/* ── Sticky Register Bar ────────────────────────── */
.ev-sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: #fff; border-top: 1px solid var(--border);
  padding: 10px 16px 20px; display: flex; gap: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.ev-sticky-bar .ev-sticky-title { font-size: .8rem; font-weight: 600; color: var(--text-muted); flex: 1; align-self: center; }
.ev-sticky-register-btn {
  background: linear-gradient(135deg, var(--brand), #4338ca);
  color: #fff; border: none; border-radius: 12px;
  padding: 12px 24px; font-size: .9rem; font-weight: 800;
  cursor: pointer; white-space: nowrap; transition: opacity .15s;
}
.ev-sticky-register-btn:hover { opacity: .88; }
.ev-sticky-register-btn:disabled { background: #94a3b8; cursor: not-allowed; }
@media (min-width: 768px) { .ev-sticky-bar { display: none; } }

/* ── Registration Modal ─────────────────────────── */
.ev-reg-overlay {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  align-items: flex-end; justify-content: center;
}
.ev-reg-overlay.open { display: flex; }
.ev-reg-box {
  background: #fff; border-radius: 24px 24px 0 0;
  padding: 24px 20px 36px; width: 100%; max-width: 500px;
  max-height: 95vh; overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
}
@media (min-width: 540px) {
  .ev-reg-overlay { align-items: center; }
  .ev-reg-box { border-radius: 20px; }
}
.ev-reg-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.ev-reg-title { font-size: 1.05rem; font-weight: 800; }
.ev-reg-close {
  background: #f1f5f9; border: none; border-radius: 50%;
  width: 32px; height: 32px; font-size: 1.1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ev-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ev-form-group { margin-bottom: 12px; }
.ev-form-group label { display: block; font-size: .78rem; font-weight: 600; margin-bottom: 4px; color: var(--text-muted); }
.ev-form-group input,
.ev-form-group select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-size: .88rem; }
.ev-form-group input:focus,
.ev-form-group select:focus { outline: none; border-color: var(--brand); }
.ev-reg-submit {
  width: 100%; margin-top: 8px;
  background: linear-gradient(135deg, var(--brand), #4338ca);
  color: #fff; border: none; border-radius: 14px;
  padding: 14px; font-size: .95rem; font-weight: 800;
  cursor: pointer; transition: opacity .15s;
}
.ev-reg-submit:hover { opacity: .88; }
.ev-reg-submit:disabled { opacity: .6; cursor: not-allowed; }
.ev-reg-error { color: #dc2626; font-size: .8rem; margin-top: 8px; }
.ev-reg-success {
  text-align: center; padding: 20px 0;
}
.ev-reg-success-icon { font-size: 2.5rem; margin-bottom: 10px; }
.ev-reg-success h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.ev-reg-success p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

/* ── Admin Event Panel ─────────────────────────── */
.ev-admin-wrap { padding: 16px; max-width: 1100px; margin: 0 auto; }
.ev-admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.ev-admin-title { font-size: 1.2rem; font-weight: 900; color: var(--text-primary); }

.ev-stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 480px) { .ev-stat-grid { grid-template-columns: 1fr 1fr; } }
.ev-stat-card {
  background: #fff; border-radius: 14px;
  padding: 16px 14px; text-align: center;
  box-shadow: var(--shadow); border-top: 3px solid var(--brand);
}
.ev-stat-num  { font-size: 1.8rem; font-weight: 900; color: var(--brand); }
.ev-stat-lbl  { font-size: .72rem; color: var(--text-muted); font-weight: 600; margin-top: 2px; }

.ev-admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.ev-admin-table th { background: #f8fafc; text-align: left; padding: 11px 14px; font-size: .75rem; font-weight: 700; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.ev-admin-table td { padding: 11px 14px; font-size: .82rem; border-bottom: 1px solid #f8fafc; vertical-align: middle; }
.ev-admin-table tr:last-child td { border-bottom: none; }
.ev-admin-table tr:hover td { background: #fafafa; }

.ev-admin-status-badge {
  display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: .04em;
}
.ev-admin-status-badge.published   { background: #dcfce7; color: #15803d; }
.ev-admin-status-badge.draft       { background: #fef3c7; color: #92400e; }
.ev-admin-status-badge.unpublished { background: #fee2e2; color: #991b1b; }
.ev-reg-badge-open   { background: #dcfce7; color: #15803d; }
.ev-reg-badge-closed { background: #fee2e2; color: #991b1b; }

.ev-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-admin-btn {
  padding: 5px 10px; border-radius: 7px; font-size: .72rem; font-weight: 700;
  border: none; cursor: pointer; text-decoration: none; display: inline-block;
  transition: opacity .15s;
}
.ev-admin-btn:hover { opacity: .8; }
.ev-admin-btn-edit   { background: var(--brand-light); color: var(--brand); }
.ev-admin-btn-del    { background: #fee2e2; color: #991b1b; }
.ev-admin-btn-reg    { background: #e0f2fe; color: #0369a1; }
.ev-admin-btn-dl     { background: #dcfce7; color: #166534; }
.ev-admin-btn-pub    { background: #dcfce7; color: #15803d; }
.ev-admin-btn-unpub  { background: #fef3c7; color: #92400e; }

.ev-admin-form-wrap { background: #fff; border-radius: 16px; padding: 24px 20px; box-shadow: var(--shadow); margin-top: 16px; }
.ev-admin-form-title { font-size: 1rem; font-weight: 800; margin-bottom: 20px; color: var(--text-primary); }
.ev-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .ev-form-2col { grid-template-columns: 1fr; } }
.ev-admin-label { display: block; font-size: .78rem; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; }
.ev-admin-input,
.ev-admin-select,
.ev-admin-textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: .85rem; font-family: inherit;
  background: #fafafa; margin-bottom: 14px;
}
.ev-admin-input:focus,
.ev-admin-select:focus,
.ev-admin-textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.ev-admin-textarea { resize: vertical; min-height: 80px; }
.ev-admin-hint { font-size: .72rem; color: var(--text-muted); margin-top: -10px; margin-bottom: 12px; }
.ev-admin-save-btn {
  background: linear-gradient(135deg, var(--brand), #4338ca);
  color: #fff; border: none; border-radius: 12px;
  padding: 12px 28px; font-size: .9rem; font-weight: 800;
  cursor: pointer; transition: opacity .15s;
}
.ev-admin-save-btn:hover { opacity: .88; }
.ev-admin-save-btn:disabled { opacity: .6; cursor: not-allowed; }
.ev-admin-msg { padding: 10px 14px; border-radius: 10px; font-size: .82rem; font-weight: 600; margin-top: 12px; }
.ev-admin-msg.ok  { background: #dcfce7; color: #15803d; }
.ev-admin-msg.err { background: #fee2e2; color: #991b1b; }

.ev-reg-table-wrap { overflow-x: auto; }
.ev-admin-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .82rem; font-weight: 700; color: var(--brand);
  margin-bottom: 14px; text-decoration: none;
}
