/* Event details + booking modal — readable in light and dark theme */
#loftEventBookModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
}
#loftEventBookModal.is-open {
  display: flex;
}

.loft-eb-dialog {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 1.25rem;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
[data-theme="dark"] .loft-eb-dialog {
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.loft-eb-hero {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  border-radius: 1.25rem 1.25rem 0 0;
}
.loft-eb-hero-fallback {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #c084fc, #f472b6);
  border-radius: 1.25rem 1.25rem 0 0;
}

.loft-eb-body {
  padding: 1.25rem 1.35rem 1.5rem;
}
.loft-eb-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 0.35rem;
}
[data-theme="dark"] .loft-eb-kicker {
  color: #c4b5fd;
}
.loft-eb-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: #0f172a;
}
[data-theme="dark"] .loft-eb-title {
  color: #f8fafc;
}
.loft-eb-meta {
  color: #7c3aed;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}
[data-theme="dark"] .loft-eb-meta {
  color: #d8b4fe;
}
.loft-eb-desc {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  margin-bottom: 1rem;
}
[data-theme="dark"] .loft-eb-desc {
  color: #cbd5e1;
}
.loft-eb-price {
  display: inline-flex;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 800;
  background: #f5f3ff;
  color: #5b21b6;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
[data-theme="dark"] .loft-eb-price {
  background: rgba(167, 139, 250, 0.18);
  color: #edd5ff;
}

.loft-eb-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: #334155;
}
[data-theme="dark"] .loft-eb-label {
  color: #e2e8f0;
}
.loft-eb-input {
  width: 100%;
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.75rem;
  border: 2px solid #e2e8f0;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 1rem;
}
.loft-eb-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}
[data-theme="dark"] .loft-eb-input {
  background: #0f172a !important;
  border-color: #475569;
  color: #f8fafc !important;
}

.loft-eb-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.loft-eb-btn {
  flex: 1;
  min-width: 120px;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.loft-eb-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.loft-eb-btn-primary {
  background: #7c3aed;
  color: #fff;
}
.loft-eb-btn-primary:hover:not(:disabled) {
  background: #6d28d9;
}
.loft-eb-btn-ghost {
  background: transparent;
  color: #6d28d9;
  border: 2px solid #7c3aed;
}
[data-theme="dark"] .loft-eb-btn-ghost {
  color: #e9d5ff;
  border-color: #c4b5fd;
}
.loft-eb-err {
  display: none;
  color: #b91c1c;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}
[data-theme="dark"] .loft-eb-err {
  color: #fca5a5;
}
.loft-eb-success {
  text-align: left;
}
.loft-eb-qr {
  display: block;
  margin: 1rem auto;
  width: 180px;
  height: 180px;
  background: #fff;
  padding: 8px;
  border-radius: 12px;
}

.loft-eb-tickets {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0 0 1rem;
}
.loft-eb-tickets-hint {
  font-size: 0.82rem;
  font-weight: 600;
  color: #7c3aed;
  margin: 0 0 0.55rem;
}
[data-theme="dark"] .loft-eb-tickets-hint {
  color: #d8b4fe;
}
.loft-eb-ticket {
  display: block;
  position: relative;
  border: 2px solid #e2e8f0;
  border-radius: 0.9rem;
  padding: 0.85rem 0.95rem 0.85rem 2.4rem;
  cursor: pointer;
  background: #f8fafc;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
  user-select: none;
}
.loft-eb-ticket:hover:not(.is-sold) {
  border-color: #a78bfa;
  transform: translateY(-1px);
}
.loft-eb-ticket.is-selected,
.loft-eb-ticket:has(input:checked) {
  border-color: #7c3aed;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}
.loft-eb-ticket.is-sold {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.loft-eb-ticket input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.loft-eb-ticket::before {
  content: '';
  position: absolute;
  left: 0.85rem;
  top: 1.05rem;
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
}
.loft-eb-ticket.is-selected::before,
.loft-eb-ticket:has(input:checked)::before {
  border-color: #7c3aed;
  background: #7c3aed;
  box-shadow: inset 0 0 0 3px #fff;
}
.loft-eb-ticket-name {
  font-weight: 800;
}
.loft-eb-ticket-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.2rem;
}
[data-theme="dark"] .loft-eb-ticket {
  background: #0f172a;
  border-color: #475569;
}
[data-theme="dark"] .loft-eb-ticket.is-selected,
[data-theme="dark"] .loft-eb-ticket:has(input:checked) {
  background: rgba(124, 58, 237, 0.28);
  border-color: #c4b5fd;
  box-shadow: 0 0 0 3px rgba(196, 181, 253, 0.25);
}
[data-theme="dark"] .loft-eb-ticket::before {
  border-color: #64748b;
  background: #1e293b;
}
[data-theme="dark"] .loft-eb-ticket-desc {
  color: #cbd5e1;
}

.event-card .loft-eb-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 4px;
}
.event-card .loft-view-details,
.event-card .loft-book-now {
  font-weight: 700;
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}
.event-card .loft-view-details {
  background: #7c3aed;
  color: #fff;
  border: 2px solid #7c3aed;
  width: 100%;
}
.event-card .loft-view-details:hover {
  background: #6d28d9;
}
.event-card.is-clickable {
  cursor: pointer;
}
[data-theme="dark"] .event-card .loft-view-details {
  color: #fff;
  border-color: #a78bfa;
  background: #7c3aed;
}
