:root {
  --brand-navy: #2e4057;
  --brand-blue: #3d5a80;
  --brand-sea: #6ea8a2;
  --panel-bg: #f4f7fb;
  --text-main: #17212f;
  --text-muted: #4b5c73;
  --border-soft: rgba(23, 33, 47, 0.12);
  --chip-bg: #e6f1ef;
  --chip-hover: #d4e8e4;
  --floating-shadow: 0 24px 58px rgba(20, 37, 61, 0.2);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--text-main);
  background: #f2f7fa;
}

.split-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 640px) minmax(340px, 520px);
  align-items: center;
  justify-content: space-between;
  gap: clamp(26px, 3.5vw, 48px);
  width: 100%;
  min-height: 100dvh;
  padding: clamp(24px, 4vw, 56px);
  overflow: hidden;
  isolation: isolate;
}

.split-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 10%, rgba(206, 230, 253, 0.88) 0%, rgba(206, 230, 253, 0) 42%),
    radial-gradient(circle at 74% 84%, rgba(198, 241, 234, 0.82) 0%, rgba(198, 241, 234, 0) 46%),
    linear-gradient(140deg, #f7fbff 0%, #eef4fb 100%);
  z-index: -3;
}

.split-layout::after {
  content: "";
  position: absolute;
  width: clamp(360px, 44vw, 720px);
  aspect-ratio: 1;
  right: clamp(-160px, -8vw, -70px);
  bottom: clamp(-220px, -20vw, -130px);
  background: url("images/zaf_beeldmerk.png") center/contain no-repeat;
  opacity: 0.13;
  filter: blur(0.3px) saturate(112%);
  pointer-events: none;
  z-index: -2;
}

.left-panel {
  min-width: 0;
  padding: clamp(20px, 2vw, 30px) clamp(4px, 1.3vw, 14px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  animation: revealLeft 620ms cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-wrap img {
  width: 160px;
  height: auto;
  display: block;
}

.intro-title {
  margin: 0;
  font-size: clamp(1.9rem, 2.5vw, 2.8rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

.intro-text {
  margin: 0;
  max-width: 56ch;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 1rem;
}

.prompt-label {
  margin: 4px 0 0;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
  font-weight: 700;
}

.prompt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 540px;
}

.prompt-chip {
  border: 1px solid rgba(61, 90, 128, 0.18);
  background: var(--chip-bg);
  color: var(--brand-navy);
  padding: 11px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.prompt-chip:hover,
.prompt-chip:focus-visible {
  background: var(--chip-hover);
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(46, 64, 87, 0.14);
  outline: none;
}

.right-panel {
  width: min(100%, 520px);
  justify-self: end;
  display: flex;
  flex-direction: column;
  min-height: min(80dvh, 760px);
  max-height: 86dvh;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(43, 67, 91, 0.14);
  border-radius: 18px;
  box-shadow: var(--floating-shadow);
  backdrop-filter: blur(8px);
  overflow: hidden;
  animation: revealCard 640ms cubic-bezier(0.16, 0.83, 0.28, 1) both;
}

.chat-header {
  height: 78px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  background: linear-gradient(120deg, var(--brand-navy) 0%, var(--brand-blue) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  padding: 6px;
  border: 1px solid rgba(46, 64, 87, 0.16);
}

.chat-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.chat-subtitle {
  margin: 2px 0 0;
  opacity: 0.9;
  font-size: 0.84rem;
  font-weight: 600;
}

#webchat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(245, 250, 255, 0.45) 0%, rgba(255, 255, 255, 0.8) 100%);
}

#webchat > div {
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

#webchat > div > div {
  min-height: 0;
  height: 100%;
  overflow: auto !important;
  overscroll-behavior: contain;
}

#webchat .webchat__basic-transcript {
  min-height: 0;
  overflow-y: hidden;
}

@keyframes revealLeft {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealCard {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (max-width: 768px) {
  .split-layout {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 18px;
    padding: 16px;
  }

  .left-panel {
    padding: 16px 4px 4px;
    gap: 16px;
  }

  .logo-wrap img {
    width: 132px;
  }

  .intro-title {
    font-size: clamp(1.45rem, 5.4vw, 2rem);
  }

  .prompt-grid {
    gap: 10px;
  }

  .right-panel {
    width: 100%;
    min-height: 56vh;
    max-height: none;
    justify-self: stretch;
    border-radius: 14px;
  }

  .chat-header {
    height: 68px;
  }

  .split-layout::after {
    width: clamp(260px, 72vw, 400px);
    right: -84px;
    bottom: -120px;
    opacity: 0.1;
  }
}

.chat-signin {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 24px;
  text-align: center;
}

.chat-signin-text {
  margin: 0;
  max-width: 32ch;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.chat-signin-button {
  border: none;
  background: var(--brand-blue);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.chat-signin-button:hover:not(:disabled),
.chat-signin-button:focus-visible:not(:disabled) {
  background: var(--brand-navy);
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(46, 64, 87, 0.18);
  outline: none;
}

.chat-signin-button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.chat-signin-hint {
  margin: 0;
  max-width: 40ch;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-all;
}

.chat-loading {
  padding: 20px;
  margin: 0;
  color: var(--text-muted);
  font-weight: 600;
}

.chat-error {
  padding: 20px;
  margin: 0;
  color: #b00020;
  font-weight: 600;
  line-height: 1.5;
}
