/* Idea Pad whiteboard — scoped to the Studio workspace */
.idea-pad-workspace {
  --canvas-bg: #24282B;
  --dot: rgba(255,255,255,0.07);
  --toolbar-bg: rgba(27,30,32,0.86);
  --toolbar-border: rgba(255,255,255,0.08);
  --ink: #EDEAE2;
  --ink-dim: #9AA0A3;
  --accent: #5FA893;
  --pencil: #E7E2D6;
  --danger: #C97A6B;
  position: relative;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas-bg);
  -webkit-tap-highlight-color: transparent;
}

.idea-pad-header {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: none;
}

.idea-pad-chrome {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 40px;
  padding: 4px;
  border: 1px solid var(--toolbar-border);
  border-radius: 14px;
  background: var(--toolbar-bg);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.idea-pad-brand {
  gap: 8px;
  padding: 4px 10px 4px 4px;
  text-decoration: none;
  color: var(--ink);
}

.idea-pad-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.idea-pad-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1;
}

.idea-pad-brand-copy strong {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.idea-pad-actions {
  padding-right: 6px;
}

.idea-pad-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  transform: none;
}

.idea-pad-icon-btn:hover,
.idea-pad-icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: none;
  box-shadow: none;
}

.idea-pad-icon-btn svg {
  width: 16px;
  height: 16px;
}

.idea-pad-header .account-menu {
  margin-left: 2px;
}

.idea-pad-header .account-menu-trigger,
.idea-pad-header .account-menu-sign-in,
.idea-pad-header .account-menu-sign-in--compact {
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
}

.idea-pad-header .account-menu-sign-in,
.idea-pad-header .account-menu-sign-in--compact {
  padding: 0 10px;
}

.idea-pad-header .account-menu-trigger {
  padding: 0 2px;
}

.idea-pad-header .account-menu-name {
  display: none;
}

.idea-pad-header .account-menu-avatar {
  width: 24px;
  height: 24px;
  background: rgba(95, 168, 147, 0.28);
  color: var(--ink);
}

.idea-pad-header .account-menu-sign-in:hover,
.idea-pad-header .account-menu-sign-in:focus-visible,
.idea-pad-header .account-menu-trigger:hover,
.idea-pad-header .account-menu-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}

.idea-pad-header .account-menu-panel {
  z-index: 80;
}

.idea-pad-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--canvas-bg);
  color: var(--ink);
  font-family: Inter, var(--font-ui), system-ui, sans-serif;
}
.idea-pad-workspace #stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.idea-pad-workspace #stage.panning { cursor: grabbing; }
.idea-pad-workspace #stage.draw-mode { cursor: crosshair; }
.idea-pad-workspace #world {
  position: absolute;
  top: 0;
  left: 0;
  width: 6000px;
  height: 6000px;
  transform-origin: 0 0;
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.6px);
  background-size: 32px 32px;
  background-position: -3000px -3000px;
}
.idea-pad-workspace #strokeLayer,
.idea-pad-workspace #connectionLayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 6000px;
  height: 6000px;
  pointer-events: none;
  overflow: visible;
}
.idea-pad-workspace .card {
  position: absolute;
  min-width: 150px;
  max-width: 260px;
  min-height: 110px;
  padding: 14px 14px 30px 14px;
  border-radius: 3px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.28), 0 1px 0 rgba(255,255,255,0.25) inset;
  transform: rotate(var(--tilt, 0deg));
  user-select: none;
  transition: opacity .25s ease, filter .25s ease;
}
.idea-pad-workspace .card.connect-selected {
  box-shadow: 0 0 0 3px var(--accent), 0 6px 14px rgba(0,0,0,0.28);
}
.idea-pad-workspace #stage.connect-mode .card { cursor: pointer; }
.idea-pad-workspace .card .head {
  height: 16px;
  margin: -14px -14px 8px -14px;
  padding: 0 8px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(0,0,0,0.12);
}
.idea-pad-workspace .card .head:active { cursor: grabbing; }
.idea-pad-workspace .card .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.2);
  cursor: pointer;
  background: #fff;
}
.idea-pad-workspace .card .del {
  width: 16px;
  height: 16px;
  border: none;
  background: transparent;
  color: rgba(0,0,0,0.35);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.idea-pad-workspace .card .del:hover { color: rgba(0,0,0,0.65); }
.idea-pad-workspace .card .text {
  font-family: var(--font-kalam), Kalam, cursive;
  font-size: 16px;
  line-height: 1.35;
  color: #2b2b28;
  outline: none;
  min-height: 60px;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.idea-pad-workspace .card .text:empty:before {
  content: attr(data-placeholder);
  color: rgba(0,0,0,0.32);
}
.idea-pad-workspace .card.faded { opacity: 0.14; filter: grayscale(55%); }
.idea-pad-workspace #toolbar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--toolbar-bg);
  border: 1px solid var(--toolbar-border);
  border-radius: 16px;
  padding: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 50;
}
.idea-pad-workspace .tbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.idea-pad-workspace .tbtn:hover { background: rgba(255,255,255,0.08); }
.idea-pad-workspace .tbtn.active { background: var(--accent); color: #12201c; }
.idea-pad-workspace .tbtn svg { width: 20px; height: 20px; }
.idea-pad-workspace #zoomLabel {
  font-size: 11px;
  color: var(--ink-dim);
  width: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.idea-pad-workspace .sep {
  width: 1px;
  height: 26px;
  background: var(--toolbar-border);
  margin: 0 2px;
}
.idea-pad-workspace #colorPop,
.idea-pad-workspace #focusPop {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  display: none;
  gap: 8px;
  background: var(--toolbar-bg);
  border: 1px solid var(--toolbar-border);
  border-radius: 14px;
  padding: 8px 10px;
  backdrop-filter: blur(10px);
  z-index: 51;
}
.idea-pad-workspace #focusPop { align-items: center; gap: 10px; padding: 6px 8px; }
.idea-pad-workspace #colorPop.show,
.idea-pad-workspace #focusPop.show { display: flex; }
.idea-pad-workspace .swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
}
.idea-pad-workspace .swatch.selected { border-color: #fff; }
.idea-pad-workspace #focusPop button {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idea-pad-workspace #focusPop button:hover { background: rgba(255,255,255,0.16); }
.idea-pad-workspace #focusRadiusLabel {
  font-size: 12px;
  color: var(--ink);
  min-width: 64px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.idea-pad-workspace #hint {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-dim);
  font-size: 12.5px;
  background: rgba(27,30,32,0.7);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--toolbar-border);
  pointer-events: none;
  transition: opacity .5s ease;
  z-index: 40;
  max-width: min(420px, calc(100% - 280px));
  text-align: center;
}
.idea-pad-workspace #minimap {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 150px;
  height: 150px;
  background: var(--toolbar-bg);
  border: 1px solid var(--toolbar-border);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 45;
}
.idea-pad-workspace #minimapSvg {
  width: 100%;
  height: 100%;
  display: block;
  background: rgba(0,0,0,0.18);
  cursor: pointer;
}
.idea-pad-workspace #minimapClose {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  width: 19px;
  height: 19px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: var(--ink);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.idea-pad-workspace #minimapLabel {
  position: absolute;
  left: 8px;
  top: 6px;
  z-index: 2;
  font-size: 9.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-dim);
  pointer-events: none;
}
.idea-pad-workspace #minimapReopen {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--toolbar-border);
  background: var(--toolbar-bg);
  color: var(--ink);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 45;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.idea-pad-workspace #minimapReopen.show { display: flex; }
@media (max-width: 760px) {
  .idea-pad-header {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .idea-pad-brand-copy {
    display: none;
  }

  .idea-pad-brand {
    padding: 4px;
  }

  .idea-pad-workspace #hint {
    top: 56px;
    max-width: calc(100% - 24px);
  }

  .idea-pad-workspace #toolbar {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
    width: auto;
    overflow-x: auto;
    justify-content: flex-start;
  }
  .idea-pad-workspace #minimap {
    display: none;
  }
}
