.wl-openai-grid {
  display: grid;
  grid-template-columns: repeat(var(--wl-openai-columns, 2), minmax(0, 1fr));
  gap: var(--wl-openai-gap, 24px);
  width: 100%;
  box-sizing: border-box;
  align-items: start;
}

.wl-openai-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  min-width: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.wl-openai-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.11);
  border-color: rgba(99, 102, 241, 0.35);
}

.wl-openai-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(248, 250, 252, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.wl-openai-card-title {
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.wl-openai-card-badge {
  flex: 0 0 auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef4ff;
  color: #315acb;
  border: 1px solid rgba(49, 90, 203, 0.18);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.wl-openai-chat-host {
  height: var(--wl-openai-height, 80vh);
  min-height: 560px;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}

.wl-openai-chatkit-instance,
.wl-openai-chat-host openai-chatkit {
  display: block;
  width: 100%;
  height: 100%;
}

.wl-openai-card .ck-iframe {
  width: 100% !important;
  height: 80% !important;
  min-height: 420px !important;
}

.wl-openai-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #64748b;
  font-size: 14px;
}

.wl-openai-error {
  padding: 14px 16px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.wl-openai-error code {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 6px;
}

@media (max-width: 900px) {
  .wl-openai-grid {
    grid-template-columns: 1fr;
  }

  .wl-openai-chat-host {
    min-height: 520px;
  }
}
