@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&display=swap');

/* ── MG-RangeBook Booking UI — Taiga Theme ────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #2b2b2b;
  height: 100%;
}
body {
  overflow-y: auto;
}

.mg-booking-widget {
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  max-width: 620px;
  margin: 0 auto;
  padding: 1rem 1rem 1.25rem;
  color: #ffffff;
}

.mg-booking-widget__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.03em;
  margin: 0 0 0.25rem;
}
.mg-booking-widget__note {
  font-size: 0.8125rem;
  color: #aaaaaa;
  margin: 0 0 1rem;
}

/* ── Calendar ──────────────────────────────────────────────────────────────── */

.mg-calendar {
  background: #343434;
  border: 1px solid #555555;
  border-radius: 12px;
  padding: 0.75rem 0.625rem 0.625rem;
  margin-bottom: 1rem;
}

.mg-calendar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
  padding: 0 0.25rem;
}

.mg-calendar__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: #3a3a3a;
  border: 1px solid #555555;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: #cccccc;
  text-decoration: none;
  line-height: 1;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.mg-calendar__nav-btn:hover {
  background: #f7b829;
  border-color: #f7b829;
  color: #2b2b2b;
}
.mg-calendar__nav-btn--disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.mg-calendar__week-label {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.03em;
}

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

.mg-calendar__day-header {
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #f7b829;
  padding: 0.15rem 0 0.35rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Base day cell — aspect-ratio hält Kreisform bei jeder Bildschirmbreite */
.mg-calendar__day {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  width: 100%;
  max-width: 48px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid transparent;
  background: none;
  cursor: default;
  transition: background 0.1s, border-color 0.1s;
}
.mg-calendar__day--empty { pointer-events: none; }

.mg-calendar__day--unavailable .mg-calendar__day-number { color: #555555; }

.mg-calendar__day--available {
  cursor: pointer;
  background: rgba(247, 184, 41, 0.08);
}
.mg-calendar__day--available:hover {
  background: rgba(247, 184, 41, 0.2);
  border-color: #f7b829;
}

/* Today: gold ring */
.mg-calendar__day--today { border-color: #f7b829; }

/* Selected: gold filled */
.mg-calendar__day--selected {
  background: #f7b829 !important;
  border-color: #f7b829;
}
.mg-calendar__day--selected .mg-calendar__day-number {
  color: #2b2b2b;
  font-weight: 700;
}

.mg-calendar__day-number {
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
}

/* ── Slot Picker ───────────────────────────────────────────────────────────── */

.mg-slot-picker { margin-top: 0.25rem; }

.mg-slot-picker__loading,
.mg-slot-picker__error,
.mg-slot-picker__empty {
  padding: 1rem;
  text-align: center;
  color: #aaaaaa;
  border: 1px dashed #555555;
  border-radius: 8px;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}
.mg-slot-picker__error { color: #fca5a5; border-color: #c72d00; }

.mg-slot-picker__hint {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f7b829;
  margin-bottom: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mg-slot-picker__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #555555;
  border-radius: 10px;
  background: #343434;
  scrollbar-width: thin;
  scrollbar-color: #555555 #343434;
}
.mg-slot-picker__grid::-webkit-scrollbar { width: 4px; }
.mg-slot-picker__grid::-webkit-scrollbar-track { background: transparent; }
.mg-slot-picker__grid::-webkit-scrollbar-thumb { background: #555555; border-radius: 2px; }
.mg-slot-picker__grid::-webkit-scrollbar-thumb:hover { background: #f7b829; }

.mg-slot {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  border: none;
  border-bottom: 1px solid #404040;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s;
  gap: 0;
  text-decoration: none;
  color: inherit;
}
.mg-slot:last-child { border-bottom: none; }
.mg-slot--available:hover { background: rgba(247, 184, 41, 0.08); }
.mg-slot--selected { background: rgba(247, 184, 41, 0.15) !important; border-left: 3px solid #f7b829; padding-left: calc(1rem - 3px); }
.mg-slot--selected .mg-slot__time { color: #f7b829; }
.mg-slot--taken { opacity: 0.3; cursor: not-allowed; }

.mg-slot__time  { font-size: 1.0625rem; font-weight: 700; color: #ffffff; min-width: 4rem; }
.mg-slot__tier  { font-size: 0.75rem; color: #888888; flex: 1; text-align: center; }
.mg-slot__price { font-size: 0.9375rem; font-weight: 600; color: #f7b829; text-align: right; }

.mg-slot-picker__summary {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(247, 184, 41, 0.08);
  border: 1px solid #f7b829;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: #f7b829;
}

/* ── Booking Form ──────────────────────────────────────────────────────────── */

.mg-booking-form__summary {
  background: #343434;
  border: 1px solid #555555;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.mg-booking-form__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}
.mg-booking-form__details { display: grid; gap: 0.5rem; margin: 0; }
.mg-booking-form__details > div { display: flex; justify-content: space-between; }
.mg-booking-form__details dt { color: #aaaaaa; font-size: 0.875rem; }
.mg-booking-form__details dd { margin: 0; font-size: 0.875rem; color: #ffffff; }

.mg-booking-form__details a,
.mg-booking-form__summary a {
  font-size: 0.875rem;
  color: #f7b829;
  text-decoration: none;
}
.mg-booking-form__details a:hover,
.mg-booking-form__summary a:hover { text-decoration: underline; }

.mg-form-field { margin-bottom: 1rem; }
.mg-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cccccc;
  margin-bottom: 0.375rem;
}
.mg-form-radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.mg-form-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #cccccc;
}
.mg-form-checkbox-group { display: flex; flex-direction: column; gap: 0.5rem; }
.mg-form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #cccccc;
}
.mg-form-hint {
  color: #f0a500;
  font-size: 0.875rem;
}
.mg-form-select,
.mg-form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: #ffffff;
  color: #111111;
  font-family: 'Jost', sans-serif;
  font-size: 0.9375rem;
  margin-top: 0.25rem;
}
.mg-form-info-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  color: #cccccc;
}
.mg-form-info-box p { margin: 0 0 0.5rem; color: #ffffff; }
.mg-form-info-box ul { margin: 0; padding-left: 1.25rem; }
.mg-form-info-box li { margin-bottom: 0.25rem; }

/* ── Event-Typ-Tabs ────────────────────────────────────────────────────────── */
.mg-event-type-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.mg-event-type-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.625rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
}
.mg-event-type-tab:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
}
.mg-event-type-tab--active {
  background: rgba(247, 184, 41, 0.15);
  border-color: #f7b829;
}
.mg-event-type-tab__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}
.mg-event-type-tab--active .mg-event-type-tab__label { color: #f7b829; }
.mg-event-type-tab__sub {
  font-size: 0.75rem;
  color: #999999;
}
.mg-form-textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 6px;
  background: #ffffff;
  color: #111111;
  font-family: 'Jost', sans-serif;
  font-size: 0.9375rem;
  box-shadow: inset 2px 2px 8px rgba(0, 0, 0, 0.25);
  resize: vertical;
}
.mg-form-textarea:focus { outline: 2px solid #f7b829; outline-offset: 2px; }

.mg-back-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #cccccc;
  text-decoration: none;
}
.mg-back-link:hover {
  color: #f7b829;
  text-decoration: underline;
}

.mg-booking-form__payment-note {
  font-size: 0.8125rem;
  color: #dddddd;
  background: rgba(247, 184, 41, 0.10);
  border: 1px solid rgba(247, 184, 41, 0.45);
  border-radius: 6px;
  padding: 0.75rem;
  margin: 1rem 0;
}

.mg-booking-notice {
  background: rgba(247, 184, 41, 0.1);
  border: 1px solid #f7b829;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  font-size: 0.875rem;
  color: #ffffff;
}
.mg-booking-notice p  { margin: 0 0 0.5rem; color: #ffffff; }
.mg-booking-notice ul { margin: 0; padding-left: 1.25rem; }
.mg-booking-notice li { margin-bottom: 0.25rem; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.mg-booking-form__submit {
  width: 100%;
  padding: 0.65em 2.6em;
  background: #f7b829;
  color: #2b2b2b;
  border: none;
  border-radius: 200px;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.mg-booking-form__submit:hover:not(:disabled) {
  background: #f0ac10;
  box-shadow: 0 0 0 4px rgba(247, 184, 41, 0.2);
}
.mg-booking-form__submit:disabled { opacity: 0.5; cursor: not-allowed; }

.mg-booking-login__btn {
  display: inline-block;
  padding: 0.65em 2.6em;
  background: #f7b829;
  color: #2b2b2b;
  border: none;
  border-radius: 200px;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.mg-booking-login__btn:hover { background: #f0ac10; }

.mg-booking-login__btn--secondary {
  background: transparent;
  color: #f7b829;
  border: 1.5px solid #f7b829;
}
.mg-booking-login__btn--secondary:hover {
  background: rgba(247, 184, 41, 0.12);
}

.mg-booking-success__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Success / Login / Error States ───────────────────────────────────────── */

.mg-booking-success,
.mg-booking-login {
  text-align: center;
  padding: 2rem 1rem;
  background: #343434;
  border: 1px solid #555555;
  border-radius: 12px;
  margin: 1rem 0;
}
.mg-booking-success h2,
.mg-booking-login h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #f7b829;
  letter-spacing: 0.03em;
}
.mg-booking-success p,
.mg-booking-login p {
  margin: 0 0 1.25rem;
  color: #cccccc;
  font-size: 0.9375rem;
}

.mg-booking-error {
  padding: 0.75rem 1rem;
  background: rgba(199, 45, 0, 0.15);
  border: 1px solid #c72d00;
  border-radius: 6px;
  color: #fca5a5;
  font-size: 0.9375rem;
  margin: 1rem 0;
}

/* ── Event-Typ Info-Icon ───────────────────────────────────────────────────── */
.mg-event-type-tab__info {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #cccccc;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.125rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  z-index: 1;
  pointer-events: auto;
}
.mg-event-type-tab__info:hover {
  background: rgba(247, 184, 41, 0.25);
  border-color: #f7b829;
  color: #f7b829;
}
/* Tooltip für Schießstunde (kein externer Link) */
.mg-event-type-tab__info--tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  top: auto;
  right: 0;
  min-width: 180px;
  max-width: 220px;
  background: rgba(20, 20, 20, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #dddddd;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 0.5rem 0.625rem;
  border-radius: 6px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 100;
}
.mg-event-type-tab__info--tooltip:hover::after {
  opacity: 1;
}

/* ── App-Navigation (alle Seiten) ─────────────────────────────────────────── */
.mg-app-nav {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.mg-app-nav a {
  font-size: 0.875rem;
  color: #9ca3af;
  text-decoration: none;
}
.mg-app-nav a:hover { color: #f7b829; }
.mg-app-nav span { color: #4b5563; }

/* ── Tab-Select-Link (unsichtbarer Klickbereich über gesamte Karte) ─────────── */
.mg-event-type-tab__select-link {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* ── Responsive — Mobile (≤ 480px) ────────────────────────────────────────── */

@media (max-width: 480px) {
  .mg-booking-widget {
    padding: 0.75rem 0.75rem 1rem;
  }
  .mg-calendar {
    padding: 0.625rem 0.375rem 0.5rem;
  }
  .mg-calendar__week-label {
    font-size: 0.875rem;
  }
  .mg-calendar__day-number {
    font-size: 0.75rem;
  }
  .mg-slot {
    padding: 0.5rem 0.75rem;
  }
  .mg-slot__tier {
    display: none; /* Platzsparend auf kleinen Screens */
  }
  .mg-booking-form__details > div {
    flex-direction: column;
    gap: 0.1rem;
  }
  .mg-booking-form__details dd {
    font-weight: 500;
  }
  .mg-booking-success__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .mg-booking-login__btn {
    width: 100%;
    text-align: center;
  }
}
