/* ── YooHoo Widget (top-nav dropdown) ───────────────────────── */

.yoo-hoo-widget {
  position: relative;
}

.yoo-hoo-widget__dropdown {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 0.45rem);
  z-index: 30;
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  inline-size: clamp(18rem, 24vw, 22rem);
}

.yoo-hoo-widget__panel {
  padding: var(--space-md);
  display: grid;
  gap: var(--space-sm);
}

.yoo-hoo-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.yoo-hoo-widget__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--theme-text);
  margin: 0;
}

.yoo-hoo-widget__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-block-start: var(--space-xs);
}

/* ── My Issues page ────────────────────────────────────────── */

.yoo-hoo-issues__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: var(--space-lg);

  & h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--theme-text);
    margin: 0;
  }
}

.yoo-hoo-issues__header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.yoo-hoo-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 2.25rem;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);

  &:hover {
    background: var(--theme-surface-muted);
    border-color: var(--color-primary);
    color: var(--theme-text);
    transform: translateY(-1px);
  }
}

.yoo-hoo-issues__list {
  display: grid;
  gap: var(--space-xs);
}

.yoo-hoo-issues__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast);

  &:hover {
    border-color: var(--color-border-strong);
  }
}

.yoo-hoo-issues__item-main {
  display: grid;
  gap: var(--space-xs);
}

.yoo-hoo-issues__link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--theme-text);
  text-decoration: none;

  &:hover {
    color: var(--color-primary);
  }
}

.yoo-hoo-issues__meta {
  font-size: var(--text-xs);
  color: var(--theme-muted);
}

.yoo-hoo-issues__empty {
  color: var(--theme-muted);
  text-align: center;
  padding: var(--space-xl);
}

/* ── Form ──────────────────────────────────────────────────── */

.yoo-hoo-form {
  max-inline-size: 36rem;
}

.yoo-hoo-form__actions {
  margin-block-start: var(--space-md);
}

.yoo-hoo-thank-you {
  margin-block-end: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid color-mix(in srgb, var(--color-success) 32%, var(--theme-border));
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-success) 12%, var(--theme-surface)), var(--theme-surface));
  box-shadow: var(--shadow-sm);

  & h2 {
    margin: 0;
    font-size: var(--text-lg);
    color: var(--theme-text);
  }

  & p {
    margin: 0;
    color: var(--theme-text-subtle);
  }
}

.yoo-hoo-thank-you__eyebrow {
  margin-block-end: var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-success);
}

/* ── Message timeline ──────────────────────────────────────── */

.yoo-hoo-timeline {
  display: grid;
  gap: var(--space-sm);
}

.yoo-hoo-timeline__item {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-md);

  &[data-direction="outbound"] {
    border-inline-start: 3px solid var(--color-primary);
  }
}

.yoo-hoo-timeline__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--theme-muted);
  margin-block-end: var(--space-xs);
}

.yoo-hoo-timeline__body {
  font-size: var(--text-sm);
  color: var(--theme-text);
  line-height: 1.5;
}

/* ── Status badge ──────────────────────────────────────────── */

.yoo-hoo-badge {
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 0.1rem var(--space-sm);
  border-radius: var(--radius-full);
  border: 1px solid var(--theme-border);
  white-space: nowrap;

  &[data-status="open"] { color: var(--color-info); border-color: var(--color-info); }
  &[data-status="in_progress"] { color: var(--color-warning-ink); border-color: var(--color-warning); }
  &[data-status="resolved"] { color: var(--color-success); border-color: var(--color-success); }
  &[data-status="closed"] { color: var(--theme-muted); }
}
