/* =================================================================
   Edit a Design — swap render/turntable files for an existing design.
   Builds on css/styles.css and css/add-design.css for shared tokens,
   the login screen, and the .ad-* form/dropzone primitives.
   ================================================================= */

.ed-lookup-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.ed-lookup-row input {
  flex: 1 1 auto;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--ivory);
  font-size: 14px;
  outline: none;
  color: var(--charcoal);
  text-transform: uppercase;
}

.ed-lookup-row input:focus {
  border-color: var(--gold);
}

.ed-lookup-row button {
  flex: 0 0 auto;
  padding: 11px 26px;
}

.ed-loaded-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ed-loaded-id {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  color: var(--charcoal);
}

.ed-loaded-category {
  margin: 4px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ---- Per-metal edit blocks ---- */
.ed-metal-block {
  margin-bottom: 26px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.ed-metal-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.ed-metal-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
}

.ed-angle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .ed-angle-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ed-slot {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  background: var(--ivory);
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.ed-slot:hover,
.ed-slot.ed-slot-active {
  border-color: var(--gold);
  background: var(--ivory-deep);
}

.ed-slot.ed-slot-filled {
  border-style: solid;
}

.ed-slot.ed-slot-pending {
  border-color: var(--gold-deep);
  border-style: solid;
  box-shadow: 0 0 0 2px rgba(169, 128, 63, 0.18);
}

.ed-slot-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--card);
  display: block;
}

.ed-slot-empty {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9c9082;
  font-size: 12px;
}

.ed-slot-label {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--charcoal-soft);
}

.ed-slot-pending .ed-slot-label {
  color: var(--gold-deep);
  font-weight: 600;
}

.ed-slot-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ed-turntable-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ed-turntable-status {
  font-size: 13px;
  color: var(--charcoal-soft);
  flex: 0 0 auto;
  min-width: 130px;
}

.ed-turntable-status.ed-status-yes {
  color: #3d6b2a;
}

.ed-turntable-dropzone {
  position: relative;
  flex: 1 1 auto;
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  background: var(--ivory);
  font-size: 12.5px;
  color: var(--charcoal-soft);
  cursor: pointer;
}

.ed-turntable-dropzone:hover {
  border-color: var(--gold);
  background: var(--ivory-deep);
}

.ed-turntable-dropzone.ed-slot-pending {
  border-color: var(--gold-deep);
  border-style: solid;
  color: var(--gold-deep);
  font-weight: 600;
}

.ed-turntable-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
