*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a2e;
}

/* ── Shared card ────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .10);
  padding: 2.5rem 2rem;
  width: 100%;
}

/* ── Login card ─────────────────────────────────────────────── */
.login-card {
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.login-card h1 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}

.login-card label {
  font-size: .85rem;
  font-weight: 600;
  color: #555;
  display: block;
  margin-bottom: .35rem;
}

.login-card select {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
}

.login-card select:focus {
  border-color: #4f46e5;
}

.login-card input[type="password"] {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s;
}

.login-card input[type="password"]:focus {
  border-color: #4f46e5;
}

.login-card button {
  width: 100%;
  padding: .7rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.login-card button:hover { background: #4338ca; }

.error-msg {
  color: #dc2626;
  font-size: .85rem;
  text-align: center;
  min-height: 1.2em;
}

/* ── Chat card ──────────────────────────────────────────────── */
.chat-card {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 1.5rem;
}

.chat-card h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.lang-display {
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  background: #4f46e5;
  padding: .3rem .85rem;
  border-radius: 99px;
  letter-spacing: .02em;
}

/* ── Logout-Link ────────────────────────────────────────────── */
.logout-link {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  font-size: .8rem;
  color: #9ca3af;
  text-decoration: none;
}

/* ── Aktions-Buttons (über Voiceflow-Widget) ────────────────── */
#chat-actions {
  display: none;           /* wird per JS eingeblendet */
  flex-direction: row;
  gap: .5rem;
  position: fixed;
  bottom: 20px;            /* gleiche Höhe wie der Voiceflow-Launcher */
  right: 90px;             /* links neben dem Launcher-Icon (~70px breit + Abstand) */
  z-index: 999;
}

.action-btn {
  padding: .5rem .9rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.action-btn:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-box h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-box p {
  font-size: .92rem;
  line-height: 1.6;
  color: #374151;
}

.modal-close {
  position: absolute;
  top: .75rem;
  right: .85rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 .2rem;
}

.modal-close:hover { color: #1a1a2e; }

/* ── Stern-Bewertung ────────────────────────────────────────── */
.stars {
  display: flex;
  gap: .35rem;
}

.star {
  font-size: 2rem;
  color: #d1d5db;
  cursor: pointer;
  transition: color .15s, transform .1s;
  user-select: none;
}

.star:hover,
.star.active {
  color: #f59e0b;
}

.star:hover {
  transform: scale(1.15);
}

.rating-label {
  font-size: .9rem;
  font-weight: 600;
  color: #4f46e5;
  min-height: 1.3em;
}

.modal-box label {
  font-size: .85rem;
  font-weight: 600;
  color: #555;
}

.modal-box textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color .2s;
}

.modal-box textarea:focus {
  border-color: #4f46e5;
}

.submit-btn {
  align-self: flex-end;
  padding: .55rem 1.4rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.submit-btn:hover { background: #4338ca; }

.rating-thanks {
  font-size: .9rem;
  color: #16a34a;
  font-weight: 600;
  text-align: center;
}
