/* =================================================================
   Add a Design — internal upload form, matches the main viewer's
   ivory/charcoal/gold quiet-luxury look (see css/styles.css for the
   shared variables and login/header rules this file builds on).
   ================================================================= */

.ad-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 40px 80px;
}

.ad-form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ad-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 26px 28px;
}

.ad-section-title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  color: var(--charcoal);
}

.ad-hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--charcoal-soft);
}

.ad-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
}

.ad-row:last-child {
  margin-bottom: 0;
}

.ad-field {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ad-label {
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--charcoal-soft);
}

.ad-label em {
  font-style: normal;
  color: #9c9082;
}

.ad-field input,
.ad-field select {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--ivory);
  font-size: 14px;
  outline: none;
  color: var(--charcoal);
}

.ad-field input:focus,
.ad-field select:focus {
  border-color: var(--gold);
}

.ad-next-id {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: var(--ivory-deep);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  color: var(--gold-deep);
}

/* ---- Metal section blocks (Yellow / White / Rose), built in JS ---- */
.ad-metal-block {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

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

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

.ad-subrow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.ad-subrow:last-child {
  margin-bottom: 0;
}

.ad-sublabel {
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--charcoal-soft);
}

/* ---- Dropzones ---- */
.ad-dropzone {
  position: relative;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  background: var(--ivory);
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

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

.ad-dropzone-text {
  margin: 0;
  font-size: 13px;
  color: var(--charcoal-soft);
  pointer-events: none;
}

.ad-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.ad-file-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.ad-file-list:empty {
  margin: 0;
}

.ad-file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--charcoal);
}

.ad-file-chip button {
  border: none;
  background: none;
  color: #a63d3d;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.ad-error {
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #f6e6e6;
  color: #a63d3d;
  font-size: 13.5px;
}

.ad-success {
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #e9f2e6;
  color: #3d6b2a;
  font-size: 13.5px;
}

.ad-submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ad-submit-btn {
  padding: 14px 30px;
  border-radius: 999px;
  border: none;
  background: var(--charcoal);
  color: var(--ivory);
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.ad-submit-btn:hover {
  background: var(--gold-deep);
}

.ad-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ad-progress {
  font-size: 13px;
  color: var(--charcoal-soft);
}

@media (max-width: 640px) {
  .ad-main {
    padding: 24px 18px 60px;
  }
}
