/* app.css — GlowScript skin assessment pages */

/* ─── Assess Shell ─── */
.assess-main {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 24px 80px;
  background: var(--bg);
}

.assess-container {
  width: 100%;
  max-width: 620px;
}

/* ─── Header ─── */
.assess-header {
  text-align: center;
  margin-bottom: 40px;
}

.assess-overline {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 12px;
}

.assess-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.assess-sub {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ─── Progress Bar ─── */
.progress-bar {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 40px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}

/* ─── Form Steps ─── */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeUp 0.3s ease forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 500;
  margin-bottom: 16px;
}

.step-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ─── Photo Guide ─── */
.photo-guide {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.photo-guide-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.photo-tips ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.photo-tips ul li {
  font-size: 14px;
  color: var(--fg);
  padding-left: 16px;
  position: relative;
}

.photo-tips ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 12px;
}

.photo-tips p {
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 8px;
}

.photo-reminder {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 28px;
  background: #F0EAE2;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}

/* ─── Radio & Checkbox Cards ─── */
.radio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 28px;
}

.radio-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.radio-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.radio-card input,
.checkbox-card input {
  display: none;
}

.radio-card-inner,
.checkbox-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.radio-card input:checked + .radio-card-inner,
.checkbox-card:has(input:checked) {
  border-color: var(--accent);
  background: #F5F9F7;
}

.radio-icon {
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 4px;
}

.radio-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}

.radio-desc {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.4;
}

.checkbox-card {
  flex-direction: row;
  align-items: center;
  padding: 14px 18px;
  gap: 12px;
}

.checkbox-card span {
  font-size: 15px;
  color: var(--fg);
}

.checkbox-card::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.checkbox-card:has(input:checked)::before {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6l3 3 5-5' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 28px;
}

/* ─── Field Group ─── */
.field-group {
  margin-bottom: 24px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 8px;
}

.field-group textarea,
.field-group input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--fg);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}

.field-group textarea:focus,
.field-group input[type="text"]:focus {
  border-color: var(--accent);
}

.field-group input[type="text"]::placeholder,
.field-group textarea::placeholder {
  color: #B0A89E;
}

/* ─── Navigation ─── */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  min-width: 160px;
}

.btn-primary:hover {
  background: var(--accent-light);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background: transparent;
  color: var(--fg-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.btn-ghost:hover {
  color: var(--fg);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn-outline:hover {
  background: #F5F9F7;
}

.btn-ghost-outline {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--fg-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s;
}

.btn-ghost-outline:hover {
  color: var(--fg);
}

/* ─── Submit Section ─── */
.submit-section {
  text-align: center;
  padding: 32px 0 16px;
}

.submit-note {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 12px;
  letter-spacing: 0.03em;
}

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ─── Loading State ─── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 0;
  text-align: center;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 24px;
}

.loading-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}

.loading-sub {
  font-size: 14px;
  color: var(--fg-muted);
}

/* ─── Error State ─── */
.error-state {
  flex-direction: column;
  align-items: center;
  padding: 80px 0;
  text-align: center;
  display: flex;
}

.error-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}

.error-sub {
  font-size: 15px;
  color: var(--fg-muted);
}

.error-sub a {
  color: var(--accent);
}

/* ─── Results ─── */
.results-content {
  animation: fadeUp 0.4s ease forwards;
}

.routine-section {
  margin-bottom: 48px;
}

.routine-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.routine-header--am {
  background: #FEF9E7;
  border: 1px solid #F0D98C;
}

.routine-header--pm {
  background: #F5F5F9;
  border: 1px solid #D8D8E8;
}

.routine-icon {
  font-size: 28px;
  line-height: 1;
}

.routine-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.routine-sub {
  font-size: 13px;
  color: var(--fg-muted);
}

.routine-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.routine-step {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  margin-top: 2px;
}

.step-product-type {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 4px;
}

.step-product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.step-instructions {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}

.step-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.ingredient-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg-alt);
  color: var(--accent);
  border-radius: 20px;
  font-weight: 500;
}

.step-why {
  font-size: 13px;
  color: var(--fg-muted);
  font-style: italic;
  line-height: 1.5;
  border-left: 2px solid var(--gold);
  padding-left: 12px;
}

.warnings-inner,
.notes-inner {
  padding: 24px 28px;
  border-radius: 12px;
  margin-bottom: 24px;
}

.warnings-inner {
  background: #FEF3E7;
  border: 1px solid #F0C890;
}

.notes-inner {
  background: #F5F9F7;
  border: 1px solid #C8D8CE;
}

.warnings-title,
.notes-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.warnings-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warnings-list li {
  font-size: 14px;
  color: var(--fg);
  padding-left: 16px;
  position: relative;
}

.warnings-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #C9A84C;
}

.notes-text {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
}

.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 48px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .assess-main {
    padding: 32px 16px 64px;
  }

  .radio-grid--2,
  .radio-grid--3 {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .photo-guide {
    flex-direction: column;
    gap: 16px;
  }

  .results-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    text-align: center;
  }
}