/* =========================================================
   ai-stylist.css — AI Fashion Stylist page
   GHOSTFRAME Design System
   ========================================================= */

:root {
  --gf-font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --gf-lime: #E2E2E2;
  --gf-black: #000;
  --gf-white: #fff;
  --gf-bg: #0a0a0f;
  --gf-surface: rgba(255,255,255,0.04);
  --gf-border: rgba(255,255,255,0.10);
  --gf-muted: rgba(255,255,255,0.45);
}

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

html, body {
  background: var(--gf-bg);
  color: var(--gf-white);
  font-family: var(--gf-font);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* ── Top bar ── */
.gf-top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gf-border);
}
.gf-top-bar__back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gf-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  transition: color 0.2s;
  min-height: 44px;
}
.gf-top-bar__back:hover { color: var(--gf-white); }
.gf-top-bar__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.gf-top-bar__right { width: 80px; }

/* ── Page layout ── */
.stylist-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.stylist-intro {
  margin-bottom: 28px;
  text-align: center;
}
.stylist-intro h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.stylist-intro p {
  font-size: 13px;
  color: var(--gf-muted);
  line-height: 1.6;
}

/* ── Form sections ── */
.stylist-section {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  padding: 20px;
  margin-bottom: 16px;
}

.stylist-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gf-muted);
  margin-bottom: 14px;
}

/* ── Photo upload ── */
.photo-drop {
  border: 1px dashed rgba(255,255,255,0.2);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.photo-drop:hover, .photo-drop.dragover {
  border-color: var(--gf-lime);
  background: rgba(212,255,0,0.04);
}
.photo-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.photo-drop__icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.4;
}
.photo-drop__label {
  font-size: 12px;
  color: var(--gf-muted);
  line-height: 1.5;
}
.photo-drop__label strong { color: var(--gf-white); }

.photo-preview {
  position: relative;
  display: none;
  margin-top: 12px;
}
.photo-preview img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
}
.photo-preview__remove {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.8);
  border: 1px solid var(--gf-border);
  color: var(--gf-white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 10px;
  font-family: inherit;
}

/* ── Face data chips (auto-filled) ── */
.face-data-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.face-chip {
  background: rgba(212,255,0,0.08);
  border: 1px solid rgba(212,255,0,0.25);
  color: var(--gf-lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 4px 10px;
}
.face-data-empty {
  font-size: 12px;
  color: var(--gf-muted);
  line-height: 1.5;
}
.face-data-empty a {
  color: var(--gf-lime);
  text-decoration: none;
}
.face-data-empty a:hover { text-decoration: underline; }

/* ── Form selects / inputs ── */
.stylist-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.stylist-row:last-child { margin-bottom: 0; }
.stylist-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gf-muted);
}
.stylist-select {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--gf-border);
  color: var(--gf-white);
  font-family: var(--gf-font);
  font-size: 13px;
  padding: 10px 12px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.stylist-select:focus { border-color: rgba(255,255,255,0.35); }
.stylist-select option { background: #111; }

/* ── Style pills ── */
.style-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.style-pill {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--gf-border);
  color: var(--gf-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.style-pill:hover { color: var(--gf-white); border-color: rgba(255,255,255,0.3); }
.style-pill.active {
  background: rgba(212,255,0,0.10);
  border-color: rgba(212,255,0,0.45);
  color: var(--gf-lime);
}

/* ── Submit button ── */
.stylist-submit {
  width: 100%;
  margin-top: 20px;
  padding: 14px 24px;
  background: var(--gf-lime);
  color: var(--gf-black);
  border: none;
  cursor: pointer;
  font-family: var(--gf-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 0.2s;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.stylist-submit:hover  { opacity: 0.88; }
.stylist-submit:active { opacity: 0.75; }
.stylist-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.stylist-submit .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}
.stylist-submit.loading .spinner { display: block; }
.stylist-submit.loading .btn-text { display: none; }

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

/* ── Results ── */
.stylist-results {
  margin-top: 28px;
  display: none;
}
.stylist-results.visible { display: block; }

.results-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gf-border);
}
.results-header h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.results-profile {
  font-size: 13px;
  color: var(--gf-muted);
  line-height: 1.6;
}

.results-color-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gf-muted);
  margin-top: 6px;
}
.color-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gf-lime);
}

.rec-card {
  background: var(--gf-surface);
  border: 1px solid var(--gf-border);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.rec-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.rec-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gf-muted);
}
.rec-frame-style {
  font-size: 13px;
  font-weight: 700;
  color: var(--gf-lime);
}
.rec-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.rec-meta-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid var(--gf-border);
  color: var(--gf-muted);
}
.rec-color-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
  border: 1px solid rgba(255,255,255,0.15);
}
.rec-reason {
  font-size: 12px;
  color: var(--gf-muted);
  line-height: 1.6;
  margin-bottom: 8px;
}
.rec-celebrity {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  font-style: italic;
}
.rec-catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 14px;
  background: rgba(212,255,0,0.08);
  border: 1px solid rgba(212,255,0,0.25);
  color: var(--gf-lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s;
  font-family: inherit;
  cursor: pointer;
}
.rec-catalog-btn:hover { background: rgba(212,255,0,0.15); }

.results-avoid {
  background: rgba(255,60,60,0.05);
  border: 1px solid rgba(255,60,60,0.15);
  padding: 14px 16px;
  margin-top: 12px;
}
.results-avoid-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,100,100,0.7);
  margin-bottom: 8px;
}
.results-avoid-list {
  font-size: 12px;
  color: var(--gf-muted);
  line-height: 1.6;
}

.results-tip {
  background: rgba(212,255,0,0.05);
  border: 1px solid rgba(212,255,0,0.15);
  padding: 12px 16px;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(212,255,0,0.8);
  line-height: 1.6;
}
.results-tip-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gf-lime);
  display: block;
  margin-bottom: 4px;
}

.results-error {
  background: rgba(255,60,60,0.06);
  border: 1px solid rgba(255,60,60,0.2);
  padding: 16px;
  color: rgba(255,100,100,0.9);
  font-size: 13px;
  line-height: 1.6;
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .stylist-page { padding: 20px 14px 80px; }
  .stylist-intro h1 { font-size: 18px; }
  .stylist-intro p { font-size: 12px; }
  .stylist-section { padding: 16px 14px; }
  .photo-drop { padding: 24px 14px; }
  .photo-preview img { max-height: 180px; }
  /* Bigger touch targets for pills */
  .style-pill { padding: 8px 14px; min-height: 38px; }
  .stylist-select { padding: 12px; font-size: 16px; /* prevents iOS zoom */ }
  .rec-card { padding: 14px; }
}

@media (max-width: 360px) {
  .stylist-section { padding: 12px; }
  .face-data-row { gap: 6px; }
  .face-chip { font-size: 9px; }
}
