/* Pospeh Widgets - Design System Variables */

:root {
  /* Brand Colors */
  --pospeh-primary: #2563eb;
  --pospeh-primary-hover: #1d4ed8;
  --pospeh-primary-light: #3b82f6;
  --pospeh-secondary: #64748b;
  --pospeh-secondary-hover: #475569;
  --pospeh-success: #10b981;
  --pospeh-error: #ef4444;
  --pospeh-warning: #f59e0b;
  --pospeh-info: #3b82f6;

  /* Neutral Colors */
  --pospeh-white: #ffffff;
  --pospeh-black: #000000;
  --pospeh-gray-50: #f9fafb;
  --pospeh-gray-100: #f3f4f6;
  --pospeh-gray-200: #e5e7eb;
  --pospeh-gray-300: #d1d5db;
  --pospeh-gray-400: #9ca3af;
  --pospeh-gray-500: #6b7280;
  --pospeh-gray-600: #4b5563;
  --pospeh-gray-700: #374151;
  --pospeh-gray-800: #1f2937;
  --pospeh-gray-900: #111827;

  /* Spacing Scale */
  --pospeh-space-1: 0.25rem;    /* 4px */
  --pospeh-space-2: 0.5rem;     /* 8px */
  --pospeh-space-3: 0.75rem;    /* 12px */
  --pospeh-space-4: 1rem;       /* 16px */
  --pospeh-space-5: 1.25rem;    /* 20px */
  --pospeh-space-6: 1.5rem;     /* 24px */
  --pospeh-space-8: 2rem;       /* 32px */
  --pospeh-space-10: 2.5rem;    /* 40px */
  --pospeh-space-12: 3rem;      /* 48px */
  --pospeh-space-16: 4rem;      /* 64px */

  /* Typography */
  --pospeh-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --pospeh-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

  --pospeh-font-size-xs: 0.75rem;    /* 12px */
  --pospeh-font-size-sm: 0.875rem;   /* 14px */
  --pospeh-font-size-base: 1rem;     /* 16px */
  --pospeh-font-size-lg: 1.125rem;   /* 18px */
  --pospeh-font-size-xl: 1.25rem;    /* 20px */
  --pospeh-font-size-2xl: 1.5rem;    /* 24px */

  --pospeh-font-weight-normal: 400;
  --pospeh-font-weight-medium: 500;
  --pospeh-font-weight-semibold: 600;
  --pospeh-font-weight-bold: 700;

  --pospeh-line-height-tight: 1.25;
  --pospeh-line-height-normal: 1.5;
  --pospeh-line-height-relaxed: 1.75;

  /* Border Radius */
  --pospeh-radius-none: 0;
  --pospeh-radius-sm: 0.25rem;    /* 4px */
  --pospeh-radius-md: 0.5rem;     /* 8px */
  --pospeh-radius-lg: 0.75rem;    /* 12px */
  --pospeh-radius-xl: 1rem;       /* 16px */
  --pospeh-radius-full: 9999px;

  /* Shadows */
  --pospeh-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --pospeh-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --pospeh-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --pospeh-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --pospeh-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --pospeh-transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --pospeh-transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Scale */
  --pospeh-z-base: 0;
  --pospeh-z-dropdown: 1000;
  --pospeh-z-sticky: 1020;
  --pospeh-z-fixed: 1030;
  --pospeh-z-modal-backdrop: 1040;
  --pospeh-z-modal: 1050;
  --pospeh-z-popover: 1060;
  --pospeh-z-tooltip: 1070;
}

/* Tilda Theme Override */
.theme-tilda,
.pospeh-widget.theme-tilda {
  --pospeh-primary: #ff6b35;
  --pospeh-primary-hover: #e55a2b;
  --pospeh-primary-light: #ff8559;
}

/* Dark Theme */
.theme-dark,
.pospeh-widget.theme-dark {
  --pospeh-gray-50: #1f2937;
  --pospeh-gray-100: #111827;
  --pospeh-gray-200: #374151;
  --pospeh-gray-300: #4b5563;
  --pospeh-gray-400: #6b7280;
  --pospeh-gray-500: #9ca3af;
  --pospeh-gray-600: #d1d5db;
  --pospeh-gray-700: #e5e7eb;
  --pospeh-gray-800: #f3f4f6;
  --pospeh-gray-900: #f9fafb;

  --pospeh-white: #111827;
  --pospeh-black: #f9fafb;
}

/* Pospeh Widgets - CSS Reset (Scoped to prevent conflicts) */

.pospeh-widget,
.pospeh-widget * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.pospeh-widget {
  font-family: var(--pospeh-font-family);
  font-size: var(--pospeh-font-size-base);
  line-height: var(--pospeh-line-height-normal);
  color: var(--pospeh-gray-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.pospeh-widget button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.pospeh-widget input,
.pospeh-widget textarea,
.pospeh-widget select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.pospeh-widget a {
  color: inherit;
  text-decoration: none;
}

.pospeh-widget img {
  max-width: 100%;
  height: auto;
  display: block;
}

.pospeh-widget ul,
.pospeh-widget ol {
  list-style: none;
}

/* Pospeh Widgets - Component Styles */

/* Button Styles */
.pospeh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--pospeh-space-2);
  padding: var(--pospeh-space-3) var(--pospeh-space-4);
  border-radius: var(--pospeh-radius-md);
  font-weight: var(--pospeh-font-weight-medium);
  transition: all var(--pospeh-transition-fast);
  white-space: nowrap;
  user-select: none;
}

.pospeh-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pospeh-btn-primary {
  background-color: var(--pospeh-primary);
  color: var(--pospeh-white);
}

.pospeh-btn-primary:hover:not(:disabled) {
  background-color: var(--pospeh-primary-hover);
}

.pospeh-btn-secondary {
  background-color: var(--pospeh-gray-100);
  color: var(--pospeh-gray-900);
}

.pospeh-btn-secondary:hover:not(:disabled) {
  background-color: var(--pospeh-gray-200);
}

.pospeh-btn-outline {
  background-color: transparent;
  color: var(--pospeh-primary);
  border: 1px solid var(--pospeh-primary);
}

.pospeh-btn-outline:hover:not(:disabled) {
  background-color: var(--pospeh-primary);
  color: var(--pospeh-white);
}

.pospeh-btn-sm {
  padding: var(--pospeh-space-2) var(--pospeh-space-3);
  font-size: var(--pospeh-font-size-sm);
}

.pospeh-btn-md {
  padding: var(--pospeh-space-3) var(--pospeh-space-4);
  font-size: var(--pospeh-font-size-base);
}

.pospeh-btn-lg {
  padding: var(--pospeh-space-4) var(--pospeh-space-6);
  font-size: var(--pospeh-font-size-lg);
}

/* Input Styles */
.pospeh-input {
  width: 100%;
  padding: var(--pospeh-space-3) var(--pospeh-space-4);
  border: 1px solid var(--pospeh-gray-300);
  border-radius: var(--pospeh-radius-md);
  background-color: var(--pospeh-white);
  color: var(--pospeh-gray-900);
  transition: all var(--pospeh-transition-fast);
}

.pospeh-input:focus {
  outline: none;
  border-color: var(--pospeh-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pospeh-input:disabled {
  background-color: var(--pospeh-gray-100);
  cursor: not-allowed;
}

.pospeh-input::placeholder {
  color: var(--pospeh-gray-400);
}

.pospeh-textarea {
  width: 100%;
  padding: var(--pospeh-space-3) var(--pospeh-space-4);
  border: 1px solid var(--pospeh-gray-300);
  border-radius: var(--pospeh-radius-md);
  background-color: var(--pospeh-white);
  color: var(--pospeh-gray-900);
  resize: vertical;
  min-height: 80px;
  transition: all var(--pospeh-transition-fast);
}

.pospeh-textarea:focus {
  outline: none;
  border-color: var(--pospeh-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Card Styles */
.pospeh-card {
  background-color: var(--pospeh-white);
  border-radius: var(--pospeh-radius-lg);
  box-shadow: var(--pospeh-shadow-md);
  padding: var(--pospeh-space-6);
}

.pospeh-card-header {
  margin-bottom: var(--pospeh-space-4);
}

.pospeh-card-title {
  font-size: var(--pospeh-font-size-lg);
  font-weight: var(--pospeh-font-weight-semibold);
  color: var(--pospeh-gray-900);
}

.pospeh-card-body {
  color: var(--pospeh-gray-700);
}

/* Loading Spinner */
.pospeh-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--pospeh-gray-200);
  border-top-color: var(--pospeh-primary);
  border-radius: 50%;
  animation: pospeh-spin 0.8s linear infinite;
}

@keyframes pospeh-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Avatar Styles */
.pospeh-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--pospeh-radius-full);
  background-color: var(--pospeh-gray-200);
  color: var(--pospeh-gray-700);
  font-weight: var(--pospeh-font-weight-medium);
  overflow: hidden;
}

.pospeh-avatar-sm {
  width: 2rem;
  height: 2rem;
  font-size: var(--pospeh-font-size-sm);
}

.pospeh-avatar-md {
  width: 2.5rem;
  height: 2.5rem;
  font-size: var(--pospeh-font-size-base);
}

.pospeh-avatar-lg {
  width: 3rem;
  height: 3rem;
  font-size: var(--pospeh-font-size-lg);
}

/* Utility Classes */
.pospeh-text-center {
  text-align: center;
}

.pospeh-text-sm {
  font-size: var(--pospeh-font-size-sm);
}

.pospeh-text-muted {
  color: var(--pospeh-gray-500);
}

.pospeh-mt-4 {
  margin-top: var(--pospeh-space-4);
}

.pospeh-mb-4 {
  margin-bottom: var(--pospeh-space-4);
}

.pospeh-flex {
  display: flex;
}

.pospeh-flex-col {
  flex-direction: column;
}

.pospeh-gap-2 {
  gap: var(--pospeh-space-2);
}

.pospeh-gap-4 {
  gap: var(--pospeh-space-4);
}

/* Pospeh Widgets - Main Stylesheet */

/* Chat Widget Styles - Aligned with Internal AIChat Component */

/* ==================== CSS Variables ==================== */

:root,
.pospeh-widget {
  /* Primary colors */
  --pospeh-primary: #2563eb;
  --pospeh-primary-hover: #1d4ed8;
  --pospeh-primary-light: rgba(37, 99, 235, 0.1);

  /* Neutral colors */
  --pospeh-white: #ffffff;
  --pospeh-gray-50: #f9fafb;
  --pospeh-gray-100: #f3f4f6;
  --pospeh-gray-200: #e5e7eb;
  --pospeh-gray-300: #d1d5db;
  --pospeh-gray-400: #9ca3af;
  --pospeh-gray-500: #6b7280;
  --pospeh-gray-600: #4b5563;
  --pospeh-gray-700: #374151;
  --pospeh-gray-800: #1f2937;
  --pospeh-gray-900: #111827;

  /* Shadows */
  --pospeh-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --pospeh-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --pospeh-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --pospeh-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);

  /* Border radius */
  --pospeh-radius-sm: 4px;
  --pospeh-radius-md: 8px;
  --pospeh-radius-lg: 12px;
  --pospeh-radius-full: 9999px;
}

/* ==================== Chat Icon (Collapsed State) ==================== */

.pospeh-chat-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pospeh-primary) 0%, var(--pospeh-primary-hover) 100%);
  box-shadow: var(--pospeh-shadow-xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pospeh-chat-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ==================== Chat Container ==================== */

.pospeh-chat-container {
  display: flex;
  flex-direction: column;
  background-color: var(--pospeh-white);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 9999;
}

/* ==================== Chat Header ==================== */

.pospeh-chat-header {
  background: linear-gradient(135deg, var(--pospeh-primary) 0%, var(--pospeh-primary-hover) 100%);
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  flex-shrink: 0;
}

.pospeh-chat-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pospeh-chat-status-dot {
  width: 8px;
  height: 8px;
  background-color: #4ade80;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.pospeh-chat-title {
  font-weight: 600;
  font-size: 15px;
}

.pospeh-chat-header-buttons {
  display: flex;
  gap: 4px;
}

.pospeh-chat-header-button {
  padding: 6px;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pospeh-chat-header-button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ==================== Messages Area ==================== */

.pospeh-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background-color: #f9fafb;
}

.pospeh-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.pospeh-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.pospeh-chat-messages::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.pospeh-chat-messages::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ==================== Messages ==================== */

.pospeh-chat-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
  animation: pospeh-message-fade-in 0.3s ease-in;
}

.pospeh-chat-message-user {
  justify-content: flex-end;
}

.pospeh-chat-message-assistant {
  justify-content: flex-start;
}

@keyframes pospeh-message-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pospeh-chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
}

.pospeh-chat-bubble-user {
  background-color: var(--pospeh-primary);
  color: white;
}

.pospeh-chat-bubble-assistant {
  background-color: white;
  color: #333333;
  border: 1px solid #e5e7eb;
}

/* ==================== Expand Button ==================== */

.pospeh-chat-expand-button {
  margin-top: 4px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: none;
  border-radius: 0;
  background-color: transparent;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pospeh-chat-expand-button:hover {
  opacity: 1;
}

.pospeh-chevron {
  font-size: 10px;
}

/* ==================== Empty State ==================== */

.pospeh-chat-empty {
  text-align: center;
  padding: 32px 16px;
  color: #9ca3af;
}

.pospeh-chat-empty-title {
  font-size: 14px;
  margin: 0 0 8px 0;
}

.pospeh-chat-empty-subtitle {
  font-size: 12px;
  opacity: 0.75;
  margin: 0;
}

.pospeh-chat-initial-message {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  color: #333;
}

/* ==================== Loading State ==================== */

.pospeh-chat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  color: #6b7280;
  font-size: 14px;
}

.pospeh-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--pospeh-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== Error State ==================== */

.pospeh-chat-error {
  background-color: #fef2f2;
  color: #991b1b;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid #fecaca;
  margin: 8px 0;
}

/* ==================== Input Area ==================== */

.pospeh-chat-input-container {
  border-top: 1px solid #e5e7eb;
  padding: 16px;
  background-color: white;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.pospeh-chat-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}

.pospeh-chat-input:focus {
  border-color: var(--pospeh-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pospeh-chat-input:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

.pospeh-chat-input::-moz-placeholder {
  color: #9ca3af;
}

.pospeh-chat-input::placeholder {
  color: #9ca3af;
}

.pospeh-chat-send-button {
  background-color: var(--pospeh-primary) !important;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  height: 44px;
}

.pospeh-chat-send-button:hover:not(:disabled) {
  background-color: var(--pospeh-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pospeh-chat-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== Resize Handle ==================== */

.pospeh-chat-resize-handle {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 16px;
  height: 16px;
  cursor: nesw-resize;
  background: linear-gradient(135deg, #cbd5e1 50%, transparent 50%);
  z-index: 10;
}

/* ==================== Markdown Styling ==================== */

.pospeh-chat-markdown {
  line-height: 1.6;
}

.pospeh-chat-markdown > *:first-child {
  margin-top: 0;
}

.pospeh-chat-markdown > *:last-child {
  margin-bottom: 0;
}

.pospeh-chat-markdown h1,
.pospeh-chat-markdown h2,
.pospeh-chat-markdown h3,
.pospeh-chat-markdown h4,
.pospeh-chat-markdown h5,
.pospeh-chat-markdown h6 {
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

.pospeh-chat-markdown h1 { font-size: 1.5em; }
.pospeh-chat-markdown h2 { font-size: 1.3em; }
.pospeh-chat-markdown h3 { font-size: 1.1em; }
.pospeh-chat-markdown h4 { font-size: 1em; }

.pospeh-chat-markdown p {
  margin: 0.5em 0;
  line-height: 1.6;
}

.pospeh-chat-markdown ul,
.pospeh-chat-markdown ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.pospeh-chat-markdown ul {
  list-style-type: disc;
}

.pospeh-chat-markdown ol {
  list-style-type: decimal;
}

.pospeh-chat-markdown li {
  margin: 0.25em 0;
  line-height: 1.5;
}

.pospeh-chat-markdown ul ul {
  list-style-type: circle;
}

.pospeh-chat-markdown ul ul ul {
  list-style-type: square;
}

.pospeh-chat-markdown code {
  background-color: rgba(37, 99, 235, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

/* User messages - different code styling */
.pospeh-chat-bubble-user .pospeh-chat-markdown code {
  background-color: rgba(255, 255, 255, 0.2);
}

.pospeh-chat-markdown pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1em;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.5em 0;
}

.pospeh-chat-markdown pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

.pospeh-chat-markdown blockquote {
  border-left: 3px solid var(--pospeh-primary);
  padding-left: 1em;
  margin: 0.5em 0;
  color: #6b7280;
  font-style: italic;
}

.pospeh-chat-markdown a {
  color: var(--pospeh-primary);
  text-decoration: underline;
}

.pospeh-chat-markdown a:hover {
  color: var(--pospeh-primary-hover);
}

/* User messages - different link styling */
.pospeh-chat-bubble-user .pospeh-chat-markdown a {
  color: rgba(255, 255, 255, 0.9);
}

.pospeh-chat-markdown strong {
  font-weight: 600;
}

.pospeh-chat-markdown em {
  font-style: italic;
}

.pospeh-chat-markdown hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1em 0;
}

.pospeh-chat-markdown table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5em 0;
  font-size: 0.9em;
}

.pospeh-chat-markdown th,
.pospeh-chat-markdown td {
  border: 1px solid #e5e7eb;
  padding: 0.5em;
  text-align: left;
}

.pospeh-chat-markdown th {
  background-color: #f9fafb;
  font-weight: 600;
}

.pospeh-chat-markdown img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0.5em 0;
}

/* ==================== Callouts ==================== */

.pospeh-callout {
  padding: 12px 16px;
  border-radius: 4px;
  margin: 8px 0;
}

.pospeh-callout-warning {
  background-color: #fef2f2;
  border-left: 4px solid #ef4444;
}

.pospeh-callout-info {
  background-color: #eff6ff;
  border-left: 4px solid #3b82f6;
}

.pospeh-callout-tip {
  background-color: #f0fdf4;
  border-left: 4px solid #22c55e;
}

.pospeh-callout-note {
  background-color: #fefce8;
  border-left: 4px solid #eab308;
}

/* ==================== Responsive ==================== */

@media (max-width: 480px) {
  .pospeh-chat-container[style*="position: fixed"] {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    width: calc(100% - 20px) !important;
    max-width: none !important;
  }

  .pospeh-chat-icon {
    width: 50px;
    height: 50px;
  }

  .pospeh-chat-icon svg {
    width: 26px;
    height: 26px;
  }
}

/* ==================== Theme Overrides ==================== */

/* Tilda Theme */
.theme-tilda .pospeh-chat-header {
  background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
}

.theme-tilda .pospeh-chat-icon {
  background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
}

.theme-tilda .pospeh-chat-bubble-user {
  background-color: #ff6b35;
}

.theme-tilda .pospeh-chat-input:focus {
  border-color: #ff6b35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.theme-tilda .pospeh-chat-send-button {
  background-color: #ff6b35;
}

.theme-tilda .pospeh-chat-send-button:hover:not(:disabled) {
  background-color: #e55a2b;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.theme-tilda .pospeh-chat-markdown code {
  background-color: rgba(255, 107, 53, 0.1);
}

.theme-tilda .pospeh-chat-markdown blockquote {
  border-left-color: #ff6b35;
}

.theme-tilda .pospeh-chat-markdown a {
  color: #ff6b35;
}

.theme-tilda .pospeh-spinner {
  border-top-color: #ff6b35;
}

/* Dark Theme */
.theme-dark .pospeh-chat-container {
  background-color: #1f2937;
}

.theme-dark .pospeh-chat-messages {
  background-color: #111827;
}

.theme-dark .pospeh-chat-bubble-assistant {
  background-color: #374151;
  color: #f9fafb;
  border-color: #4b5563;
}

.theme-dark .pospeh-chat-input-container {
  background-color: #1f2937;
  border-top-color: #374151;
}

.theme-dark .pospeh-chat-input {
  background-color: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.theme-dark .pospeh-chat-input::-moz-placeholder {
  color: #9ca3af;
}

.theme-dark .pospeh-chat-input::placeholder {
  color: #9ca3af;
}

.theme-dark .pospeh-chat-empty {
  color: #6b7280;
}

.theme-dark .pospeh-chat-initial-message {
  background-color: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.theme-dark .pospeh-chat-loading {
  color: #9ca3af;
}

.theme-dark .pospeh-spinner {
  border-color: #4b5563;
}

.theme-dark .pospeh-chat-markdown th {
  background-color: #374151;
}

.theme-dark .pospeh-chat-markdown th,
.theme-dark .pospeh-chat-markdown td {
  border-color: #4b5563;
}

.theme-dark .pospeh-chat-markdown hr {
  border-top-color: #4b5563;
}


/*# sourceMappingURL=chat-widget.css.map*/