/* 1. Completely hide and remove the scroll-to-top button */
#scroll-top {
   display: none !important;
   visibility: hidden !important;
   opacity: 0 !important;
   pointer-events: none !important;
}

/* 2. Floating Widget Wrapper */
.ai-floating-widget-wrapper {
   position: fixed;
   bottom: 24px;
   right: 24px;
   z-index: 999999;
   display: flex;
   align-items: center;
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* 3. Speech Bubble Tooltip */
.ai-bubble-tooltip {
   background: #ffffff;
   color: #1a202c;
   padding: 8px 14px;
   border-radius: 8px;
   box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
   margin-right: 12px;
   cursor: pointer;
   position: relative;
   white-space: nowrap;
   user-select: none;
   display: flex;
   align-items: center;
   transition: all 0.25s ease;
   border: 1px solid rgba(0, 0, 0, 0.06);
}
.ai-bubble-tooltip::after {
   content: '';
   position: absolute;
   right: -7px;
   top: 50%;
   transform: translateY(-50%);
   border-width: 6px 0 6px 8px;
   border-style: solid;
   border-color: transparent transparent transparent #ffffff;
}
.ai-bubble-tooltip:hover {
   transform: translateX(-3px);
   box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}
.ai-bubble-text {
   font-size: 13.5px;
   font-weight: 700;
   color: #111827;
   letter-spacing: -0.2px;
}

/* 4. Circular Floating Button */
.ai-trigger-circle {
   width: 56px;
   height: 56px;
   border-radius: 50%;
   background: #ff7e14;
   border: none;
   outline: none;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   box-shadow: 0 6px 20px rgba(255, 126, 20, 0.45);
   transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
   position: relative;
   padding: 0;
   flex-shrink: 0;
}
.ai-trigger-circle:hover {
   transform: scale(1.05);
   box-shadow: 0 8px 24px rgba(255, 126, 20, 0.6);
}
.ai-trigger-circle .ai-icon-robot {
   display: flex;
   align-items: center;
   justify-content: center;
}
.ai-trigger-circle .ai-icon-close {
   display: none;
   align-items: center;
   justify-content: center;
}

/* When Modal is Open */
.ai-floating-widget-wrapper.is-open .ai-trigger-circle .ai-icon-robot {
   display: none;
}
.ai-floating-widget-wrapper.is-open .ai-trigger-circle .ai-icon-close {
   display: flex;
}
.ai-floating-widget-wrapper.is-open .ai-bubble-tooltip {
   display: none;
}

/* 5. Popup Modal - Compact Width & Sits Cleanly Above Button */
.ai-modal-popup {
   position: absolute;
   bottom: 74px;
   right: 0;
   width: 280px;
   max-width: calc(100vw - 32px);
   background: #ffffff;
   border-radius: 16px;
   box-shadow: 0 10px 35px rgba(0, 0, 0, 0.26);
   border: 1px solid rgba(0, 0, 0, 0.08);
   overflow: hidden;
   display: flex;
   flex-direction: column;
   opacity: 0;
   visibility: hidden;
   transform: translateY(12px) scale(0.96);
   transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
   pointer-events: none;
}
.ai-floating-widget-wrapper.is-open .ai-modal-popup {
   opacity: 1;
   visibility: visible;
   transform: translateY(0) scale(1);
   pointer-events: auto;
}

/* 6. Solid Royal Blue Header */
.ai-modal-blue-header {
   background: #1565c0;
   padding: 14px 16px;
}
.ai-modal-header-text {
   color: #ffffff;
   font-size: 13px;
   font-weight: 600;
   line-height: 1.34;
   margin: 0;
}

/* 7. Modal Content Area */
.ai-modal-content-area {
   padding: 13px 14px 15px;
   background: #ffffff;
   display: flex;
   flex-direction: column;
}

/* 8. 3 Circular Avatars Row */
.ai-avatars-row {
   display: flex;
   align-items: center;
   gap: 12px;
   margin-bottom: 13px;
}
.ai-avatar-link {
   text-decoration: none !important;
   display: inline-block;
   transition: transform 0.2s ease;
}
.ai-avatar-link:hover {
   transform: translateY(-2px);
}
.ai-avatar-circle {
   width: 44px;
   height: 44px;
   border-radius: 50%;
   border: 1.5px solid #e2e8f0;
   display: flex;
   align-items: center;
   justify-content: center;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
   overflow: hidden;
   background: #ffffff;
}
.ai-brand-img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   border-radius: 50%;
   display: block;
}

/* 9. Prompt Box */
.ai-prompt-container {
   border: 1.5px solid #dbeafe;
   border-radius: 12px;
   padding: 12px 14px;
   background: #ffffff;
   box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
   margin-bottom: 12px;
}
.ai-prompt-top-row {
   display: flex;
   align-items: center;
   margin-bottom: 7px;
}
.ai-prompt-badge-label {
   color: #1565c0;
   font-size: 11.5px;
   font-weight: 800;
   letter-spacing: 0.6px;
}
.ai-prompt-display-text {
   color: #1e293b;
   font-size: 12.5px;
   line-height: 1.44;
   margin: 0 0 12px 0;
   font-weight: 400;
}

/* 10. Solid Black Copy Button */
.ai-black-copy-btn {
   background: #000000;
   color: #ffffff;
   border: none;
   border-radius: 8px;
   width: 100%;
   padding: 9px 0;
   font-size: 13.5px;
   font-weight: 700;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 6px;
   transition: all 0.2s ease;
}
.ai-black-copy-btn:hover {
   background: #222222;
}
.ai-black-copy-btn.copied {
   background: #16a34a !important;
}
.ai-copy-icon {
   font-size: 14px;
}
.ai-role-switch-wrap {
   text-align: center;
   margin-top: 8px;
}
.ai-role-link {
   font-size: 10.5px;
   color: #1565c0;
   text-decoration: underline !important;
   cursor: pointer;
   font-weight: 600;
}
.ai-role-link:hover {
   color: #0d47a1;
}

/* 11. Small Disclaimer Under Prompt Card */
.ai-bottom-disclaimer {
   font-size: 9px;
   line-height: 1.34;
   color: #64748b;
   margin: 0;
   padding: 0 2px;
}

/* Mobile Responsive - Width is controlled so it doesn't take over the screen */
@media (max-width: 576px) {
   .ai-floating-widget-wrapper {
      bottom: 20px;
      right: 18px;
   }
   .ai-trigger-circle {
      width: 52px;
      height: 52px;
   }
   .ai-trigger-circle svg {
      width: 28px;
      height: 28px;
   }
   .ai-bubble-tooltip {
      padding: 7px 11px;
      margin-right: 8px;
   }
   .ai-bubble-text {
      font-size: 12.5px;
   }
   /* Kept around 260px on mobile so it doesn't look wide */
   .ai-modal-popup {
      position: absolute;
      bottom: 68px;
      right: 0;
      left: auto;
      width: 260px;
      max-width: calc(100vw - 32px);
   }
}