/* Seq4Life Landing Page Chatbot Styles */

/* CSS Variables for brand colors */
:root {
    --chatbot-primary: #1A1262;
    --chatbot-secondary: #4F4987;
    --chatbot-accent: #8C89B1;
    --chatbot-light: #D1D0E0;
    --chatbot-bg-light: #f8f7fc;
    --chatbot-text: #374151;
    --chatbot-white: #ffffff;
  }
  
  /* Launcher Button - reset padding so it never gets extra padding from Tailwind/browser below 768px */
  .seq4life-chatbot-launcher {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%) !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(26, 18, 98, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    animation: chatbot-pulse 2s infinite !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 0 !important;
    padding-block: 0 !important;
    padding-inline: 0 !important;
    padding-block-start: 0 !important;
    padding-block-end: 0 !important;
    padding-inline-start: 0 !important;
    padding-inline-end: 0 !important;
  }
  
  .seq4life-chatbot-launcher:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(79, 73, 135, 0.4);
  }
  
  .seq4life-chatbot-launcher svg {
    width: 28px;
    height: 28px;
    color: white;
  }
  
  .seq4life-chatbot-launcher-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
  }
  
  @keyframes chatbot-pulse {
    0%, 100% {
      box-shadow: 0 4px 20px rgba(26, 18, 98, 0.3);
    }
    50% {
      box-shadow: 0 4px 30px rgba(79, 73, 135, 0.5);
    }
  }
  
  /* Popup */
  .seq4life-chatbot-popup {
    position: fixed !important;
    bottom: 96px !important;
    right: 24px !important;
    z-index: 99998 !important;
    max-width: 260px;
    padding: 12px 36px 12px 16px;
    background: var(--chatbot-white) !important;
    border: 1px solid var(--chatbot-light);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(26, 18, 98, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    pointer-events: none;
  }
  .seq4life-chatbot-popup.seq4life-chatbot-popup-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    pointer-events: auto;
  }
  .seq4life-chatbot-popup-text {
    font-family: "Open Sans", "Calibri", sans-serif;
    font-size: 14px;
    color: var(--chatbot-primary);
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
  }
  .seq4life-chatbot-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--chatbot-accent);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
  }
  .seq4life-chatbot-popup-close:hover {
    background: var(--chatbot-bg-light);
    color: var(--chatbot-primary);
  }
  
  /* Chat Panel */
  .seq4life-chatbot-panel {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 99999 !important;
    width: 400px !important;
    height: 550px !important;
    max-width: calc(100vw - 48px) !important;
    max-height: calc(100vh - 120px) !important;
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--chatbot-light) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(26, 18, 98, 0.25) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease !important;
    pointer-events: none;
    visibility: visible !important;
  }
  
  .seq4life-chatbot-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }
  
  /* Header */
  .seq4life-chatbot-header {
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
    padding: 16px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
  }
  
  .seq4life-chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  
  .seq4life-chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .seq4life-chatbot-avatar svg {
    width: 24px;
    height: 24px;
    color: white;
  }
  
  .seq4life-chatbot-avatar-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
  }
  
  .seq4life-chatbot-title {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
  }
  
  .seq4life-chatbot-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    margin: 2px 0 0 0;
  }
  
  .seq4life-chatbot-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }
  
  .seq4life-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
  }
  
  .seq4life-chatbot-close svg {
    width: 20px;
    height: 20px;
  }
  
  /* Messages Area */
  .seq4life-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: linear-gradient(180deg, var(--chatbot-bg-light) 0%, var(--chatbot-white) 100%);
  }
  
  .seq4life-chatbot-messages::-webkit-scrollbar {
    width: 6px;
  }
  
  .seq4life-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .seq4life-chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--chatbot-light);
    border-radius: 3px;
  }
  
  /* Welcome Screen */
  .seq4life-chatbot-welcome {
    text-align: center;
    padding: 6px 0;
  }
  
  .seq4life-chatbot-welcome-text {
    color: var(--chatbot-text);
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto 6px;
  }
  
  /* Suggestions */
  .seq4life-chatbot-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .seq4life-chatbot-suggestions-label {
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    color: var(--chatbot-accent);
    font-weight: 500;
    text-align: left;
    padding-left: 4px;
  }
  
  .seq4life-chatbot-suggestion {
    background: white;
    border: 1px solid var(--chatbot-light);
    border-radius: 12px;
    padding: 10px 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--chatbot-primary);
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }
  
  .seq4life-chatbot-suggestion:hover {
    background: var(--chatbot-bg-light);
    border-color: rgba(79, 73, 135, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  
  /* CTA Buttons Container */
  .seq4life-chatbot-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
  }
  
  /* CTA Button */
  .seq4life-chatbot-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(26, 18, 98, 0.2);
  }
  
  .seq4life-chatbot-cta:hover {
    opacity: 0.9;
    box-shadow: 0 6px 16px rgba(26, 18, 98, 0.3);
  }
  
  .seq4life-chatbot-cta svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }
  
  /* Secondary CTA Button (Contact Us) */
  .seq4life-chatbot-cta-secondary {
    background: transparent;
    border: 2px solid var(--chatbot-secondary);
    color: var(--chatbot-secondary);
    box-shadow: none;
  }
  
  .seq4life-chatbot-cta-secondary:hover {
    background: var(--chatbot-secondary);
    color: white;
    opacity: 1;
  }
  
  .seq4life-chatbot-cta-secondary:active {
    transform: translateY(-20px);
  }
  
  /* Message Bubbles */
  .seq4life-chatbot-message {
    display: flex;
    margin-bottom: 12px;
    animation: message-appear 0.3s ease;
  }
  
  @keyframes message-appear {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .seq4life-chatbot-message.user {
    justify-content: flex-end;
  }
  
  .seq4life-chatbot-message.assistant {
    justify-content: flex-start;
  }
  
  .seq4life-chatbot-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }
  
  .seq4life-chatbot-message.user .seq4life-chatbot-bubble {
    background: linear-gradient(135deg, var(--chatbot-primary) 0%, var(--chatbot-secondary) 100%);
    color: white;
    border-bottom-right-radius: 4px;
  }
  
  .seq4life-chatbot-message.assistant .seq4life-chatbot-bubble {
    background: white;
    color: var(--chatbot-primary);
    border: 1px solid var(--chatbot-light);
    border-bottom-left-radius: 4px;
  }
  
  /* Markdown in messages */
  .seq4life-chatbot-bubble h1,
  .seq4life-chatbot-bubble h2,
  .seq4life-chatbot-bubble h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--chatbot-primary);
    margin: 0 0 8px 0;
  }
  
  .seq4life-chatbot-bubble h1 { font-size: 18px; }
  .seq4life-chatbot-bubble h2 { font-size: 16px; }
  .seq4life-chatbot-bubble h3 { font-size: 14px; }
  
  .seq4life-chatbot-bubble p {
    margin: 0 0 8px 0;
  }
  
  .seq4life-chatbot-bubble p:last-child {
    margin-bottom: 0;
  }
  
  .seq4life-chatbot-bubble ul,
  .seq4life-chatbot-bubble ol {
    margin: 0 0 8px 0;
    padding-left: 20px;
  }
  
  .seq4life-chatbot-bubble li {
    margin-bottom: 4px;
  }
  
  .seq4life-chatbot-bubble a {
    color: var(--chatbot-secondary);
    text-decoration: underline;
  }
  
  .seq4life-chatbot-bubble a:hover {
    color: var(--chatbot-primary);
  }
  
  .seq4life-chatbot-bubble strong {
    font-weight: 600;
  }
  
  .seq4life-chatbot-bubble code {
    background: var(--chatbot-bg-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--chatbot-secondary);
  }
  
  /* Loading Indicator */
  .seq4life-chatbot-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--chatbot-accent);
    font-size: 14px;
  }
  
  .seq4life-chatbot-loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--chatbot-light);
    border-top-color: var(--chatbot-secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  /* Input Area */
  .seq4life-chatbot-input-area {
    padding: 16px;
    border-top: 1px solid var(--chatbot-light);
    background: white;
    flex-shrink: 0;
  }
  
  .seq4life-chatbot-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--chatbot-bg-light);
    border: 1px solid var(--chatbot-light);
    border-radius: 24px;
    padding: 8px 12px;
    transition: all 0.2s ease;
  }
  
  .seq4life-chatbot-input-container:focus-within {
    border-color: var(--chatbot-secondary);
    box-shadow: 0 0 0 3px rgba(79, 73, 135, 0.1);
  }
  
  .seq4life-chatbot-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--chatbot-primary);
    outline: none;
  }
  
  .seq4life-chatbot-input::placeholder {
    color: var(--chatbot-accent);
  }
  
  .seq4life-chatbot-send {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--chatbot-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }
  
  .seq4life-chatbot-send:hover:not(:disabled) {
    background: var(--chatbot-primary);
  }
  
  .seq4life-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .seq4life-chatbot-send svg {
    width: 16px;
    height: 16px;
    color: white;
  }
  
  /* Quick Links (shown during conversation) */
  .seq4life-chatbot-quick-links {
    display: flex;
    gap: 8px;
    margin-top: 12px;
  }
  
  .seq4life-chatbot-quick-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    font-family: 'Open Sans', sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: white;
    background: var(--chatbot-secondary);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
  }
  
  .seq4life-chatbot-quick-link-btn:hover {
    background: var(--chatbot-primary);
  }
  
  .seq4life-chatbot-quick-link-btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
  }
  
  .seq4life-chatbot-quick-link-secondary {
    background: transparent;
    border: 1px solid var(--chatbot-secondary);
    color: var(--chatbot-secondary);
  }
  
  .seq4life-chatbot-quick-link-secondary:hover {
    background: var(--chatbot-secondary);
    color: white;
  }
  
  .seq4life-chatbot-quick-link-secondary:active {
    transform: translateY(-10px);
  }
  
  /* Prevent any extra padding on launcher below 768px (Tailwind/browser button styles) */
  @media (max-width: 768px) {
    .seq4life-chatbot-launcher {
      padding: 0 !important;
      padding-block: 0 !important;
      padding-inline: 0 !important;
      padding-block-start: 0 !important;
      padding-block-end: 0 !important;
      padding-inline-start: 0 !important;
      padding-inline-end: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
    }
  }

  /* Mobile Responsive */
  @media (max-width: 480px) {
    .seq4life-chatbot-panel {
      width: calc(100vw - 32px);
      height: calc(100vh - 100px);
      bottom: 16px;
      right: 16px;
      border-radius: 20px;
    }
  
    .seq4life-chatbot-launcher {
      bottom: 16px;
      right: 16px;
      width: 56px;
      height: 56px;
    }
  
    .seq4life-chatbot-launcher svg {
      width: 24px;
      height: 24px;
    }
  
    .seq4life-chatbot-launcher-img {
      width: 38px;
      height: 38px;
    }
  }
  
  /* Hidden state */
  .seq4life-chatbot-hidden {
    display: none !important;
  }