@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── Panel container ──────────────────────────────────────────────────────── */

#new-pin-panel {
  position: fixed;
  right: calc(25% - 240px);
  top: 50%;
  transform: translateY(-50%);
  width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.10),
    0 1px 4px  rgba(0, 0, 0, 0.06);
  border-left: 3px solid #b8ddd0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
  z-index: 10;
}

#new-pin-panel.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0 24px;
}

.panel-header-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
}

.panel-header-actions {
  display: flex;
  gap: 4px;
}

/* Close and delete share the same pill button style */
.panel-close,
.panel-delete {
  background: #f5f5f5;
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  color: #888;
  padding: 0;
  transition: background 150ms ease, color 150ms ease;
}

.panel-close:hover {
  background: #e8e8e8;
  color: #333;
}

/* Delete — red tint, only shown for existing pins */
.panel-delete {
  color: #e05252;
  background: #fdf0f0;
  display: none;
  position: relative;
  width: auto;
  padding: 0 8px;
  gap: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
}

.panel-delete img {
  display: block;
  filter: invert(40%) sepia(60%) saturate(600%) hue-rotate(330deg);
  transition: filter 150ms ease;
  flex-shrink: 0;
}

.panel-delete-label {
  white-space: nowrap;
  font-size: 11px;
}

.panel-delete-cancel {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding-left: 6px;
  border-left: 1px solid #f5c0c0;
  color: #aaa;
  font-size: 11px;
}

.panel-delete:hover {
  background: #e05252;
  color: #fff;
}

.panel-delete:hover img {
  filter: brightness(0) invert(1);
}

.panel-delete--confirm {
  background: #e05252;
  color: #fff;
  width: auto;
}

.panel-delete--confirm img {
  filter: brightness(0) invert(1);
}

.panel--existing .panel-delete { display: flex; }
.panel--new      .panel-delete { display: none;  }

/* ── Body ─────────────────────────────────────────────────────────────────── */

.panel-body {
  padding: 20px 40px 36px;
  display: flex;
  flex-direction: column;
}

/* ── Title field ──────────────────────────────────────────────────────────── */

.panel-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: #1a1a1a;
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  padding: 0 0 10px;
  border-bottom: 1.5px solid transparent;
  transition: border-color 200ms ease;
  caret-color: #4a9d87;
}

.panel-title::placeholder {
  color: #d0d0d0;
  font-style: italic;
}

.panel-title:focus {
  border-bottom-color: #b8ddd0;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */

.panel-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 24px 0;
}

/* ── Description ──────────────────────────────────────────────────────────── */

.panel-description {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: #444;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  width: 100%;
  min-height: 80px;
  padding: 0;
  border-bottom: 1.5px solid transparent;
  transition: border-color 200ms ease;
  caret-color: #4a9d87;
}

.panel-description::placeholder { color: #d0d0d0; }
.panel-description:focus { border-bottom-color: #b8ddd0; }

/* ── Actions ──────────────────────────────────────────────────────────────── */

.panel-actions {
  margin-top: 24px;
}

.panel-save {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: #4a9d87;
  border: 1.5px solid #4a9d87;
  border-radius: 8px;
  padding: 12px 0;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.panel-save:hover {
  background: #ffffff;
  color: #4a9d87;
}

/* ── Pin type arrows ──────────────────────────────────────────────────────── */

.pin-type-arrow {
  position: fixed;
  left: 31.25%;
  transform: translateX(-50%);
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 20;
  display: none;
  opacity: 0.8;
  transition: opacity 150ms ease, transform 150ms ease;
}

.pin-type-arrow--up   { top: calc(50% - 150px); }
.pin-type-arrow--down { top: calc(50% - 4px);   }

.pin-type-arrow:hover {
  opacity: 1;
  transform: translateX(-50%) scale(1.15);
}

/* ── Active pin punch-through ─────────────────────────────────────────────── */

.pin-active .pin-content image {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

/* ── Pin interactive cursor ───────────────────────────────────────────────── */

.pin-interactive {
  cursor: pointer;
}