/* ============================================================
   HI Lynn — Component styles
   Class-based styling for the React primitives. Imported by
   styles.css so consumers and cards pick it up automatically.
   ============================================================ */

/* ---------- Button ---------- */
.hl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
  white-space: nowrap;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--text-on-accent);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.hl-btn:hover { box-shadow: var(--shadow-md); }
.hl-btn:active { transform: scale(0.98); }
.hl-btn:focus-visible { box-shadow: var(--focus-ring); }

.hl-btn--primary { background: var(--accent); color: #fff; }
.hl-btn--primary:hover { background: var(--accent-strong); }

.hl-btn--gold { background: var(--accent-gold); color: #fff; }
.hl-btn--gold:hover { background: var(--gold-500); }

.hl-btn--secondary {
  background: transparent; color: var(--peach-700); border-color: var(--peach-300);
}
.hl-btn--secondary:hover { background: var(--peach-50); border-color: var(--peach-400); box-shadow: none; }

.hl-btn--ghost { background: transparent; color: var(--text-body); border-color: transparent; }
.hl-btn--ghost:hover { background: var(--sand-200); box-shadow: none; }

.hl-btn--tide { background: var(--tide-500); color: #fff; }
.hl-btn--tide:hover { background: var(--tide-600); }

.hl-btn--sm { font-size: var(--text-sm); padding: 0.65em 1.25em; }
.hl-btn--lg { font-size: var(--text-lg); padding: 1em 2em; }
.hl-btn--block { display: flex; width: 100%; }

.hl-btn:disabled, .hl-btn[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; box-shadow: none; transform: none;
}

/* ---------- Icon button ---------- */
.hl-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem;
  border-radius: var(--radius-circle);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-500);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.hl-iconbtn:hover { background: var(--peach-50); color: var(--accent-strong); border-color: var(--peach-200); }
.hl-iconbtn:active { transform: scale(0.95); }
.hl-iconbtn:focus-visible { box-shadow: var(--focus-ring); }
.hl-iconbtn--ghost { border-color: transparent; background: transparent; }
.hl-iconbtn--sm { width: 2.1rem; height: 2.1rem; }

/* ---------- Field (Input / Textarea) ---------- */
.hl-field { display: flex; flex-direction: column; gap: var(--space-2); }
.hl-label {
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide); color: var(--text-heading);
}
.hl-input, .hl-textarea {
  font-family: var(--font-body); font-size: var(--text-md); color: var(--text-body);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8em 1em;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  width: 100%;
}
.hl-textarea { resize: vertical; min-height: 6rem; line-height: var(--leading-normal); }
.hl-input::placeholder, .hl-textarea::placeholder { color: var(--text-faint); }
.hl-input:hover, .hl-textarea:hover { border-color: var(--border-strong); }
.hl-input:focus, .hl-textarea:focus {
  outline: none; border-color: var(--peach-300); box-shadow: var(--focus-ring);
}
.hl-input--invalid, .hl-textarea--invalid { border-color: var(--danger); }
.hl-hint { font-size: var(--text-sm); color: var(--text-muted); }
.hl-hint--error { color: var(--danger); }

/* ---------- Badge ---------- */
.hl-badge {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-body); font-size: var(--text-xs); font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wider); text-transform: uppercase;
  padding: 0.35em 0.85em; border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--peach-100); color: var(--peach-800);
}
.hl-badge--gold { background: var(--gold-100); color: var(--gold-800); }
.hl-badge--tide { background: var(--tide-100); color: var(--tide-800); }
.hl-badge--neutral { background: var(--sand-200); color: var(--ink-600); }
.hl-badge--success { background: var(--success-bg); color: var(--success); }
.hl-badge--solid { background: var(--accent); color: #fff; }

/* ---------- Tag (with optional dismiss) ---------- */
.hl-tag {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-body); font-size: var(--text-sm);
  padding: 0.4em 0.9em; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border); color: var(--text-body);
}
.hl-tag__x {
  display: inline-flex; cursor: pointer; border: none; background: none;
  color: var(--text-muted); font-size: 1.1em; line-height: 1; padding: 0;
  transition: color var(--dur-fast) var(--ease-out);
}
.hl-tag__x:hover { color: var(--accent-strong); }

/* ---------- Card ---------- */
.hl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.hl-card--interactive { cursor: pointer; }
.hl-card--interactive:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.hl-card--flat { box-shadow: none; }
.hl-card--sunken { background: var(--surface-sunken); border-color: var(--peach-100); }
.hl-card__media { position: relative; overflow: hidden; }
.hl-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hl-card__body { padding: var(--space-5); }
.hl-card__title {
  font-family: var(--font-serif); font-weight: var(--fw-regular);
  font-size: var(--text-2xl); color: var(--text-heading); margin: 0 0 var(--space-2);
}
.hl-card__text { color: var(--text-body); margin: 0; }

/* ---------- Avatar ---------- */
.hl-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: var(--radius-circle);
  background: var(--peach-100); color: var(--peach-800);
  font-family: var(--font-serif); font-size: var(--text-lg);
  overflow: hidden; border: 2px solid var(--surface); box-shadow: var(--shadow-xs);
  flex: none;
}
.hl-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hl-avatar--sm { width: 2rem; height: 2rem; font-size: var(--text-sm); }
.hl-avatar--lg { width: 4.5rem; height: 4.5rem; font-size: var(--text-2xl); }

/* ---------- Divider ---------- */
.hl-divider { border: none; border-top: 1px solid var(--border-soft); margin: var(--space-6) 0; }
.hl-divider--center {
  display: flex; align-items: center; gap: var(--space-4);
  border: none; color: var(--accent); margin: var(--space-6) 0;
}
.hl-divider--center::before, .hl-divider--center::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.hl-divider__mark { color: var(--accent); font-size: var(--text-lg); }

/* ---------- Switch ---------- */
.hl-switch {
  position: relative; display: inline-flex; align-items: center;
  width: 3rem; height: 1.65rem; border-radius: var(--radius-pill);
  background: var(--sand-300); border: none; cursor: pointer; padding: 0;
  transition: background var(--dur-base) var(--ease-out);
}
.hl-switch[aria-checked="true"] { background: var(--accent); }
.hl-switch__thumb {
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 1.25rem; height: 1.25rem; border-radius: var(--radius-circle);
  background: #fff; box-shadow: var(--shadow-sm);
  transition: left var(--dur-base) var(--ease-out);
}
.hl-switch[aria-checked="true"] .hl-switch__thumb { left: calc(100% - 1.25rem - 3px); }
.hl-switch:focus-visible { box-shadow: var(--focus-ring); }

/* ---------- Quote ---------- */
.hl-quote {
  position: relative; padding: var(--space-4) 0 var(--space-4) var(--space-6);
  border-left: 2px solid var(--peach-200);
}
.hl-quote__text {
  font-family: var(--font-serif); font-weight: var(--fw-light); font-style: italic;
  font-size: var(--text-3xl); line-height: var(--leading-snug); color: var(--text-heading); margin: 0;
}
.hl-quote__cite {
  display: block; margin-top: var(--space-3);
  font-family: var(--font-script); font-size: var(--text-2xl); color: var(--accent); font-style: normal;
}
