/* WellEditPopup (SDK control refresh 3b).
 * Surface = .mint-popover; fields = FormField row + BaseInput / SegmentedControl /
 * NumberInput; buttons = BaseButton. This file owns placement and layout only. */

.mint-well-edit-popup__backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.mint-well-edit-popup {
  position: fixed;
  z-index: 50;
  width: 300px;
  padding: 0;
  overflow: hidden;
  transition: opacity var(--mint-transition);
}

.mint-well-edit-popup--inline {
  position: static;
  width: auto;
  overflow: visible;
}

/* Inline, the host panel owns the padding and the surface. */
.mint-well-edit-popup--inline .mint-well-edit-popup__header {
  padding: 0 0 0 2px;
  border-bottom: 0;
}

/* 7a rail: round 18px swatch, group name at 12px. */
.mint-well-edit-popup--inline .mint-well-edit-popup__marker {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  font-weight: 700;
}

.mint-well-edit-popup--inline .mint-well-edit-popup__title {
  font-size: 0.75rem;
}

.mint-well-edit-popup--inline .mint-form-field__label {
  font-size: 0.75rem;
  font-weight: 400;
}

.mint-well-edit-popup--inline .mint-well-edit-popup__body {
  padding: 10px 0 12px;
}

.mint-well-edit-popup--inline .mint-well-edit-popup__footer {
  padding: 10px 0 0;
  background: transparent;
}

.mint-well-edit-popup:focus {
  outline: none;
}

.mint-well-edit-popup__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-bottom: 1px solid var(--border-light);
}

/* 3a marker: shape per type, group color. */
.mint-well-edit-popup__marker {
  display: flex;
  box-sizing: border-box;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
}

.mint-well-edit-popup__well-id {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
}

.mint-well-edit-popup__title {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.mint-well-edit-popup__close {
  margin-left: auto;
}

.mint-well-edit-popup__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

/* FormField row: a fixed label column, the control takes the rest. */
.mint-well-edit-popup .mint-form-field--row .mint-form-field__label-row {
  flex: 0 0 64px;
}

.mint-well-edit-popup .mint-form-field--row .mint-form-field__control {
  flex: 1 1 0;
}

/* The hint sits under the control, past the label column (FormField pins margin). */
.mint-well-edit-popup .mint-form-field--row .mint-form-field__hint {
  box-sizing: border-box;
  padding-left: calc(64px + 0.75rem);
  font-size: 0.75rem;
}

.mint-well-edit-popup__disclosure {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  padding: 2px 4px 2px 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.mint-well-edit-popup__disclosure:hover {
  color: var(--text-primary);
}

.mint-well-edit-popup__disclosure:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-offset);
}

.mint-well-edit-popup__chevron {
  transition: transform var(--mint-transition);
}

.mint-well-edit-popup__disclosure[aria-expanded='true'] .mint-well-edit-popup__chevron {
  transform: rotate(90deg);
}

.mint-well-edit-popup__advanced {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mint-well-edit-popup__mono {
  font-family: var(--font-mono);
}

.mint-well-edit-popup__footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-primary);
}

@media (prefers-reduced-motion: reduce) {
  .mint-well-edit-popup,
  .mint-well-edit-popup__chevron {
    transition: none;
  }
}
