/* ============================================================
GLOBAL VARIABLES & RESET
============================================================ */
:root {
  --accent: #ff3366;
  --text: #333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fafafa;
  color: var(--text);
  overflow-x: hidden;
}


/* ============================================================
HEADER
============================================================ */
.app-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 56px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

.app-title {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.9;
}


/* ============================================================
FAB BUTTON
============================================================ */
.fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 42px;
  border: none;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  z-index: 90;
  transition: transform 0.15s ease;
}

.fab:hover {
  transform: scale(1.08);
}


/* ============================================================
WALL / BOARD
============================================================ */
.board {
  width: 100%;
  height: 100vh;
  padding-top: 56px;
  background: url('assets/muur.jpg') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.empty {
  position: absolute;
  top: 50%; left:50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  text-align: center;
  font-size: 18px;
}


/* ============================================================
MODALS (BACKDROP + PANEL)
============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 150;
}

.md-modal {
  position: fixed;
  top: 50%; left:50%;
  transform: translate(-50%, -50%);
  width: 480px;
  max-width: 90%;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  z-index: 200;
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}

.md-modal-close {
  position: absolute;
  top: 12px; right:12px;
  background: none;
  border: none;
  font-size: 22px;
  opacity: 0.5;
  cursor: pointer;
}

.md-modal-close:hover {
  opacity: 1;
}


/* ============================================================
MATERIAL INPUTS & BUTTONS
============================================================ */
.md-field {
  position: relative;
  margin: 24px 0 30px;
}

.md-field input {
  width: 100%;
  padding: 14px 8px 8px;
  border: none;
  border-bottom: 2px solid #aaa;
  font-size: 16px;
  outline: none;
  background: none;
}

.md-field label {
  position: absolute;
  left: 8px;
  top: 16px;
  font-size: 16px;
  opacity: 0.6;
  transition: 0.2s ease;
}

.md-field input:focus + label,
.md-field input:not(:placeholder-shown) + label {
  top: -6px;
  font-size: 13px;
  opacity: 0.9;
}

.md-btn {
  padding: 10px 18px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

.md-btn.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

.md-btn.text {
  background: none;
  color: var(--accent);
}

.md-btn:disabled,
.md-btn.disabled {
  background: #cccccc !important;
  color: #666 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  opacity: 0.7;
}

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

.step {
  display: none;
}

.step.active {
  display: block;
}


/* ============================================================
CAMERA STEP
============================================================ */
.camera-box {
  position: relative;
  width: 100%;
}

#video {
  width: 100%;
  border-radius: 8px;
  display: block;
  position: relative;
  z-index: 0;
}

#photoCanvas {
  width: 100%;
  border-radius: 8px;
}

#arCanvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#doodleCanvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto; /* je moet erop kunnen tekenen */
  z-index: 2;
  cursor: cell;
}


/* ============================================================
AUDIO VISUALIZER & RECORDER
============================================================ */
.wave-canvas {
  width: 100%;
  margin: 12px 0;
  background: transparent;
  border-radius: 8px;
  display:block;
}

#visualizer {
  height: 120px;
}

#previewWaveform {
  height: 100px;
}

.audio-recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rec-btn,
.stop-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border:none;
  font-size: 30px;
  color:white;
  cursor:pointer;
  transition: transform 0.15s ease;
}

.rec-btn:hover,
.stop-btn:hover {
  transform: scale(1.08);
}

.rec-btn { background:#e53935; }
.stop-btn { background:#444; }

.rec-status {
  margin-top: 12px;
  opacity: 0.7;
}

#audioPreview {
  width: 100%;
  margin-top: 10px;
}


/* ============================================================
POLAROID STYLING (INCL. PIN)
============================================================ */
.polaroid {
  position: absolute;
  width: 320px;
  padding: 14px 14px 26px;
  background: #fcf8f4;
  border-radius: 6px;
  box-shadow: 
    0 14px 28px rgba(0,0,0,0.35),
    inset 0 0 0 1px rgba(255,255,255,0.3);
  transform-origin: center top;
  cursor: grab;
}

/* --- PIN IMAGE ABOVE POLAROID --- */
.polaroid-pin-img {
  position: absolute;
  top: -34px;
  left: 50%;
  width: 38px;
  height: auto;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 50;
}

.polaroid-inner {
  background: white;
  border-radius: 4px;
  padding: 8px 8px 14px;
  box-shadow:
    0 5px 10px rgba(0,0,0,0.18),
    inset 0 0 0 1px rgba(0,0,0,0.05);
}

.polaroid-photo {
  background: #ddd;
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin-bottom: 10px;
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-caption {
  margin-top: 4px;
  font-size: 13px;
  font-family: "Courier New", monospace;
  text-align: center;
}


/* ============================================================
POLAROID AUDIO UI
============================================================ */
.polaroid-audio-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
}

.polaroid-waveform {
  display: block;
  margin: 0 auto;
  padding: 0;
}

.polaroid-play {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: white;             /* Material Design 3 primary */
  color: 6750A4;

  border: none;
  border-radius: 12px;             /* MD3 rounded corners */

  font-size: 20px;
  font-weight: 600;
  cursor: pointer;

    /* MD3 elevation */

  transition: background 120ms ease, 
              transform 120ms ease,
              box-shadow 120ms ease;
}

.polaroid-play:hover {
  background: #7C65C0;
  transform: translateY(-1px);
  
}

.polaroid-play:active {
  background: white;
  transform: scale(0.96);
  
}

.polaroid-play:focus {
  outline: 3px solid rgba(103, 80, 164, 0.45);
  outline-offset: 4px;
}

/* Admin actions row */
.polaroid-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.polaroid-actions button {
  border: none;
  background: none;
  cursor:pointer;
  font-size: 16px;
  opacity: 0.8;
}

.polaroid-actions button:hover {
  opacity: 1;
}


/* ============================================================
ADMIN MODAL
============================================================ */
.modal {
  position: fixed;
  inset: 0;
  display:flex;
  align-items: center;
  justify-content:center;
  background: rgba(0,0,0,0.45);
  z-index: 150;
}

.modal-panel.small {
  width: 320px;
  background:#fff;
  padding:24px;
  border-radius:12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
}

.admin-actions {
  margin-top: 18px;
  display:flex;
  justify-content: space-between;
}

.error {
  margin-top: 8px;
  color:#e53935;
  font-size: 13px;
}


/* ============================================================
HELPERS
============================================================ */
.hidden {
  display:none !important;
}

/* Camera button */
.cam-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #ff3366;
  border: 4px solid #ff3366;
  font-size: 28px;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 18px auto 0 auto;
}

.polaroid-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
color: #E91E63;
  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  color: white;
  font-size: 18px;
  font-weight: 700;

  /* 🔥 Deze 3 fixes centreren de unicode triangle VISUEEL */
  line-height: 1;
  letter-spacing: -2px;
  padding-left: 2px;

  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
  transition: background 120ms ease, transform 120ms ease;
}

.polaroid-play:hover {
  background: #F06292;
  transform: translateY(-1px);
}

.polaroid-play:active {
  background: #C2185B;
  transform: scale(0.94);
}

.polaroid-play {
font-color: #E91E63 !important;
color: #E91E63 !important;
box-shadow:none !important;
}

.polaroid-play:hover {
border: 1px solid #E91E63 !important;
box-shadow:none !important;
}

#viewport {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
  touch-action: none; /* belangrijk: maakt pinch & drag correct */
  background: #0000; /* transparant */
}

#board {
  transform-origin: 0 0;
  position: absolute;
  left: 0;
  top: 0;
}

.nav-controls {
  position: fixed;
  left: 24px;
  bottom: 140px;  /* onder de FAB rechts */
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 200;
}

.nav-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;

  background: #E91E63; /* Material pink */
  color: white;
  font-size: 26px;

  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transition: transform 120ms ease, background 120ms ease;
}

.nav-btn:hover {
  transform: scale(1.08);
  background: #F06292;
}

.nav-btn:active {
  transform: scale(0.92);
}

.nav-btn.active {
  background: #C2185B;
}

#viewport {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
  touch-action: none; /* nodig voor pinch + pan */
}

#board {
  width: 3000px;
  height: 2000px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
}

/* ============================================
   LEFT BOTTOM TOOLBAR (PAN + ZOOM BUTTONS)
   Uitgelijnd op dezelfde hoogte als de FAB
=============================================== */
.left-toolbar {
  position: fixed;
  bottom: 32px;      /* zelfde afstand als de FAB */
  left: 32px;        /* spiegeling van rechterkant FAB */
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 100;
}

/* Stijl voor PAN / ZOOM buttons */
.left-toolbar button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.15s ease;
}

.left-toolbar button:hover {
  transform: scale(1.07);
}

/* Actieve pan-knop highlight */
#panToggle.active {
  background: #ff3366;
  color: white;
}

#audioPreview,
#previewWaveform {
  width: 100% !important;
  height: 100% !important;
}

.audio-preview {
  margin-top: 0;          /* verwijder de ruimte onderaan */
  padding: 0;
}

#previewWaveform {
  margin-top: 0;     /* zet 'm exact op de live waveform plek */
}


