/* ReachHawks Fix 01 SAFE — overrides only; no HTML reformatting. */
html,body{background-color:#ffffff}
/* Keep the original Chatwoot embed; move its launcher to bottom left. */
#chatwoot_live_chat_widget, .woot-widget-holder, .woot--bubble-holder, .rh-support-launcher[data-mode="website"]{position:fixed!important;left:18px!important;right:auto!important;bottom:18px!important;z-index:9999!important}
@media(max-width:640px){#chatwoot_live_chat_widget,.woot-widget-holder,.woot--bubble-holder,.rh-support-launcher[data-mode="website"]{left:12px!important;right:auto!important;bottom:12px!important}}
/* Only existing homepage feature section backgrounds, not cards or layout. */
body.rh-design-home #conversation-engine{background-color:#baddfe!important}
body.rh-design-home #integrations{background-color:#021d56!important}
/* Existing Hawk AI CTA: consistent dimensions; preserve decoration. */
body.rh-design-home #conversation-engine a[href="/hawk-ai"].rh-glass-control{box-sizing:border-box;min-height:48px}
body.rh-design-home #conversation-engine a[href="/hawk-ai"].rh-glass-control>.rh-button-label{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}
@media(max-width:639px){body.rh-design-home main>section:first-child a[href="/demo"],body.rh-design-home main>section:first-child a[href="/hawk-ai"]{text-align:center;justify-content:center}body.rh-design-home main>section:first-child a[href="/demo"] .rh-button-label,body.rh-design-home main>section:first-child a[href="/hawk-ai"] .rh-button-label{text-align:center}}

/* ReachHawks Fix 02 — mobile-only polish for homepage CTA, support bubble, and demo button. */
@media (max-width: 639px) {
  /* Hero CTA alignment */
  body.rh-design-home main > section:first-child .glass-button,
  body.rh-design-home main > section:first-child a[href="/hawk-ai"] {
    width: 100%;
    justify-content: center !important;
  }
  body.rh-design-home main > section:first-child .glass-button .button-text {
    display: inline-flex !important;
    width: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
  }
  body.rh-design-home main > section:first-child a[href="/hawk-ai"] > .rh-button-label {
    display: inline-flex !important;
    width: 100%;
    align-items: center;
    justify-content: center !important;
    text-align: center;
  }

  /* Conversation Engine first card: prevent the See Hawk AI CTA from being clipped on mobile */
  body.rh-design-home #conversation-engine .grid > div:first-child {
    height: auto !important;
    min-height: 680px;
  }
  body.rh-design-home #conversation-engine .grid > div:first-child > div:last-child {
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 1rem !important;
  }
  body.rh-design-home #conversation-engine .grid > div:first-child a[href="/hawk-ai"] {
    min-height: 44px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  body.rh-design-home #conversation-engine .grid > div:first-child a[href="/hawk-ai"] > .rh-button-label {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  /* Support / Chatwoot launcher: keep small and pinned bottom-left on mobile */
  .rh-support-launcher[data-mode="website"],
  #chatwoot_live_chat_widget,
  .woot-widget-holder,
  .woot--bubble-holder {
    left: 12px !important;
    right: auto !important;
    bottom: 12px !important;
  }
  .rh-support-launcher[data-mode="website"] {
    width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
  .rh-support-launcher[data-mode="website"] svg {
    width: 20px !important;
    height: 20px !important;
  }

  /* Cal.com floating Book a Demo button: smaller and cleaner on mobile */
  #cal-floating-button,
  .cal-floating-button,
  [id*="cal-floating"],
  [class*="cal-floating"] {
    right: 12px !important;
    left: auto !important;
    bottom: 12px !important;
    z-index: 950 !important;
  }
  #cal-floating-button button,
  .cal-floating-button button,
  [id*="cal-floating"] button,
  [class*="cal-floating"] button,
  button[aria-label*="Book a Demo"],
  button[title*="Book a Demo"] {
    min-height: 44px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 24px rgba(2, 29, 86, 0.14) !important;
  }
  #cal-floating-button svg,
  .cal-floating-button svg,
  [id*="cal-floating"] svg,
  [class*="cal-floating"] svg,
  button[aria-label*="Book a Demo"] svg,
  button[title*="Book a Demo"] svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* Remove stray dark overlay artifacts near the mobile floating CTA when present */
  #cal-floating-button::before,
  #cal-floating-button::after,
  .cal-floating-button::before,
  .cal-floating-button::after,
  [id*="cal-floating"]::before,
  [id*="cal-floating"]::after,
  [class*="cal-floating"]::before,
  [class*="cal-floating"]::after {
    box-shadow: none !important;
    background: transparent !important;
  }
}

/* ReachHawks mobile fix 03: isolated overrides; previous rules remain reversible */
@media (max-width: 639px) {
  /* Let the Hawk AI card follow its content, never force a 680px card. */
  body.rh-design-home #conversation-engine .grid > div:first-child {
    height: auto !important;
    min-height: 0 !important;
  }
  body.rh-design-home #conversation-engine .grid > div:first-child > div:nth-child(3) {
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    padding: 20px 20px 16px !important;
  }
  body.rh-design-home #conversation-engine .grid > div:first-child > div:nth-child(3) > div:first-child {
    flex-grow: 0 !important;
  }
  body.rh-design-home #conversation-engine .grid > div:first-child a[href="/hawk-ai"] {
    flex-shrink: 0;
    min-height: 42px;
  }

  /* Chat launcher: visible brand-blue circle + a crisp white chat glyph. */
  #rh-support-launcher.rh-support-launcher[data-mode="website"] {
    position: fixed !important;
    left: 12px !important;
    right: auto !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #0086fb !important;
    border: 1px solid #0086fb !important;
    color: white !important;
    overflow: visible;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10002 !important;
  }
  #rh-support-launcher.rh-support-launcher[data-mode="website"] > svg {
    display: none !important;
  }
  #rh-support-launcher.rh-support-launcher[data-mode="website"]::after {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M20.5 11.5a8.5 8.5 0 0 1-8.5 8.5 9 9 0 0 1-3.5-.7L3 21l1.7-5.5A8.5 8.5 0 1 1 20.5 11.5Z'/%3E%3Ccircle cx='8' cy='11.5' r='1' fill='white'/%3E%3Ccircle cx='12' cy='11.5' r='1' fill='white'/%3E%3Ccircle cx='16' cy='11.5' r='1' fill='white'/%3E%3C/svg%3E") !important;
    pointer-events: none;
  }
}

/* ReachHawks Mobile Fix 04 — Chatwoot icon appearance only */
@media (max-width: 639px) {
  #rh-support-launcher.rh-support-launcher[data-mode="website"] {
    background: #ffffff !important;
    border: 1px solid #d9e0e9 !important;
    color: #021d56 !important;
    box-shadow: 0 2px 8px rgba(2,29,86,.12) !important;
  }

  #rh-support-launcher.rh-support-launcher[data-mode="website"]::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23021d56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M20.5 11.5a8.5 8.5 0 0 1-8.5 8.5 9 9 0 0 1-3.5-.7L3 21l1.7-5.5A8.5 8.5 0 1 1 20.5 11.5Z'/%3E%3Ccircle cx='8' cy='11.5' r='1' fill='%23021d56'/%3E%3Ccircle cx='12' cy='11.5' r='1' fill='%23021d56'/%3E%3Ccircle cx='16' cy='11.5' r='1' fill='%23021d56'/%3E%3C/svg%3E") !important;
  }
}

/* ReachHawks Mobile Fix 05 — restore visible chat icon */
@media (max-width: 639px) {

  #rh-support-launcher.rh-support-launcher[data-mode="website"] {
    position: fixed !important;
    background-color: #ffffff !important;
    border: 1px solid #d9e0e9 !important;
    color: #021d56 !important;
  }

  /* Remove broken replacement graphic */
  #rh-support-launcher.rh-support-launcher[data-mode="website"]::after {
    content: none !important;
    background-image: none !important;
  }

  /* Restore original Chatwoot SVG */
  #rh-support-launcher.rh-support-launcher[data-mode="website"] svg {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 22px !important;
    height: 22px !important;
    fill: none !important;
    stroke: #021d56 !important;
    stroke-width: 2 !important;
  }

  #rh-support-launcher.rh-support-launcher[data-mode="website"] svg circle {
    fill: #021d56 !important;
    stroke: none !important;
  }
}

/* ReachHawks Mobile Fix 06 — Chatwoot window sizing only */
@media (max-width: 639px) {

  /* Chatwoot embedded window */
  #cw-widget-holder,
  .woot-widget-holder,
  iframe.woot-widget-bubble {
    position: fixed !important;
    width: 92vw !important;
    max-width: 390px !important;
    height: 75dvh !important;
    max-height: 650px !important;
    left: 4vw !important;
    right: auto !important;
    bottom: max(68px, env(safe-area-inset-bottom)) !important;
    top: auto !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    z-index: 99999 !important;
  }

  /* ReachHawks fallback support panel */
  #rh-support-panel {
    width: 92vw !important;
    max-width: 390px !important;
    max-height: 75dvh !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }
}


/* ReachHawks Support Loading Dialog Fix 07 */
@media (max-width: 639px) {
  #rh-support-panel {
    width: min(92vw, 350px) !important;
    max-height: 70dvh !important;
    padding: 20px !important;
    border-radius: 18px !important;
  }

  #rh-support-panel #rh-support-heading {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: #021d56 !important;
    font-size: 17px !important;
  }

  #rh-support-panel #rh-support-heading::before {
    content: "" !important;
    display: block !important;
    flex: 0 0 30px !important;
    width: 30px !important;
    height: 30px !important;
    background-color: #eef6ff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11.5a8 8 0 0 1-8 8 9 9 0 0 1-3.5-.7L3 21l1.7-5.5A8 8 0 1 1 20 11.5Z' fill='none' stroke='%23021d56' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='8' cy='11.5' r='1' fill='%23021d56'/%3E%3Ccircle cx='12' cy='11.5' r='1' fill='%23021d56'/%3E%3Ccircle cx='16' cy='11.5' r='1' fill='%23021d56'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 23px 23px !important;
    border-radius: 50% !important;
  }

  #rh-support-panel p[role="status"] {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #536476 !important;
  }
}
