/* ═══════════════════════════════════════════════════════════
   form-brand.css  —  Shared styles for brand-centric forms
   ═══════════════════════════════════════════════════════════ */

:root {
  --font-primary: 'Bebas Neue', sans-serif;
  --font-body:    'Lato', sans-serif;
  --font-accent:  'Cormorant Garamond', serif;
  --bg:       #0f0f10;
  --surface:  #18181b;
  --surface2: #202024;
  --border:   #2a2a2e;
  --text:     #f0ede8;
  --muted:    #9a9896;
  --accent:   #c8964a;
  --accent2:  #8dbbd1;
  --success:  #5fa87a;
  --error:    #c07070;
  --radius:   12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-family: var(--font-primary);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-decoration: none;
}

.back-btn {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0;
}

.back-btn:hover { color: var(--text); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.nav-link {
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  transition: color 0.2s;
  text-decoration: none;
  padding: 0;
}

.nav-link:hover { color: var(--text); }

/* ── BRAND HERO ── */
.brand-hero {
  padding: 32px 20px 20px;
  text-align: center;
  flex-shrink: 0;
}

.brand-hero-eyebrow {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.brand-hero-name {
  font-family: var(--font-primary);
  font-size: clamp(30px, 7vw, 48px);
  letter-spacing: 0.06em;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--text);
}

.brand-hero-maker {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 15px;
  color: var(--muted);
}

/* ── STEP INDICATOR ── */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px 8px;
  flex-shrink: 0;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s, transform 0.3s;
}

.step-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.step-dot.done {
  background: var(--success);
}

.step-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-left: 4px;
}

/* ── FORM CONTAINER ── */
.form-wrap {
  flex: 1;
  padding: 16px 20px calc(32px + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

/* ── STEP PANELS ── */
.step-panel { display: none; }
.step-panel.active { display: block; animation: stepIn 0.3s ease both; }

@keyframes stepIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── FIELD GROUPS ── */
.field-group { margin-bottom: 20px; }

.field-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field-label .required { color: var(--accent); margin-left: 2px; }

/* ── SELECT CHIPS (for category & material) ── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 10px 16px;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.chip:active { transform: scale(0.96); }

.chip.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 150, 74, 0.08);
}

/* ── TEXT INPUTS ── */
.field-input,
.field-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.field-input:focus,
.field-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,150,74,0.12);
}

.field-input::placeholder,
.field-textarea::placeholder { color: #444; }

.field-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── PHOTO UPLOAD ZONE ── */
.photo-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.photo-zone:hover,
.photo-zone:focus-within {
  border-color: var(--accent);
  background: rgba(200,150,74,0.03);
}

.photo-zone-icon {
  font-size: 28px;
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1;
}

.photo-zone-text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}

.photo-zone-hint {
  font-size: 11px;
  color: #888;
  letter-spacing: 0.04em;
}

.photo-zone input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* ── THUMB STRIP ── */
.thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.thumb-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.thumb-wrap.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
}

.thumb-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-rm {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.thumb-rm:hover { background: rgba(192,112,112,0.85); }

.thumb-add-tile {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  border: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.thumb-add-tile:hover { border-color: var(--accent); background: rgba(200,150,74,0.05); }
.plus-icon { font-size: 18px; color: var(--muted); line-height: 1; }
.add-label  { font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }

.photo-count {
  width: 100%;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* ── PRIVACY TOGGLE ── */
.privacy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.privacy-info { flex: 1; }

.privacy-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 2px;
}

.privacy-desc { font-size: 12px; color: var(--muted); }

/* Toggle switch */
.toggle-wrap { position: relative; width: 44px; height: 24px; flex-shrink: 0; }

.toggle-wrap input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}

.toggle-track {
  display: block;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--border);
  transition: background 0.2s;
  position: relative;
}

.toggle-wrap input:checked ~ .toggle-track { background: var(--accent); }

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  pointer-events: none;
}

.toggle-wrap input:checked ~ .toggle-track .toggle-thumb { transform: translateX(20px); }

/* ── BUTTONS ── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #111;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  margin-top: 8px;
}

.btn-primary:hover  { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  background: none;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  margin-top: 8px;
  text-decoration: none;
  text-align: center;
}

.btn-secondary:hover { border-color: var(--muted); color: var(--text); }

.btn-skip {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  width: 100%;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn-skip:hover { color: var(--text); }

/* ── DRAFT RESTORE BANNER ── */
.draft-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(200,150,74,0.08);
  border: 1px solid rgba(200,150,74,0.25);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--accent);
}

.draft-banner-text { flex: 1; }
.draft-banner-discard { font-size: 12px; color: var(--muted); cursor: pointer; text-decoration: underline; background: none; border: none; font-family: var(--font-body); padding: 0; }
.draft-banner-discard:hover { color: var(--text); }

/* ── SUCCESS STATE ── */
.success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  gap: 16px;
  flex: 1;
  animation: fadeIn 0.4s ease both;
}

.success-state.visible { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(95,168,122,0.12);
  border: 2px solid rgba(95,168,122,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--success);
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes popIn {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.success-title {
  font-family: var(--font-primary);
  font-size: 32px;
  letter-spacing: 0.06em;
  color: var(--text);
}

.success-sub {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 16px;
  color: var(--muted);
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 300px;
  margin-top: 8px;
}

/* ── DIVIDER ── */
.step-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 20px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step-divider::before,
.step-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── SECTION HEADING ── */
.section-heading {
  font-family: var(--font-primary);
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 4px;
}

.section-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  font-family: var(--font-accent);
  font-style: italic;
}

/* ── MOBILE SPECIFICS ── */
@media (max-width: 480px) {
  .topbar { padding: 10px 16px; }
  .brand-hero { padding: 24px 16px 16px; }
  .form-wrap { padding: 12px 16px calc(28px + env(safe-area-inset-bottom)); }
  .btn-primary { padding: 18px; font-size: 16px; }
}

/* ── ADD NEW CHIP ── */
.chip-add {
  padding: 10px 16px;
  border-radius: 40px;
  border: 1px solid rgba(200, 150, 74, 0.45);
  background: rgba(200, 150, 74, 0.07);
  color: #d4a55c;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-add:hover,
.chip-add:active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200, 150, 74, 0.14);
}

.chip-add:active { transform: scale(0.96); }

/* ── DATE FIELD WITH CALENDAR TRIGGER ── */
.date-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.date-field-wrap .field-input {
  padding-right: 44px; /* room for the icon button */
}

.date-picker-btn {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: calc(100% - 4px);
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 0 9px 9px 0;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  color: var(--muted);
}

.date-picker-btn:hover {
  background: rgba(200,150,74,0.08);
  color: var(--accent);
}

/* ── ADD SIMILAR BUTTON (on item.html) ── */
.add-similar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: rgba(141,187,209,0.08);
  border: 1px solid rgba(141,187,209,0.3);
  border-radius: 20px;
  color: var(--accent2, #8dbbd1);
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.add-similar-btn:hover {
  background: rgba(141,187,209,0.14);
  border-color: rgba(141,187,209,0.55);
}

/* ── DATE FIELD WRAPPER ── */
.date-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.date-wrap .field-input {
  flex: 1;
  padding-right: 44px; /* room for icon button */
}

.date-cal-btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  border-radius: 0 10px 10px 0;
  transition: color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.date-cal-btn:hover { color: var(--accent); background: rgba(200,150,74,0.06); }
.date-cal-btn:active { transform: scale(0.9); }

.date-today-btn {
  margin-top: 6px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  letter-spacing: 0.06em;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.8;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.date-today-btn:hover { opacity: 1; }

/* ── ADD SIMILAR BUTTON ── */
.add-similar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(141,187,209,0.35);
  background: rgba(141,187,209,0.06);
  color: var(--accent2);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.add-similar-btn:hover {
  border-color: var(--accent2);
  background: rgba(141,187,209,0.12);
  color: #a8d4e8;
}

.add-similar-btn:active { transform: scale(0.97); }

/* Privacy row with Add Similar side by side */
.privacy-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.privacy-actions .privacy-row-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
