/* Eureka Room Booking — Dark Theme */

/* Fonts loaded via <link> in HTML head */

:root {
  --turquoise: #04ccc4;
  --yellow: #fece00;
  --orange: #fda22a;
  --red-orange: #f45910;
  --red: #c32527;
  --bg: #111;
  --bg-card: #1a1a1a;
  --bg-input: #222;
  --border: #333;
  --text: #eee;
  --text-muted: #aaa;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Amatic SC', sans-serif;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a { color: var(--turquoise); }

/* Layout */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.container-wide {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

/* Form elements */
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  background: #f0f0f0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #111;
  font-size: 15px;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--turquoise);
}

input::placeholder, textarea::placeholder {
  color: #888;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text);
}

.field {
  margin-bottom: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
}

.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--turquoise);
  color: #000;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-warning {
  background: var(--orange);
  color: #000;
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-full { width: 100%; }

/* Slot cards */
.slot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.slot-card:hover { border-color: var(--turquoise); }
.slot-card.selected { border-color: var(--turquoise); box-shadow: 0 0 0 1px var(--turquoise); }

.slot-date {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--yellow);
}

.slot-time {
  font-size: 1.1rem;
  color: var(--text);
}

.slot-spots {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.slot-price {
  font-weight: 600;
  color: var(--turquoise);
}

/* Steps (booking flow) */
.step { display: none; }
.step.active { display: block; }

.steps-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  justify-content: center;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}

.step-dot.active { background: var(--turquoise); }
.step-dot.done { background: var(--yellow); }

/* Ticket counter */
.ticket-counter {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ticket-counter button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--turquoise);
  background: transparent;
  color: var(--turquoise);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-counter button:disabled { opacity: 0.3; }

.ticket-count {
  font-size: 2rem;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.price-display {
  font-size: 1.3rem;
  color: var(--turquoise);
  font-weight: 600;
  margin-top: 12px;
}

.voucher-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.voucher-row input { flex: 1; }

.voucher-status {
  font-size: 13px;
  margin-top: 6px;
}

.voucher-status.valid { color: var(--turquoise); }
.voucher-status.invalid { color: var(--red); }

/* Checkboxes */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--turquoise);
}

.checkbox-row label {
  color: var(--text);
  margin-bottom: 0;
  font-size: 14px;
  cursor: pointer;
}

/* Stripe Elements */
#card-element {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

#card-errors {
  color: var(--red);
  font-size: 13px;
  margin-top: 8px;
}

/* Confirmation screen */
.confirmation {
  text-align: center;
  padding: 40px 0;
}

.confirmation h2 {
  color: var(--turquoise);
  font-size: 2.5rem;
  margin-bottom: 16px;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-open { background: #1a3a2a; color: #4ade80; }
.badge-confirmed { background: #1a2a3a; color: #60a5fa; }
.badge-cancelled { background: #3a1a1a; color: #f87171; }
.badge-completed { background: #2a2a1a; color: #facc15; }
.badge-pending { background: #2a2a1a; color: #facc15; }
.badge-charged { background: #1a3a2a; color: #4ade80; }
.badge-failed { background: #3a1a1a; color: #f87171; }
.badge-released { background: #1a1a1a; color: #888; }
.badge-refunded { background: #2a1a3a; color: #c084fc; }

/* Threshold bar */
.threshold-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}

.threshold-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

/* Alert boxes */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-info {
  background: rgba(4, 204, 196, 0.1);
  border: 1px solid rgba(4, 204, 196, 0.3);
  color: var(--turquoise);
}

.alert-warning {
  background: rgba(253, 162, 42, 0.1);
  border: 1px solid rgba(253, 162, 42, 0.3);
  color: var(--orange);
}

.alert-error {
  background: rgba(195, 37, 39, 0.1);
  border: 1px solid rgba(195, 37, 39, 0.3);
  color: var(--red);
}

/* Loading */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* Tables (admin) */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

tr:hover td { background: rgba(255,255,255,0.02); }

/* Admin nav */
.admin-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-nav button {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

.admin-nav button.active {
  background: var(--turquoise);
  color: #000;
  border-color: var(--turquoise);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal h2 { margin-bottom: 16px; }

/* Utility */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.hidden { display: none !important; }

/* Back button */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 16px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.back-link:hover { color: var(--text); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  .container { padding: 16px; }
  table { font-size: 13px; }
  th, td { padding: 6px 8px; }
}
