/* Generated from apps/studio-prototype/src/index.css by the integration (besluit 039); the global reset is scoped to .st-root. */
/* PASNESER Studio — Design Prototype
   All design tokens in one block. Every class starts with st-.
*/

/* ========== DESIGN TOKENS ========== */
:root {
  /* Colors — point kinds */
  --st-color-story: #e8730a;        /* orange = story */
  --st-color-story-bg: #fff4e8;
  --st-color-turn: #2974c2;         /* blue = turn instruction */
  --st-color-turn-bg: #e8f1fb;
  --st-color-problem: #d92b2b;      /* red = problem/clash */
  --st-color-problem-bg: #fde8e8;
  --st-color-ok: #1a9d52;           /* green = done/OK */
  --st-color-ok-bg: #e6f6ee;
  --st-color-skipped: #8e8e8e;      /* grey = skipped */
  --st-color-skipped-bg: #f0f0f0;

  /* Colors — UI */
  --st-color-primary: #e8730a;
  --st-color-primary-hover: #d4640a;
  --st-color-primary-bg: #fff4e8;
  --st-color-secondary: #2974c2;
  --st-color-secondary-hover: #2262a8;
  --st-color-secondary-bg: #e8f1fb;
  --st-color-warning: #c98400;
  --st-color-warning-bg: #fff5e0;
  --st-color-error: #d92b2b;
  --st-color-error-bg: #fde8e8;
  --st-color-success: #1a9d52;
  --st-color-success-bg: #e6f6ee;

  /* Neutrals */
  --st-color-bg: #f5f5f7;
  --st-color-surface: #ffffff;
  --st-color-surface-alt: #f0f0f2;
  --st-color-border: #d8d8dc;
  --st-color-border-strong: #b8b8bc;
  --st-color-text: #1a1a1e;
  --st-color-text-secondary: #5a5a62;
  --st-color-text-disabled: #a0a0a8;
  --st-color-map-placeholder: #e0e0e4;
  --st-color-map-placeholder-dark: #c8c8cc;

  /* Radii */
  --st-radius: 8px;
  --st-radius-sm: 4px;
  --st-radius-lg: 12px;
  --st-radius-xl: 16px;
  --st-radius-pill: 999px;

  /* Spacing — 8px system */
  --st-space-1: 4px;
  --st-space-2: 8px;
  --st-space-3: 12px;
  --st-space-4: 16px;
  --st-space-5: 24px;
  --st-space-6: 32px;
  --st-space-7: 48px;
  --st-space-8: 64px;

  /* Typography */
  --st-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --st-font-size-xs: 11px;
  --st-font-size-sm: 13px;
  --st-font-size-base: 14px;
  --st-font-size-md: 16px;
  --st-font-size-lg: 18px;
  --st-font-size-xl: 22px;
  --st-font-size-2xl: 28px;
  --st-font-size-3xl: 36px;
  --st-line-height-body: 1.5;
  --st-line-height-heading: 1.2;
  --st-font-weight-normal: 400;
  --st-font-weight-medium: 500;
  --st-font-weight-semibold: 600;
  --st-font-weight-bold: 700;

  /* Shadows */
  --st-shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --st-shadow-md: 0 2px 8px rgba(0,0,0,0.1);
  --st-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  /* Transitions */
  --st-transition: 150ms ease;
  --st-transition-slow: 300ms ease;

  /* Z-index */
  --st-z-map-controls: 10;
  --st-z-panel: 20;
  --st-z-timeline: 30;
  --st-z-modal: 50;
  --st-z-toast: 60;
}

/* ========== RESET (scoped: the Studio lives inside TourMaker, so nothing global) ========== */
.st-root, .st-root *, .st-root *::before, .st-root *::after { box-sizing: border-box; }
.st-root { font-family: var(--st-font-family); font-size: var(--st-font-size-base); line-height: var(--st-line-height-body); color: var(--st-color-text); background: var(--st-color-bg); -webkit-font-smoothing: antialiased; position: relative; flex: 1; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.st-root .st-page { height: 100% !important; }
.st-root .st-map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.st-toast { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: var(--st-z-toast); max-width: min(560px, 90%); padding: 10px 16px; border-radius: var(--st-radius); background: var(--st-color-text); color: var(--st-color-surface); font-size: var(--st-font-size-sm); box-shadow: var(--st-shadow-md); }

/* ========== BUTTONS ========== */
.st-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--st-space-2);
  min-height: 40px;
  min-width: 40px;
  padding: var(--st-space-2) var(--st-space-3);
  border: 1px solid var(--st-color-border);
  border-radius: var(--st-radius);
  background: var(--st-color-surface);
  color: var(--st-color-text);
  font-family: inherit;
  font-size: var(--st-font-size-base);
  font-weight: var(--st-font-weight-medium);
  cursor: pointer;
  transition: background var(--st-transition), border-color var(--st-transition), color var(--st-transition);
  white-space: nowrap;
  text-decoration: none;
}
.st-btn:hover { border-color: var(--st-color-border-strong); background: var(--st-color-surface-alt); }
.st-btn:active { transform: translateY(1px); }
.st-btn:disabled, .st-btn.st-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.st-btn:focus-visible { outline: 3px solid var(--st-color-secondary); outline-offset: 1px; }

.st-btn-primary {
  background: var(--st-color-primary);
  border-color: var(--st-color-primary);
  color: #fff;
}
.st-btn-primary:hover { background: var(--st-color-primary-hover); border-color: var(--st-color-primary-hover); }

.st-btn-secondary {
  background: var(--st-color-secondary);
  border-color: var(--st-color-secondary);
  color: #fff;
}
.st-btn-secondary:hover { background: var(--st-color-secondary-hover); border-color: var(--st-color-secondary-hover); }

.st-btn-danger {
  background: var(--st-color-error);
  border-color: var(--st-color-error);
  color: #fff;
}
.st-btn-danger:hover { background: #c02727; border-color: #c02727; }

.st-btn-ghost { border-color: transparent; background: transparent; }
.st-btn-ghost:hover { background: var(--st-color-surface-alt); border-color: transparent; }

.st-btn-sm { min-height: 32px; min-width: 32px; padding: var(--st-space-1) var(--st-space-2); font-size: var(--st-font-size-sm); }
.st-btn-icon { padding: var(--st-space-2); }
.st-btn-icon svg { display: block; }

.st-btn-toggle.st-active {
  background: var(--st-color-primary);
  border-color: var(--st-color-primary);
  color: #fff;
}

/* ========== INPUTS ========== */
.st-input, .st-select, .st-textarea {
  width: 100%;
  min-height: 40px;
  padding: var(--st-space-2) var(--st-space-3);
  border: 1px solid var(--st-color-border);
  border-radius: var(--st-radius-sm);
  background: var(--st-color-surface);
  color: var(--st-color-text);
  font-family: inherit;
  font-size: var(--st-font-size-base);
  transition: border-color var(--st-transition);
}
.st-input:focus, .st-select:focus, .st-textarea:focus {
  outline: none;
  border-color: var(--st-color-secondary);
  box-shadow: 0 0 0 3px var(--st-color-secondary-bg);
}
.st-textarea { min-height: 80px; resize: vertical; line-height: var(--st-line-height-body); }
.st-input:disabled, .st-select:disabled, .st-textarea:disabled {
  background: var(--st-color-surface-alt);
  color: var(--st-color-text-disabled);
  cursor: not-allowed;
}
.st-input::placeholder { color: var(--st-color-text-disabled); }

/* Checkbox */
.st-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--st-space-2);
  cursor: pointer;
  min-height: 40px;
  font-size: var(--st-font-size-base);
}
.st-checkbox input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--st-color-primary); }

/* ========== GENERAL UTILITIES ========== */
.st-card {
  background: var(--st-color-surface);
  border: 1px solid var(--st-color-border);
  border-radius: var(--st-radius-lg);
  box-shadow: var(--st-shadow-sm);
}

.st-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--st-space-1);
  padding: 2px var(--st-space-2);
  border-radius: var(--st-radius-pill);
  font-size: var(--st-font-size-xs);
  font-weight: var(--st-font-weight-semibold);
  white-space: nowrap;
}
.st-badge-story { background: var(--st-color-story-bg); color: var(--st-color-story); }
.st-badge-turn { background: var(--st-color-turn-bg); color: var(--st-color-turn); }
.st-badge-problem { background: var(--st-color-problem-bg); color: var(--st-color-problem); }
.st-badge-ok { background: var(--st-color-ok-bg); color: var(--st-color-ok); }
.st-badge-skipped { background: var(--st-color-skipped-bg); color: var(--st-color-skipped); }
.st-badge-warning { background: var(--st-color-warning-bg); color: var(--st-color-warning); }

.st-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.st-dot-story { background: var(--st-color-story); }
.st-dot-turn { background: var(--st-color-turn); }
.st-dot-problem { background: var(--st-color-problem); }
.st-dot-ok { background: var(--st-color-ok); }
.st-dot-skipped { background: var(--st-color-skipped); }

.st-label {
  font-size: var(--st-font-size-xs);
  font-weight: var(--st-font-weight-semibold);
  color: var(--st-color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.st-hint {
  font-size: var(--st-font-size-xs);
  color: var(--st-color-text-secondary);
}
.st-calculated {
  font-size: var(--st-font-size-xs);
  color: var(--st-color-text-secondary);
  font-style: italic;
}

.st-row { display: flex; align-items: center; gap: var(--st-space-2); }
.st-col { display: flex; flex-direction: column; gap: var(--st-space-2); }
.st-grow { flex: 1; }
.st-shrink { flex-shrink: 0; }
.st-wrap { flex-wrap: wrap; }
.st-gap-1 { gap: var(--st-space-1); }
.st-gap-2 { gap: var(--st-space-2); }
.st-gap-3 { gap: var(--st-space-3); }
.st-gap-4 { gap: var(--st-space-4); }

.st-hidden { display: none !important; }
.st-invisible { visibility: hidden; }

.st-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ========== SCREEN SHELL ========== */
.st-screen { height: 100%; display: flex; flex-direction: column; overflow: hidden; }

.st-topbar {
  display: flex;
  align-items: center;
  gap: var(--st-space-3);
  padding: var(--st-space-2) var(--st-space-4);
  background: var(--st-color-surface);
  border-bottom: 1px solid var(--st-color-border);
  min-height: 56px;
  flex-shrink: 0;
}
.st-topbar-title {
  font-size: var(--st-font-size-md);
  font-weight: var(--st-font-weight-semibold);
  white-space: nowrap;
}
.st-topbar-subtitle {
  font-size: var(--st-font-size-sm);
  color: var(--st-color-text-secondary);
}

/* ========== STATE SCREENS ========== */
.st-state-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--st-space-4);
  padding: var(--st-space-6);
  text-align: center;
}
.st-state-icon { color: var(--st-color-text-secondary); }
.st-state-title { font-size: var(--st-font-size-xl); font-weight: var(--st-font-weight-semibold); }
.st-state-message { font-size: var(--st-font-size-base); color: var(--st-color-text-secondary); max-width: 400px; }

.st-spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--st-color-border);
  border-top-color: var(--st-color-primary);
  border-radius: 50%;
  animation: st-spin 0.8s linear infinite;
}
@keyframes st-spin { to { transform: rotate(360deg); } }

/* ========== MODAL / DIALOG ========== */
.st-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--st-z-modal);
  animation: st-fade-in var(--st-transition);
}
@keyframes st-fade-in { from { opacity: 0; } }
.st-modal {
  background: var(--st-color-surface);
  border-radius: var(--st-radius-lg);
  box-shadow: var(--st-shadow-lg);
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.st-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--st-space-4) var(--st-space-5);
  border-bottom: 1px solid var(--st-color-border);
}
.st-modal-title { font-size: var(--st-font-size-lg); font-weight: var(--st-font-weight-semibold); }
.st-modal-body { padding: var(--st-space-4) var(--st-space-5); }
.st-modal-footer {
  display: flex;
  gap: var(--st-space-3);
  justify-content: flex-end;
  padding: var(--st-space-4) var(--st-space-5);
  border-top: 1px solid var(--st-color-border);
}

/* ========== POPOVER ========== */
.st-popover {
  position: absolute;
  background: var(--st-color-surface);
  border: 1px solid var(--st-color-border);
  border-radius: var(--st-radius);
  box-shadow: var(--st-shadow-lg);
  z-index: var(--st-z-modal);
  min-width: 320px;
  max-width: 400px;
}
.st-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--st-space-3) var(--st-space-4);
  border-bottom: 1px solid var(--st-color-border);
}
.st-popover-list { max-height: 400px; overflow-y: auto; }

/* ========== PANELS ========== */
.st-panel {
  background: var(--st-color-surface);
  border: 1px solid var(--st-color-border);
  border-radius: var(--st-radius-lg);
  overflow: hidden;
}
.st-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--st-space-3) var(--st-space-4);
  border-bottom: 1px solid var(--st-color-border);
}
.st-panel-title { font-size: var(--st-font-size-md); font-weight: var(--st-font-weight-semibold); }
.st-panel-body { padding: var(--st-space-4); }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--st-color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--st-color-border-strong); }

/* ========== MAP ========== */
#map {
  width: 100%;
  height: 100%;
  background: var(--st-color-map-placeholder);
  background-image:
    linear-gradient(var(--st-color-map-placeholder-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--st-color-map-placeholder-dark) 1px, transparent 1px);
  background-size: 40px 40px;
  position: relative;
  overflow: hidden;
}
.st-map-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--st-space-2);
  color: var(--st-color-text-disabled);
}
.st-map-placeholder svg { width: 64px; height: 64px; }
.st-map-placeholder-text { font-size: var(--st-font-size-sm); }

/* Map controls overlay */
.st-map-overlay-top-left {
  position: absolute;
  top: var(--st-space-3);
  left: var(--st-space-3);
  z-index: var(--st-z-map-controls);
  display: flex;
  align-items: center;
  gap: var(--st-space-2);
  flex-wrap: wrap;
}
.st-map-overlay-top-right {
  position: absolute;
  top: var(--st-space-3);
  right: var(--st-space-3);
  z-index: var(--st-z-map-controls);
  display: flex;
  flex-direction: column;
  gap: var(--st-space-2);
}
.st-map-overlay-bottom-left {
  position: absolute;
  bottom: var(--st-space-3);
  left: var(--st-space-3);
  z-index: var(--st-z-map-controls);
  display: flex;
  align-items: center;
  gap: var(--st-space-2);
  flex-wrap: wrap;
}

.st-search-box {
  width: 200px;
}

/* Map fake route thumbnail */
.st-map-thumb {
  width: 120px;
  height: 80px;
  background: var(--st-color-map-placeholder);
  background-image:
    linear-gradient(var(--st-color-map-placeholder-dark) 1px, transparent 1px),
    linear-gradient(90deg, var(--st-color-map-placeholder-dark) 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: var(--st-radius-sm);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.st-map-thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Point markers on placeholder map */
.st-map-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: var(--st-shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform var(--st-transition);
}
.st-map-marker:hover { transform: translate(-50%, -50%) scale(1.2); }
.st-map-marker.st-selected { transform: translate(-50%, -50%) scale(1.3); box-shadow: 0 0 0 4px rgba(232,115,10,0.3), var(--st-shadow-md); }
.st-map-marker-story { background: var(--st-color-story); }
.st-map-marker-turn { background: var(--st-color-turn); }
.st-map-marker-note { background: var(--st-color-skipped); }
.st-map-marker-problem { background: var(--st-color-problem); }

/* Route line on placeholder map */
.st-map-route { position: absolute; inset: 0; pointer-events: none; }

/* ========== SLIDE-IN PANEL ========== */
.st-slide-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  background: var(--st-color-surface);
  border-left: 1px solid var(--st-color-border);
  box-shadow: -4px 0 16px rgba(0,0,0,0.08);
  z-index: var(--st-z-panel);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--st-transition-slow);
}
.st-slide-panel.st-open { transform: translateX(0); }
.st-slide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--st-space-3) var(--st-space-4);
  border-bottom: 1px solid var(--st-color-border);
  flex-shrink: 0;
}
.st-slide-panel-body { flex: 1; overflow-y: auto; padding: var(--st-space-4); }

/* ========== STEP INDICATOR ========== */
.st-steps { display: flex; flex-direction: column; gap: var(--st-space-3); }
.st-step {
  display: flex;
  align-items: center;
  gap: var(--st-space-3);
  padding: var(--st-space-3);
  border-radius: var(--st-radius);
  border: 1px solid var(--st-color-border);
  background: var(--st-color-surface);
}
.st-step.st-active { border-color: var(--st-color-primary); background: var(--st-color-primary-bg); }
.st-step.st-done { border-color: var(--st-color-ok); background: var(--st-color-ok-bg); }
.st-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--st-font-size-sm);
  font-weight: bold;
  background: var(--st-color-surface-alt);
  flex-shrink: 0;
}
.st-step.st-active .st-step-num { background: var(--st-color-primary); color: #fff; }
.st-step.st-done .st-step-num { background: var(--st-color-ok); color: #fff; }
.st-step-text { font-size: var(--st-font-size-sm); }

/* ========== PHONE PREVIEW ========== */
.st-phone {
  width: 200px;
  height: 380px;
  border: 3px solid var(--st-color-text);
  border-radius: 24px;
  background: var(--st-color-surface);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.st-phone-screen {
  flex: 1;
  padding: var(--st-space-5) var(--st-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--st-space-3);
  overflow: hidden;
}
.st-phone-bar {
  height: 24px;
  background: var(--st-color-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-phone-bar::after {
  content: '';
  width: 60px;
  height: 4px;
  background: #555;
  border-radius: 2px;
}
.st-phone-title { font-size: var(--st-font-size-lg); font-weight: var(--st-font-weight-bold); }
.st-phone-text { font-size: var(--st-font-size-sm); color: var(--st-color-text-secondary); }
.st-phone-btn {
  margin-top: auto;
  padding: var(--st-space-3) var(--st-space-4);
  border-radius: var(--st-radius-pill);
  text-align: center;
  font-weight: var(--st-font-weight-semibold);
  color: #fff;
}

/* ========== SMALL PHONE PREVIEW (bottom bar) ========== */
.st-phone-mini {
  width: 160px;
  height: 280px;
  border: 2px solid var(--st-color-text);
  border-radius: 16px;
  background: var(--st-color-surface);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.st-phone-mini-screen {
  flex: 1;
  padding: var(--st-space-3) var(--st-space-2);
  display: flex;
  flex-direction: column;
  gap: var(--st-space-2);
  overflow: hidden;
  font-size: var(--st-font-size-xs);
}
.st-phone-mini-bar { height: 16px; background: var(--st-color-text); display: flex; align-items: center; justify-content: center; }
.st-phone-mini-bar::after { content: ''; width: 40px; height: 3px; background: #555; border-radius: 2px; }
.st-phone-mini-title { font-weight: var(--st-font-weight-bold); font-size: 12px; }
.st-phone-mini-text { color: var(--st-color-text-secondary); }

/* ========== ANIMATIONS ========== */
@keyframes st-slide-up { from { opacity: 0; transform: translateY(8px); } }
.st-anim-slide-up { animation: st-slide-up var(--st-transition); }

/* Prototype fix: the route layer lets clicks through, but the markers on it must stay clickable. */
.st-map-marker { pointer-events: auto; }
.st-map-placeholder { pointer-events: none; }
/* Prototype fix: the point-list button sits at the top left, so the filters start to the right of it. */
.st-map-overlay-top-left { left: calc(var(--st-space-3) + 52px); right: 72px; }
