/* Ameen Steels - AI Chatbot Styles */
/* Root Container */
  #ameen-ai-chatbot-root {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1030;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  }

  /* 1. Launcher Button (Matching User Circular Headset + AI Badge Design) */
  .ameen-chatbot-launcher {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  .ameen-chatbot-launcher:hover {
    transform: scale(1.08);
  }
  .launcher-circle {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0b63ce 0%, #004fb0 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(11, 99, 206, 0.45), 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
  }
  .launcher-icon-main {
    font-size: 1.65rem;
    color: #ffffff;
    transition: transform 0.25s ease;
  }
  .launcher-icon-close {
    display: none;
    font-size: 1.55rem;
    color: #ffffff;
  }
  .ai-pill-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #00b87c;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    padding: 3.5px 7.5px;
    border-radius: 12px;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }
  .launcher-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2.5px solid #0b63ce;
    animation: launcherPulseAnim 2.2s infinite ease-out;
    pointer-events: none;
  }
  @keyframes launcherPulseAnim {
    0% { transform: scale(1); opacity: 0.9; }
    100% { transform: scale(1.55); opacity: 0; }
  }

  /* When Chat is Active / Open */
  #ameen-ai-chatbot-root.chat-active .launcher-circle {
    background: linear-gradient(135deg, #0b3b75 0%, #082952 100%);
    box-shadow: 0 8px 25px rgba(11, 59, 117, 0.45);
  }
  #ameen-ai-chatbot-root.chat-active .launcher-icon-main {
    display: none;
  }
  #ameen-ai-chatbot-root.chat-active .launcher-icon-close {
    display: block;
  }
  #ameen-ai-chatbot-root.chat-active .launcher-pulse {
    display: none;
  }

  /* 2. Dialog Window */
  .ameen-chatbot-dialog {
    position: fixed;
    bottom: 90px;
    left: 25px;
    width: 385px;
    max-width: calc(100vw - 40px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(11, 59, 117, 0.22), 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #dce8f8;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1040;
    animation: dialogSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
  }
  @keyframes dialogSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Header */
  .ameen-chatbot-header {
    background: linear-gradient(135deg, #0b3b75 0%, #082952 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #f97316;
  }
  .chatbot-avatar {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f97316;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
  }
  .status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border: 2px solid #0b3b75;
    border-radius: 50%;
  }
  .online-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
  }
  .btn-chat-action {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .btn-chat-action:hover {
    background: #f97316;
    color: #ffffff;
  }

  /* Subbar */
  .ameen-chatbot-subbar {
    background: #f1f6fd;
    padding: 6px 14px;
    font-size: 0.73rem;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
  }
  .subbar-wa-link {
    color: #0b3b75;
    text-decoration: none;
    font-weight: 600;
  }
  .subbar-wa-link:hover {
    color: #25d366;
  }

  /* Messages Area */
  .ameen-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #fafcff;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .ameen-chatbot-messages::-webkit-scrollbar {
    width: 5px;
  }
  .ameen-chatbot-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
  }

  /* Bubbles */
  .chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 86%;
    animation: msgFadeIn 0.25s ease-out;
  }
  @keyframes msgFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .msg-bubble {
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
    word-break: break-word;
  }
  .msg-time {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 3px;
    padding: 0 4px;
  }

  /* Bot Bubble */
  .bot-msg {
    align-self: flex-start;
  }
  .bot-msg .msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  }
  .bot-msg .msg-bubble a {
    color: #0b57d0;
    font-weight: 600;
    text-decoration: underline;
  }
  .bot-msg .msg-bubble ul, .bot-msg .msg-bubble ol {
    margin: 6px 0 0 16px;
    padding: 0;
  }

  /* User Bubble */
  .user-msg {
    align-self: flex-end;
  }
  .user-msg .msg-bubble {
    background: #0b3b75;
    color: #ffffff;
    border-top-right-radius: 3px;
  }
  .user-msg .msg-time {
    text-align: right;
  }

  /* Suggestion Chips */
  .chat-suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
  }
  .chip-btn {
    background: #ffffff;
    color: #0b3b75;
    border: 1px solid #c7d9f2;
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  }
  .chip-btn:hover {
    background: #0b3b75;
    color: #ffffff;
    border-color: #0b3b75;
    transform: translateY(-1px);
  }

  /* Typing Indicator */
  .ameen-typing-indicator {
    padding: 8px 14px;
    background: #fafcff;
    display: flex;
    align-items: center;
    gap: 4px;
    border-top: 1px solid #f1f5f9;
  }
  .typing-dot {
    width: 6px;
    height: 6px;
    background: #0b3b75;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
  }
  .typing-dot:nth-child(1) { animation-delay: -0.32s; }
  .typing-dot:nth-child(2) { animation-delay: -0.16s; }
  @keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
  }

  /* Footer */
  .ameen-chatbot-footer {
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
  }
  .input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    padding: 3px 6px 3px 14px;
    transition: border-color 0.2s ease;
  }
  .input-wrap:focus-within {
    border-color: #0b57d0;
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.12);
  }
  #ameenChatInput {
    border: none;
    background: transparent;
    padding: 6px 0;
    font-size: 0.85rem;
    box-shadow: none;
    color: #1e293b;
  }
  #ameenChatInput:focus {
    outline: none;
  }
  .btn-send {
    background: #f97316;
    color: #ffffff;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  .btn-send:hover {
    background: #ea580c;
    transform: scale(1.05);
  }
  .footer-powered-by {
    text-align: center;
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 6px;
  }

  /* Responsive Adjustments for Mobile */
  @media (max-width: 576px) {
    #ameen-ai-chatbot-root {
      bottom: 20px;
      left: 15px;
    }
    .launcher-circle {
      width: 52px;
      height: 52px;
    }
    .launcher-icon-main {
      font-size: 1.45rem;
    }
    .ai-pill-badge {
      font-size: 0.65rem;
      padding: 2.5px 6.5px;
      top: -3px;
      right: -3px;
    }
    .ameen-chatbot-dialog {
      bottom: 75px;
      left: 10px;
      right: 10px;
      width: calc(100vw - 20px);
      height: calc(100vh - 95px);
      max-height: 520px;
      border-radius: 16px;
    }
  }
