#edit-panel > .sidebar__section,
#edit-panel .pin-form > .sidebar__section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.edit-panel__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.edit-panel__header h2 {
  margin: 0;
}

.edit-panel__back {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}

.edit-panel__back:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.pin-form textarea.pin-form__description {
  min-height: 3.5rem;
  resize: vertical;
  border-radius: var(--glass-radius-sm);
}

.pin-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pin-form__coords-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: -0.35rem;
}

.pin-form__coords {
  font-size: 0.78rem;
  color: var(--accent);
  padding: 0.45rem 0.85rem;
  border-radius: var(--glass-radius-pill);
  background: rgba(196, 163, 90, 0.08);
  border: 1px dashed var(--accent-dim);
}

.pin-form__coords.is-clickable {
  cursor: pointer;
}

.pin-form__coords.is-clickable:hover {
  background: rgba(196, 163, 90, 0.14);
  border-color: var(--accent);
}

.pin-form__position-code {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.45rem 0.85rem;
  border-radius: var(--glass-radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  min-height: 1.15rem;
}

.pin-form__position-code:empty::before {
  content: "—";
  color: rgba(255, 255, 255, 0.35);
}

.pin-form__media {
  border: none;
  margin: 0;
  padding: 0;
}

.pin-form__media legend {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.pin-media-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 0.45rem;
}

.pin-media-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pin-media-upload i {
  font-size: 0.85rem;
}

.pin-media-upload:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.pin-media-file.hidden {
  display: none;
}

.pin-media-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pin-media-row {
  display: grid;
  grid-template-columns: 1fr 2rem;
  gap: 0.4rem;
  align-items: center;
}

.pin-media-row__url {
  width: 100%;
}

.pin-media-row__action {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s var(--ease-smooth), color 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}

.pin-media-row__add {
  font-size: 1.25rem;
  font-weight: 300;
}

.pin-media-row__action:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.pin-form .glass-input.is-shake {
  animation: pin-form-field-shake 0.42s var(--ease-smooth);
  border-color: rgba(255, 120, 120, 0.65);
}

@keyframes pin-form-field-shake {
  0%,
  100% {
    transform: translateX(0);
  }

  18%,
  58% {
    transform: translateX(-5px);
  }

  38%,
  78% {
    transform: translateX(5px);
  }
}

.pin-form__section-faction {
  border: none;
  margin: 0;
  padding: 0;
}

.pin-form__section-faction legend {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.edit-faction-bar {
  --edit-faction-segment: calc((100% - 0.5rem) / 3);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0.25rem;
  border-radius: var(--glass-radius-pill);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.edit-faction-bar__thumb {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  width: var(--edit-faction-segment);
  border-radius: var(--glass-radius-pill);
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  pointer-events: none;
  transition:
    transform 0.4s var(--ease-smooth),
    background 0.35s var(--ease-smooth),
    border-color 0.35s var(--ease-smooth);
}

.edit-faction-bar[data-current-faction="axis"] .edit-faction-bar__thumb {
  transform: translateX(0);
  background: rgba(120, 58, 58, 0.42);
  border-color: rgba(155, 85, 85, 0.32);
}

.edit-faction-bar[data-current-faction="neutral"] .edit-faction-bar__thumb {
  transform: translateX(100%);
  background: rgba(70, 70, 70, 0.58);
  border-color: rgba(255, 255, 255, 0.12);
}

.edit-faction-bar[data-current-faction="allies"] .edit-faction-bar__thumb {
  transform: translateX(200%);
  background: rgba(62, 82, 108, 0.42);
  border-color: rgba(95, 115, 145, 0.32);
}

.edit-faction-bar__btn {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 3.25rem;
  padding: 0.4rem 0.35rem;
  border: none;
  border-radius: var(--glass-radius-pill);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.25s var(--ease-smooth);
}

.edit-faction-bar__btn:hover {
  color: rgba(255, 255, 255, 0.85);
}

.edit-faction-bar__btn.is-active {
  color: rgba(255, 255, 255, 0.95);
}

.edit-faction-bar__icon {
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
  pointer-events: none;
  transition:
    opacity 0.35s var(--ease-smooth),
    filter 0.35s var(--ease-smooth);
}

.edit-faction-bar__btn[data-faction="axis"] .edit-faction-bar__icon {
  opacity: 0.72;
  filter: brightness(0) saturate(85%) invert(26%) sepia(50%) saturate(650%) hue-rotate(330deg) brightness(0.96);
}

.edit-faction-bar__btn[data-faction="neutral"] .edit-faction-bar__icon {
  opacity: 0.58;
  filter: brightness(0) invert(0.82);
}

.edit-faction-bar__btn[data-faction="allies"] .edit-faction-bar__icon {
  opacity: 0.72;
  filter: brightness(0) saturate(85%) invert(40%) sepia(32%) saturate(520%) hue-rotate(182deg) brightness(0.97);
}

.edit-faction-bar__btn.is-active[data-faction="axis"] .edit-faction-bar__icon {
  opacity: 0.95;
  filter: brightness(0) saturate(95%) invert(22%) sepia(75%) saturate(950%) hue-rotate(330deg) brightness(1.02);
}

.edit-faction-bar__btn.is-active[data-faction="neutral"] .edit-faction-bar__icon {
  opacity: 0.88;
  filter: brightness(0) invert(0.95);
}

.edit-faction-bar__btn.is-active[data-faction="allies"] .edit-faction-bar__icon {
  opacity: 0.95;
  filter: brightness(0) saturate(95%) invert(38%) sepia(42%) saturate(720%) hue-rotate(182deg) brightness(1.02);
}

.pin-form__requires {
  border: none;
  margin: 0;
  padding: 0;
}

.pin-form__requires legend {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.pin-form__requires-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.pin-form label.requires-checkbox {
  font-size: 0.55rem;
}

.requires-checkbox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 3.4rem;
  padding: 0.4rem 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--glass-radius-pill);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.15;
  cursor: pointer;
  user-select: none;
  text-align: center;
  transition: border-color 0.25s var(--ease-smooth), color 0.25s var(--ease-smooth), background 0.25s var(--ease-smooth);
}

.requires-checkbox i {
  font-size: 1rem;
  line-height: 1;
  pointer-events: none;
}

.requires-checkbox span {
  font-size: 0.55rem;
  line-height: 1.1;
  pointer-events: none;
}

.requires-checkbox:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.85);
}

.requires-checkbox.is-checked {
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.1);
}
