:root {
  --menv-accent: #7c3aed;
  --menv-star: #f5b301;
  --menv-bg: #ffffff;
  --menv-surface: #f7f9fa;
  --menv-text: #1a202c;
  --menv-text-muted: #8895a7;
  --menv-border: #e5e9ee;
}

:root[data-menv-theme="dark"] {
  --menv-bg: #171522;
  --menv-surface: #211f30;
  --menv-text: #f1f5f9;
  --menv-text-muted: #9ca3af;
  --menv-border: #322f45;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: transparent;
}

.menv-testi {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px;
  color: var(--menv-text);
}

.menv-testi-loading,
.menv-testi-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--menv-text-muted);
  font-size: 0.9rem;
}

.menv-testi-error {
  text-align: center;
  padding: 24px 12px;
  color: #dc2626;
  font-size: 0.9rem;
}

/* ─── Card ──────────────────────────────────────────────────────────── */
.menv-testi-card {
  background: var(--menv-bg);
  border: 1px solid var(--menv-border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.menv-testi-stars {
  color: var(--menv-star);
  font-size: 0.95rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.menv-testi-stars .menv-star-empty { color: var(--menv-border); }

.menv-testi-text {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--menv-text);
  margin: 0 0 14px;
}
.menv-testi-text::before { content: "\201C"; }
.menv-testi-text::after { content: "\201D"; }

.menv-testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menv-testi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--menv-surface);
}

.menv-testi-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--menv-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.menv-testi-author-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--menv-text);
}
.menv-testi-author-role {
  font-size: 0.78rem;
  color: var(--menv-text-muted);
}

/* ─── Carousel ──────────────────────────────────────────────────────── */
.menv-testi-carousel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menv-testi-track-wrap {
  flex: 1;
  overflow: hidden;
}

.menv-testi-track {
  display: flex;
  transition: transform 0.4s ease;
}

.menv-testi-track .menv-testi-card {
  flex: 0 0 100%;
  max-width: 100%;
}

.menv-testi-arrow {
  background: var(--menv-surface);
  border: 1px solid var(--menv-border);
  color: var(--menv-text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.menv-testi-arrow:hover { background: var(--menv-border); }

.menv-testi-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -22px;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.menv-testi-carousel { position: relative; margin-bottom: 22px; }

.menv-testi-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--menv-border);
  border: none;
  cursor: pointer;
  padding: 0;
}
.menv-testi-dot.is-active { background: var(--menv-accent); }

/* ─── Grid ──────────────────────────────────────────────────────────── */
.menv-testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* ─── List ──────────────────────────────────────────────────────────── */
.menv-testi-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* A long word with no spaces breaks instead of spilling out of its box */
.menv-testi-text,
.menv-testi-author-name,
.menv-testi-author-role { overflow-wrap: anywhere; }
