.ava-widget-root {
    position: fixed;
    right: 16px;
    bottom: 80px;
    z-index: 2147483000;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }

  .ava-launcher {
    border: 0 !important;
    background: #0f172a !important;
    color: #fff !important;
    border-radius: 999px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.25) !important;
  }
  
  .ava-panel {
    width: min(380px, calc(100vw - 20px));
    max-height: 88vh;
    background: #fff;
    border: 1px solid #dbe4ea;
    border-radius: 14px;
    margin-top: 10px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    box-shadow: 0 14px 42px rgba(2, 6, 23, 0.22);
  }

  .ava-header {
    background: #0f172a !important;
    color: #fff !important;
    padding: 12px !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .ava-header h2 {
    margin: 0 !important;
    font-size: 15px !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    line-height: 1 !important;
  }

  .ava-header p {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.85;
  }
  
  .ava-header-actions {
    display: flex;
    align-items: start;
    gap: 4px;
  }
  
  .ava-header-actions button {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
  }
  
  .ava-close {
    font-size: 20px !important;
    line-height: 1;
  }
  
  .ava-messages {
    overflow-y: auto;
    padding: 12px;
    background: #f8fafc;
    min-height: 0;
  }
  
  .ava-message {
    max-width: 90%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    white-space: pre-wrap;
    font-size: 12px;
    line-height: 1.4;
  }

  .ava-bot {
    background: #e2e8f0;
    color: #0f172a;
  }

  .ava-user {
    background: #0f172a;
    color: #fff;
    margin-left: auto;
  }
  
  .ava-quick-replies {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
  }
  
  .ava-quick-reply {
    flex: 0 0 auto !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    border-radius: 999px !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
    cursor: pointer !important;
    color: #0f172a !important;
    opacity: 1 !important;
    text-decoration: none !important;
  }

  .ava-quick-reply:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
  }

  .ava-quick-reply:focus {
    color: #0f172a !important;
  }
  
  .ava-input-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 8px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
  }
  
  .ava-input {
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 8px !important;
    font-size: 12px !important;
    color: #0f172a !important;
  }

  .ava-input-form button[type='submit'] {
    background: #0f172a !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    padding: 9px 12px !important;
    cursor: pointer !important;
  }
  
  @media (max-width: 640px) {
    .ava-widget-root {
      right: 12px;
      left: auto;
      bottom: 72px; /* clears mobile footer nav / browser chrome */
    }

    .ava-launcher {
      width: auto; /* pill shape — not full width */
      max-width: calc(100vw - 24px);
    }

    .ava-panel {
      width: min(360px, calc(100vw - 24px));
      height: min(65vh, 500px); /* shorter so keyboard doesn't push it off screen */
      position: fixed;
      right: 12px;
      bottom: 130px; /* sits above the launcher button */
      margin-top: 0;
    }
  }