
.wocp-shell {
  --wocp-bg: #f5f7fb;
  --wocp-card: rgba(255,255,255,0.9);
  --wocp-border: rgba(15, 23, 42, 0.08);
  --wocp-text: #0f172a;
  --wocp-muted: #64748b;
  --wocp-user: linear-gradient(135deg, #111827, #1f2937);
  --wocp-assistant: #ffffff;
  --wocp-accent: #10a37f;
  --wocp-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  max-width: 980px;
  margin: 24px auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wocp-card {
  background:
    radial-gradient(circle at top right, rgba(16,163,127,0.10), transparent 32%),
    radial-gradient(circle at bottom left, rgba(59,130,246,0.08), transparent 28%),
    var(--wocp-bg);
  border: 1px solid var(--wocp-border);
  box-shadow: var(--wocp-shadow);
  border-radius: 28px;
  overflow: hidden;
  min-height: var(--wocp-height, 680px);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(18px);
}

.wocp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--wocp-border);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(12px);
}

.wocp-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wocp-logo {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, #10a37f, #1d4ed8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(16,163,127,0.28);
}

.wocp-logo span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.25);
}

.wocp-logo.has-image {
  background: #fff;
  box-shadow: 0 10px 24px rgba(15,23,42,0.16);
  overflow: hidden;
}

.wocp-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wocp-heading h3 {
  margin: 0 0 2px;
  font-size: 20px;
  line-height: 1.2;
  color: var(--wocp-text);
}

.wocp-heading p {
  margin: 0;
  color: var(--wocp-muted);
  font-size: 13px;
}

.wocp-reset,
.wocp-send {
  appearance: none;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.wocp-reset {
  background: #ffffff;
  color: var(--wocp-text);
  border: 1px solid var(--wocp-border);
  padding: 10px 14px;
  font-weight: 600;
}

.wocp-send {
  background: linear-gradient(135deg, #10a37f, #0f8b6d);
  color: #fff;
  padding: 12px 18px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(16,163,127,0.25);
}

.wocp-reset:hover,
.wocp-send:hover {
  transform: translateY(-1px);
}

.wocp-reset:disabled,
.wocp-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.wocp-messages {
  flex: 1;
  overflow: auto;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: smooth;
}

.wocp-message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.wocp-user {
  justify-content: flex-end;
}

.wocp-assistant {
  justify-content: flex-start;
}


.wocp-avatar {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10a37f, #1d4ed8);
  box-shadow: 0 8px 18px rgba(15,23,42,0.12);
  overflow: hidden;
}

.wocp-avatar span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
}

.wocp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wocp-user .wocp-avatar {
  display: none;
}

.wocp-bubble {
  max-width: min(78%, 760px);
  border-radius: 22px;
  padding: 14px 16px;
  border: 1px solid var(--wocp-border);
  background: var(--wocp-assistant);
  color: var(--wocp-text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.wocp-user .wocp-bubble {
  background: var(--wocp-user);
  color: #fff;
  border-color: transparent;
}

.wocp-meta {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  opacity: 0.75;
}

.wocp-content {
  line-height: 1.65;
  font-size: 15px;
  word-break: break-word;
}

.wocp-content code {
  background: rgba(148,163,184,0.12);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.95em;
}

.wocp-code-block {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 16px;
  overflow: auto;
  background: rgba(15,23,42,0.96);
  color: #e2e8f0;
}

.wocp-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px 2px;
}

.wocp-typing span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #94a3b8;
  display: inline-block;
  animation: wocp-bounce 1s infinite ease-in-out;
}

.wocp-typing span:nth-child(2) { animation-delay: 0.15s; }
.wocp-typing span:nth-child(3) { animation-delay: 0.30s; }

@keyframes wocp-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-4px); opacity: 1; }
}

.wocp-input-wrap {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--wocp-border);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
}

.wocp-form {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.wocp-input {
  width: 100%;
  min-height: 26px;
  max-height: 220px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--wocp-text);
  font-size: 15px;
  line-height: 1.6;
  box-shadow: none !important;
}

.wocp-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.wocp-hint,
.wocp-footer-note {
  color: var(--wocp-muted);
  font-size: 12px;
}

.wocp-footer-note {
  padding: 0 20px 18px;
  text-align: right;
}

.wocp-locked {
  max-width: 980px;
  margin: 24px auto;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff8e1;
  border: 1px solid #f3d47c;
  color: #7c5d00;
}

@media (max-width: 782px) {
  .wocp-shell {
    margin: 16px auto;
  }

  .wocp-card {
    border-radius: 20px;
    min-height: min(78vh, 760px);
  }

  .wocp-topbar {
    padding: 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .wocp-topbar-left {
    width: 100%;
  }

  .wocp-reset {
    align-self: flex-end;
  }

  .wocp-messages {
    padding: 20px 14px;
  }

  .wocp-bubble {
    max-width: 92%;
  }

  .wocp-input-wrap {
    padding: 14px;
  }

  .wocp-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .wocp-send {
    width: 100%;
  }
}


.wocp-shell-ar {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

.wocp-shell-ar .wocp-card,
.wocp-shell-ar .wocp-input,
.wocp-shell-ar .wocp-content,
.wocp-shell-ar .wocp-heading p,
.wocp-shell-ar .wocp-heading h3 {
  direction: rtl;
  text-align: right;
}

.wocp-shell-ar .wocp-topbar {
  direction: rtl;
}

.wocp-shell-ar .wocp-user {
  justify-content: flex-start;
}

.wocp-shell-ar .wocp-assistant {
  justify-content: flex-end;
}

.wocp-shell-ar .wocp-actions {
  flex-direction: row-reverse;
}

.wocp-shell-ar .wocp-footer-note,
.wocp-shell-ar .wocp-hint {
  text-align: left;
}

.wocp-shell-ar .wocp-input::placeholder {
  text-align: right;
}

@media (max-width: 640px) {
  .wocp-logo { width: 42px; height: 42px; border-radius: 16px; }
  .wocp-avatar { width: 34px; height: 34px; min-width: 34px; }
  .wocp-bubble { max-width: 86%; }
}
