/* ============================================================
   ESMÉE — Component styles
   Class-based styling for the React primitives in /components.
   All values reference the design tokens. Shipped to consumers
   via styles.css so components render with full interaction
   states (hover / active / focus-visible).
   Prefix: .es-
   ============================================================ */

/* ─────────────────────────────────────────────────────────
   BUTTON
   ───────────────────────────────────────────────────────── */
.es-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard),
    border-color var(--dur-base) var(--ease-standard),
    box-shadow var(--dur-base) var(--ease-standard);
}
.es-btn:hover { text-decoration: none; }
.es-btn--sm { height: 38px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.es-btn--md { height: 46px; padding: 0 22px; font-size: var(--text-base); }
.es-btn--lg { height: 54px; padding: 0 var(--space-8); font-size: var(--text-lg); }
.es-btn--pill { border-radius: var(--radius-full); }
.es-btn--block { width: 100%; }

.es-btn--primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.es-btn--primary:hover { background: var(--terracotta-dark); transform: translateY(-1px); }
.es-btn--primary:active { transform: translateY(0); }

.es-btn--secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-web-card);
}
.es-btn--secondary:hover { border-color: rgba(224, 133, 102, 0.30); transform: translateY(-1px); }
.es-btn--secondary:active { transform: translateY(0); }

.es-btn--outline {
  background: transparent;
  color: var(--terracotta);
  border: 1.5px solid var(--terracotta);
}
.es-btn--outline:hover { background: rgba(224, 133, 102, 0.08); }

.es-btn--ghost {
  background: transparent;
  color: var(--terracotta);
}
.es-btn--ghost:hover { background: rgba(224, 133, 102, 0.08); }

.es-btn:disabled,
.es-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.es-btn:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}
.es-btn > svg { width: 1.15em; height: 1.15em; }

/* ─────────────────────────────────────────────────────────
   ICON BUTTON
   ───────────────────────────────────────────────────────── */
.es-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  transition: background var(--dur-base) var(--ease-standard),
    transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.es-icon-btn--round { border-radius: var(--radius-full); }
.es-icon-btn--sm { width: 36px; height: 36px; }
.es-icon-btn--md { width: 44px; height: 44px; }
.es-icon-btn--lg { width: 52px; height: 52px; }
.es-icon-btn--solid { background: var(--terracotta); color: #fff; box-shadow: var(--shadow-glow); }
.es-icon-btn--solid:hover { background: var(--terracotta-dark); }
.es-icon-btn--soft { background: rgba(224, 133, 102, 0.12); color: var(--terracotta); }
.es-icon-btn--soft:hover { background: rgba(224, 133, 102, 0.20); }
.es-icon-btn--ghost:hover { background: rgba(42, 45, 49, 0.06); }
.es-icon-btn:active { transform: scale(0.92); }
.es-icon-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.es-icon-btn:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

/* ─────────────────────────────────────────────────────────
   CARD
   ───────────────────────────────────────────────────────── */
.es-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
}
.es-card--lg { border-radius: var(--radius-card-lg); }
.es-card--flat { box-shadow: none; }
.es-card--tap { cursor: pointer; transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard); }
.es-card--tap:hover { transform: translateY(-2px); box-shadow: var(--shadow-web-card); }

/* ─────────────────────────────────────────────────────────
   SECTION HEADER
   ───────────────────────────────────────────────────────── */
.es-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-1) var(--space-3);
}
.es-section-header__icon { color: var(--terracotta); display: inline-flex; }
.es-section-header__text { flex: 1; min-width: 0; }
.es-section-header__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  margin: 0;
}
.es-section-header__subtitle {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: var(--weight-medium);
  margin: 2px 0 0;
}

/* ─────────────────────────────────────────────────────────
   ACTIVITY TILE
   ───────────────────────────────────────────────────────── */
.es-activity-tile {
  display: flex;
  align-items: center;
  gap: var(--space-3-5);
  min-height: var(--activity-tile-height);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card-lg);
  background: var(--pastel-peach);
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-standard);
}
.es-activity-tile:hover { transform: translateY(-1px); }
.es-activity-tile--static { cursor: default; }
.es-activity-tile--static:hover { transform: none; }
.es-activity-tile__icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.es-activity-tile__icon img { width: 100%; height: 100%; object-fit: contain; }
.es-activity-tile__body { flex: 1; min-width: 0; }
.es-activity-tile__title {
  font-size: 15px;
  font-weight: var(--weight-bold);
  color: var(--ink);
  letter-spacing: -0.2px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.es-activity-tile__subtitle {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: var(--weight-medium);
  margin: 2px 0 0;
}
.es-activity-tile__trailing {
  flex: none;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─────────────────────────────────────────────────────────
   AVATAR
   ───────────────────────────────────────────────────────── */
.es-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(224, 133, 102, 0.12);
  color: var(--terracotta);
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  overflow: hidden;
  flex: none;
  background-size: cover;
  background-position: center;
}
.es-avatar--ring { border: 2.5px solid #fff; box-shadow: var(--shadow-soft); }
.es-avatar img { width: 100%; height: 100%; object-fit: cover; }
.es-avatar-stack { display: inline-flex; }
.es-avatar-stack > .es-avatar { margin-left: -10px; border: 2.5px solid #fff; }
.es-avatar-stack > .es-avatar:first-child { margin-left: 0; }

/* ─────────────────────────────────────────────────────────
   BADGE
   ───────────────────────────────────────────────────────── */
.es-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-wide);
  background: rgba(224, 133, 102, 0.14);
  color: var(--terracotta-dark);
  white-space: nowrap;
}
.es-badge--solid { color: #fff; background: var(--terracotta); }
.es-badge--dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* Eyebrow — landing pill label (icon + text, white on card shadow) */
.es-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: #fff;
  color: var(--terracotta);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  box-shadow: var(--shadow-web-card);
  box-shadow: 0 6px 28px -8px rgba(42,45,49,0.08), inset 0 0 0 1px rgba(224,133,102,0.10);
}

/* ─────────────────────────────────────────────────────────
   CHIP  (category chip — icon + label, accent tinted)
   ───────────────────────────────────────────────────────── */
.es-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  background: rgba(224, 133, 102, 0.12);
  color: var(--terracotta);
  border: none;
  cursor: default;
  transition: background var(--dur-base) var(--ease-standard);
}
.es-chip__icon {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.55);
}
.es-chip--button { cursor: pointer; }
.es-chip--button:hover { filter: brightness(0.97); }
.es-chip--selected { box-shadow: inset 0 0 0 1.5px currentColor; }

/* ─────────────────────────────────────────────────────────
   STATUS DOT + BADGE
   ───────────────────────────────────────────────────────── */
.es-status-dot {
  display: inline-block;
  width: var(--status-dot);
  height: var(--status-dot);
  border-radius: var(--radius-full);
  background: var(--success);
}
.es-status-dot--ring { border: 2px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.18); }
.es-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-wide);
}

/* ─────────────────────────────────────────────────────────
   TEXT FIELD
   ───────────────────────────────────────────────────────── */
.es-field { display: block; }
.es-field__label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin: 0 0 var(--space-2);
}
.es-field__wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-field);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0 var(--space-4);
  transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.es-field__wrap:focus-within {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(224, 133, 102, 0.15);
}
.es-field__icon { color: var(--muted); display: inline-flex; flex: none; }
.es-field__input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: var(--text-base);
  outline: none;
}
.es-field__input::placeholder { color: var(--muted); opacity: 0.8; }
.es-field--error .es-field__wrap { border-color: var(--error); }
.es-field--error .es-field__wrap:focus-within { box-shadow: 0 0 0 3px rgba(226, 109, 109, 0.15); }
.es-field__help { font-size: var(--text-xs); color: var(--muted); margin: 6px 0 0; }
.es-field--error .es-field__help { color: var(--error); }
.es-field__input:disabled { cursor: not-allowed; }
.es-field--disabled .es-field__wrap { opacity: 0.55; }

/* ─────────────────────────────────────────────────────────
   HERO BANNER
   ───────────────────────────────────────────────────────── */
.es-hero-banner {
  position: relative;
  border-radius: var(--radius-card-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--terracotta);
  padding: var(--space-5);
  min-height: 200px;
  display: flex;
  color: #fff;
}
.es-hero-banner__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.es-hero-banner__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.42), rgba(0,0,0,0.06) 55%, rgba(0,0,0,0.14));
}
.es-hero-banner__content {
  position: relative;
  align-self: flex-end;
  z-index: 1;
}
.es-hero-banner__greeting {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.4px;
  margin: 0;
  text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.es-hero-banner__subtitle {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin: 4px 0 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}
.es-hero-banner__avatars {
  position: absolute; top: var(--space-5); right: var(--space-5);
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────
   ICON
   ───────────────────────────────────────────────────────── */
.es-icon {
  display: inline-block;
  vertical-align: middle;
  color: currentColor;
  flex: none;
}
