/* BRAINIAC Booking — public page styles
 * Brand-aligned with honzahubka.cz: DM Sans / Outfit fonts, navy + turquoise palette.
 */

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

:root {
  /* Brand — honzahubka.cz */
  --primary: #00B4D8;            /* turquoise accent (CTAs, selection) */
  --primary-dark: #0096B4;
  --primary-soft: #E6F8FB;       /* turquoise tint for hover backgrounds */
  --navy: #1E3A5F;               /* dark blue (sidebar) */
  --navy-light: #2A4A73;         /* sidebar hover / second tier */
  --text: #2D3748;               /* main body text */
  --text-muted: #718096;         /* labels, captions */
  --border: #E2E8F0;             /* light gray borders */
  --bg: #F8F9FA;                 /* page background */
  --bg-card: #FFFFFF;
  --bg-sidebar: var(--navy);
  --success: #00B4D8;
  --error: #E53E3E;
  --shadow-card: 0 4px 24px rgba(30, 58, 95, 0.08);

  /* Typography */
  --font-heading: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.page {
  min-height: 100vh;
  padding: 32px 16px;
}

.container {
  max-width: 980px;
  margin: 0 auto;
}

/* ── Stepper ───────────────────────────────────────── */

.stepper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 32px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.step .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  margin-bottom: 8px;
  background: var(--bg);
}

.step.done .dot {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.step.done .dot::after {
  content: "✓";
  color: white;
}

.step.active {
  color: var(--primary);
}

.step.active .dot {
  border-color: var(--primary);
}

.stepper .line {
  width: 200px;
  height: 2px;
  background: var(--text-muted);
  margin: 0 8px;
  margin-bottom: 24px;
}

.stepper .line.done {
  background: var(--primary);
}

/* ── Card layout (split) ───────────────────────────── */

.card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--border);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  min-height: 540px;
}

.sidebar {
  background: var(--bg-sidebar);
  color: white;
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.sidebar .avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  align-self: center;
  box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.18);
}

.sidebar h1 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 28px;
  text-align: center;
  color: white;
  letter-spacing: -0.01em;
}

.sidebar .month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.sidebar .month-nav button {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.sidebar .month-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar .month-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-wrapper {
  position: relative;
}

.cal-loading {
  position: absolute;
  inset: 0;
  background: rgba(30, 58, 95, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  backdrop-filter: blur(2px);
}

.cal-loading[hidden] {
  display: none;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
}

.calendar {
  width: 100%;
  border-collapse: collapse;
}

.calendar th {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  padding: 8px 0;
  text-align: center;
}

.calendar td {
  text-align: center;
  padding: 6px 0;
}

.calendar td button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
}

.calendar td button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.calendar td button:disabled {
  color: rgba(255, 255, 255, 0.25);
  cursor: not-allowed;
}

.calendar td button.selected {
  background: white;
  color: var(--bg-sidebar);
  font-weight: 700;
}

.calendar td button.has-slots {
  font-weight: 700;
}

/* ── Right pane (slot list) ─────────────────────────── */

.slots-pane {
  padding: 24px 28px;
  overflow-y: auto;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

/* Compact info row: Teams + duration on one line */
.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.info-chip .icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.date-heading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

.date-heading b {
  color: var(--text);
  font-weight: 700;
}

.slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.slot-btn {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

.slot-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

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

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 16px;
  font-size: 14px;
}

/* ── Form view ──────────────────────────────────────── */

.form-pane {
  padding: 40px 48px;
}

.form-pane h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 18px;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.selected-time {
  font-size: 16px;
  margin-bottom: 8px;
}

.selected-time b {
  font-weight: 600;
}

.selected-time a {
  color: var(--primary);
  text-decoration: none;
  margin-left: 8px;
  font-weight: 500;
}

.selected-location {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-field label .req {
  color: var(--error);
}

.form-field input,
.form-field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--font-body);
  background: white;
  color: var(--text);
  transition: all 0.15s ease;
}

.form-field textarea {
  min-height: 80px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.button-row {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.btn {
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(0, 180, 216, 0.32);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #CBD5E0;
  border-color: #CBD5E0;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--navy);
  color: var(--navy);
}

/* ── Confirmation view ─────────────────────────────── */

.confirmation {
  padding: 56px 48px;
  text-align: center;
}

.confirmation .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}

.confirmation h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.confirmation .when {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.confirmation .tz-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.confirmation .actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.confirmation .actions a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.error-banner {
  background: #FED7D7;
  color: var(--error);
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #FEB2B2;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.error-banner.show {
  display: block;
}

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

/* ── Mobile ────────────────────────────────────────── */

@media (max-width: 768px) {
  .split {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 24px;
  }
  .form-pane,
  .slots-pane {
    padding: 24px;
  }
  .stepper .line {
    width: 80px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .confirmation {
    padding: 40px 24px;
  }
}
