/* ============================================
   KoopTickets.nu — Theme & Component Styles
   ============================================ */

/* === Font Import === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* === Default Theme: Flower Art Museum (FAM) === */
:root {
  --color-primary: #18551d;
  --color-primary-light: #68b43c;
  --color-primary-dark: #124116;
  --color-secondary: #e6205e;
  --color-secondary-light: #f04d7e;
  --color-secondary-dark: #c91a4f;
  --color-accent: #68b43c;
  --color-accent-light: #bed9a0;
  --color-accent-dark: #4a8a2a;

  --color-bg: #ffffff;
  --color-bg-alt: #f8f9f7;
  --color-bg-warm: #fdfdf9;
  --color-text: #1a1a1a;
  --color-text-muted: #6b6b6b;
  --color-text-light: #9ca3af;
  --color-border: #e0e0e0;
  --color-border-light: #f0f0f0;

  --color-success: #18551d;
  --color-warning: #ffc107;
  --color-error: #dc2626;
  --color-info: #0077cc;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 100px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-elevated: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.12);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;

  --org-name: 'Flower Art Museum';
  --theme-label: 'Museum';
}

/* === Alternative Theme: Theater de Rode Zaal === */
[data-theme="theater"] {
  --color-primary: #8B1A1A;
  --color-primary-light: #b02828;
  --color-primary-dark: #6b1414;
  --color-secondary: #D4AF37;
  --color-secondary-light: #e4c760;
  --color-secondary-dark: #b8952a;
  --color-accent: #4A1A6B;
  --color-accent-light: #6b2d96;
  --color-accent-dark: #371450;

  --theme-label: 'Theater';
}

/* === Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Theme transition */
*,
*::before,
*::after {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* === Focus Styles === */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* === Calendar Component === */
.calendar {
  width: 100%;
  user-select: none;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  margin-bottom: 0.5rem;
}

.calendar-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: capitalize;
}

.calendar-header button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.calendar-header button:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: default;
  transition: all 0.15s ease;
}

.cal-day--empty {
  background: transparent;
}

.cal-day--open {
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  border: 1px solid var(--color-border-light);
}

.cal-day--open:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, white);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: scale(1.05);
}

.cal-day--closed {
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.5;
}

.cal-day--holiday {
  background: color-mix(in srgb, var(--color-info) 10%, white);
  color: var(--color-info);
  cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--color-info) 25%, white);
}

.cal-day--holiday:hover {
  background: color-mix(in srgb, var(--color-info) 18%, white);
  transform: scale(1.05);
}

.cal-day--holiday::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-info);
}

.cal-day--soldout {
  background: color-mix(in srgb, var(--color-error) 8%, white);
  color: var(--color-error);
  cursor: not-allowed;
  opacity: 0.7;
}

.cal-day--soldout::after {
  content: 'Vol';
  position: absolute;
  bottom: 1px;
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-day--selected {
  background: var(--color-primary) !important;
  color: white !important;
  border-color: var(--color-primary) !important;
  opacity: 1 !important;
  transform: scale(1.05);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-primary) 40%, transparent);
}

.cal-day--today {
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.cal-day--past {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* === Time Slots === */
.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 0;
}

.time-slot {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--color-bg);
  color: var(--color-text);
  transition: all 0.15s ease;
}

.time-slot:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 5%, white);
}

.time-slot--selected {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.time-slot--unavailable {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* === Step Indicator === */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.5rem 0;
}

.step-indicator__step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.3s ease;
}

.step-indicator__circle {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-muted);
  transition: all 0.3s ease;
}

.step-indicator__step--active .step-indicator__circle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

.step-indicator__step--active {
  color: var(--color-primary);
  font-weight: 600;
}

.step-indicator__step--completed .step-indicator__circle {
  background: var(--color-success);
  border-color: var(--color-success);
  color: white;
}

.step-indicator__step--completed {
  color: var(--color-success);
}

.step-indicator__line {
  width: 3rem;
  height: 2px;
  background: var(--color-border);
  margin: 0 0.5rem;
  transition: background 0.3s ease;
}

.step-indicator__line--completed {
  background: var(--color-success);
}

/* === Ticket Selector === */
.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.ticket-row:last-child {
  border-bottom: none;
}

.ticket-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}

.ticket-info .ticket-description {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.ticket-info .ticket-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 0.125rem;
}

.ticket-counter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ticket-counter button {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.ticket-counter button:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 5%, white);
}

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

.ticket-counter .ticket-qty {
  font-size: 1.125rem;
  font-weight: 600;
  min-width: 1.5rem;
  text-align: center;
}

/* === Sticky Cart === */
.sticky-cart {
  position: sticky;
  top: 1.5rem;
}

.sticky-cart-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  padding: 1rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sticky-cart-mobile--visible {
  transform: translateY(0);
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.modal-overlay--active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(1rem) scale(0.98);
  transition: transform 0.2s ease;
}

.modal-overlay--active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.modal-body {
  padding: 1.5rem;
}

/* === Tabs === */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border-light);
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--color-primary);
}

.tab-btn--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.tab-content {
  display: none;
  padding: 1.5rem 0;
}

.tab-content--active {
  display: block;
}

/* === Cards === */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated);
}

/* === Form Styles === */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(104, 180, 60, 0.1);
}

.form-input--error {
  border-color: var(--color-error);
}

.form-input--error:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-error) 15%, transparent);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--color-error);
  margin-top: 0.25rem;
  display: none;
}

.form-error--visible {
  display: block;
}

/* === Availability Badge === */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge--available {
  background: color-mix(in srgb, var(--color-success) 12%, white);
  color: var(--color-success);
}

.badge--limited {
  background: color-mix(in srgb, var(--color-warning) 12%, white);
  color: var(--color-warning);
}

.badge--soldout {
  background: color-mix(in srgb, var(--color-error) 12%, white);
  color: var(--color-error);
}

.badge--free {
  background: color-mix(in srgb, var(--color-accent) 12%, white);
  color: var(--color-accent);
}

/* === Theme Switcher Button === */
.theme-switcher-btn {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-elevated);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--font-body);
}

.theme-switcher-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-modal);
}

/* === Hamburger Menu === */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.hamburger--active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger--active span:nth-child(2) {
  opacity: 0;
}

.hamburger--active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Mobile Nav === */
.mobile-nav {
  position: fixed;
  inset: 0;
  top: 5rem;
  background: var(--color-bg);
  z-index: 40;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-nav--open {
  transform: translateX(0);
}

.mobile-nav a {
  display: block;
  padding: 0.875rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border-light);
  transition: color 0.15s ease;
}

.mobile-nav a:hover {
  color: var(--color-primary);
}

/* === Print Styles (for QR ticket) === */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .theme-switcher-btn {
    display: none;
  }
}

/* === Scrollbar Styling === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-light);
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.6s ease forwards;
}

/* === Tooltip === */
.tooltip-trigger {
  position: relative;
  cursor: help;
}

.tooltip-trigger .tooltip {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: var(--color-text);
  color: white;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 30;
}

.tooltip-trigger:hover .tooltip,
.tooltip-trigger:focus .tooltip {
  opacity: 1;
}
