/* Pocket Austin — Track 3.3: Collapsible Parchment Isometric Mini-Map Radar */

#pa-minimap {
  position: fixed;
  right: 14px;
  bottom: 138px;
  z-index: 29;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  color: var(--ink, #2c221a);
  user-select: none;
}

#pa-minimap > * {
  pointer-events: auto;
}

/* Expanded Parchment Radar Card */
.pa-mm-card {
  background: var(--paper, rgba(251, 246, 234, 0.94));
  border: 1.5px solid var(--border, #4a3b2c);
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(20, 15, 10, 0.28);
  backdrop-filter: blur(8px);
  padding: 6px 7px 7px;
  width: 218px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

#pa-minimap.collapsed .pa-mm-card {
  display: none;
}

.pa-mm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
  padding: 0 1px;
}

.pa-mm-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.pa-mm-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink, #2c221a);
  white-space: nowrap;
}

.pa-mm-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-muted, #665848);
  background: rgba(74, 59, 44, 0.08);
  border: 1px solid rgba(74, 59, 44, 0.24);
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.2;
}

.pa-mm-count-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent, #c45735);
  display: inline-block;
}

.pa-mm-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pa-mm-icon-btn {
  appearance: none;
  border: 1px solid rgba(74, 59, 44, 0.42);
  background: rgba(255, 250, 240, 0.88);
  color: var(--ink, #2c221a);
  width: 21px;
  height: 20px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.pa-mm-icon-btn:hover {
  background: #efe5cf;
  border-color: var(--border, #4a3b2c);
}

.pa-mm-stage {
  position: relative;
  width: 200px;
  height: 132px;
  margin: 0 auto;
  border: 1.4px solid var(--ink, #2c221a);
  border-radius: 5px;
  overflow: hidden;
  background: #e6dcc6;
  box-shadow: inset 0 0 0 1px rgba(251, 246, 234, 0.45);
}

.pa-mm-canvas {
  display: block;
  width: 200px;
  height: 132px;
  cursor: crosshair;
  touch-action: none;
}

.pa-mm-canvas.dragging {
  cursor: grabbing;
}

.pa-mm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 5px;
  padding: 0 1px;
  font-size: 9.5px;
  color: var(--ink-muted, #665848);
}

.pa-mm-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pa-mm-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.pa-mm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  border: 0.8px solid rgba(44, 34, 26, 0.65);
}

.pa-mm-dot.transit {
  background: #e39a2b;
}

.pa-mm-dot.flight {
  background: #3898d4;
}

.pa-mm-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  height: 15px;
  line-height: 13px;
  color: var(--ink-muted, #665848);
  background: rgba(255, 252, 245, 0.9);
  border: 1px solid rgba(74, 59, 44, 0.34);
  border-bottom-width: 1.5px;
  border-radius: 3px;
}

/* Collapsed Compact Parchment Toggle Button */
.pa-mm-fab {
  display: none;
  appearance: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 38px;
  height: 38px;
  padding: 0 9px;
  background: var(--paper, rgba(251, 246, 234, 0.94));
  border: 1.5px solid var(--border, #4a3b2c);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(20, 15, 10, 0.28);
  backdrop-filter: blur(8px);
  color: var(--ink, #2c221a);
  cursor: pointer;
  transition: background 0.14s ease, transform 0.14s ease;
}

#pa-minimap.collapsed .pa-mm-fab {
  display: inline-flex;
}

.pa-mm-fab:hover {
  background: #efe5cf;
  transform: translateY(-1px);
}

.pa-mm-fab svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
}

.pa-mm-fab-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Mobile layout: sits cleanly above bottom-right zoom/compass controls */
@media (max-width: 760px) {
  #pa-minimap {
    right: 10px;
    bottom: 230px;
  }

  .pa-mm-fab {
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: 9px;
  }

  .pa-mm-fab-label {
    display: none;
  }
}

/* Short desktop viewports: stay tucked gracefully above carto controls */
@media (max-height: 540px) and (min-width: 761px) {
  #pa-minimap {
    bottom: 132px;
  }
}
