/* ==========================================================================
   SHORELINE MEDICAL BILLING — FOOTER & GLOBAL ACTIONS COMPONENT SYSTEM
   Dedicated exclusively to Footer, Pre-Footer CTA, Newsletter, Modals & Back-To-Top
   Strictly complies with RULE[westyle.md] & RULE[section-spacing.md]
   ========================================================================== */

/* ── 15. FOOTER & GLOBAL ACTIONS COMPONENT ── */
/* ==========================================================================
   SHORELINE MEDICAL BILLING â€” FOOTER & GLOBAL ACTIONS COMPONENT SYSTEM
   Dedicated exclusively to Footer, CTA Strip, Newsletter, Modals & Back-To-Top
   Strictly complies with RULE[westyle.md] & RULE[section-spacing.md]
   ========================================================================== */

/* â”€â”€ 1. FOOTER MAIN CONTAINER & BACKGROUND HARMONY â”€â”€ */
footer,
.footer {
  background: linear-gradient(160deg, #0d3b6b 0%, #114870 35%, #0d5045 70%, #0a3d35 100%);
  color: rgba(255, 255, 255, 0.92);
  padding: 0;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: -160px;
  right: -120px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(24, 183, 201, 0.20) 0%, rgba(0, 143, 163, 0.08) 45%, transparent 70%);
  pointer-events: none;
}

footer::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -120px;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.10) 0%, rgba(0, 102, 179, 0.12) 40%, transparent 70%);
  pointer-events: none;
}

/* ── 2. PRE-FOOTER CTA STRIP ── */
.footer-cta-strip {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 0;
  position: relative;
  z-index: 2;
}

.footer-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-cta-inner h3 {
  color: #FFFFFF !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.22rem, 1.8vw, 1.48rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.footer-cta-inner h3 .accent {
  color: var(--color-accent) !important;
}

.footer-cta-inner p {
  color: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.92rem;
  margin: 4px 0 0;
  line-height: 1.5;
  font-weight: 500;
}

.footer-cta-btns {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer-cta-btns a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

/* Primary Button: Trust Blue with Cyan Glow */
.footer-cta-btns .btn-us-primary,
.footer-cta-btns .btn-fw,
.footer-cta-btn,
.btn-us-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%) !important;
  color: #FFFFFF !important;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 16px rgba(0, 54, 102, 0.35), 0 0 12px rgba(24, 183, 201, 0.25) !important;
}

.footer-cta-btns .btn-us-primary:hover,
.footer-cta-btns .btn-fw:hover,
.footer-cta-btn:hover,
.btn-us-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%) !important;
  box-shadow: 0 8px 26px rgba(0, 54, 102, 0.45), 0 0 18px rgba(24, 183, 201, 0.45) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.footer-cta-btns .btn-us-primary ion-icon,
.footer-cta-btns .btn-fw ion-icon,
.footer-cta-btns .btn-primary ion-icon,
.footer-cta-btn ion-icon {
  font-size: 1rem;
  color: #FFFFFF;
  filter: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  box-sizing: border-box;
  padding: 5px;
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Secondary Button: Frosted Glass Pill */
.footer-cta-btns .btn-fo {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  box-shadow: none !important;
}

.footer-cta-btns .btn-fo:hover {
  background: #FFFFFF !important;
  color: var(--color-primary) !important;
  border-color: #FFFFFF !important;
  transform: translateY(-2px);
}

.footer-cta-btns .btn-fo ion-icon {
  font-size: 1.1rem;
  color: var(--color-accent);
}

@media (max-width: 576px) {
  .footer-cta-btns {
    width: 100%;
    max-width: 420px;
    margin: 12px auto 0;
    gap: 8px;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .footer-cta-btns a {
    padding: 10px 14px;
    font-size: clamp(0.75rem, 3.2vw, 0.85rem);
    flex: 1 1 0;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .footer-cta-btns {
    gap: 6px;
  }

  .footer-cta-btns a {
    padding: 9px 8px;
    font-size: 0.72rem;
    gap: 4px;
  }
}

/* â”€â”€ 3. MAIN FOOTER AREA (EDGE-TO-EDGE FLUID DESKTOP LAYOUT) â”€â”€ */
footer .container,
.footer-main .container,
.footer-cta-strip .container,
.footer-news-strip .container {
  width: 100%;
  max-width: 94%;
  margin-inline: auto;
  padding-inline: clamp(16px, 2vw, 36px);
}

.footer-main {
  padding: 56px 0 0;
  position: relative;
  z-index: 1;
  width: 100%;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.45fr 1.15fr 1.15fr 1.2fr 1.2fr;
  gap: clamp(20px, 2.5vw, 48px);
  margin-bottom: 44px;
  width: 100%;
}

@media (min-width: 1400px) {
  .footer-cols {
    grid-template-columns: 1.45fr 1.15fr 1.15fr 1.25fr 1.25fr;
    gap: clamp(24px, 2.8vw, 56px);
  }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .footer-cols {
    grid-template-columns: 1.35fr 1.1fr 1.1fr 1.2fr 1.2fr;
    gap: 24px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .footer-col-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .footer-cols {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }

  .footer-col-brand {
    grid-column: auto;
  }
}

/* â”€â”€ 4. ADDRESS & CONTACT LIST (GOLD ICONS & ACCENT LINE) â”€â”€ */
.footer-address-list {
  display: flex;
  flex-direction: column;
}

.footer-address-list+.footer-address-list {
  margin-top: 32px;
}

.fal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 18px 0 !important;
  position: relative;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fal-title-flag {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.30);
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.fal-title:hover .fal-title-flag {
  transform: scale(1.18);
  box-shadow: 0 2px 8px rgba(24, 183, 201, 0.45);
}

.fal-title::after {
  content: '' !important;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--color-accent) !important;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(24, 183, 201, 0.75);
}

.fal-title::before {
  content: '' !important;
  position: absolute;
  bottom: 0;
  left: 42px;
  width: 8px;
  height: 3px;
  background: #FFFFFF !important;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
}

.fal-line {
  display: none !important;
}

.fal-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fal-item-last {
  border-bottom: none;
}

.fal-item i,
.fal-item ion-icon {
  color: #FBBF24 !important;
  font-size: 1.15rem;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease, filter 0.25s ease;
}

.fal-item:hover i,
.fal-item:hover ion-icon,
.fal-item i:hover,
.fal-item ion-icon:hover {
  transform: scale(1.28);
  color: #F59E0B !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.65));
}

.fal-item i:active,
.fal-item ion-icon:active {
  transform: scale(0.92);
}

.fal-flag-icon {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.30);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  display: block;
}

.fal-item:hover .fal-flag-icon {
  transform: scale(1.22);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.50);
}

.fca-flag-icon {
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 3px;
  margin-right: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.30);
  border: 1px solid rgba(255, 255, 255, 0.25);
  vertical-align: middle;
  display: inline-block;
}

.fal-item span,
.fal-item a {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88) !important;
  text-decoration: none;
  transition: var(--transition);
}

.fal-item a:hover {
  color: var(--color-accent) !important;
}

/* â”€â”€ 5. BRAND COLUMN, SOCIAL & HBMA ACCREDITATION â”€â”€ */
.footer-col-brand .footer-logo img {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.footer-col-brand p {
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.88rem;
  line-height: 1.75;
  margin: 18px 0 24px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF !important;
  font-size: 1.15rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-social a i,
.footer-social a ion-icon {
  color: #FFFFFF !important;
  font-size: 1.15rem;
  width: 18px;
  height: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a ion-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.footer-social a:hover {
  background: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  color: var(--color-text) !important;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 18px rgba(24, 183, 201, 0.45) !important;
}

.footer-social a:hover i,
.footer-social a:hover ion-icon {
  color: var(--color-text) !important;
  transform: scale(1.12);
}

.footer-col h5,
.footer-col h3,
.footer-col h4,
.footer-col .footer-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 18px 0 !important;
  position: relative;
  padding-bottom: 12px;
  display: block;
}

.footer-col .footer-heading-secondary {
  margin-top: 28px !important;
}

.footer-col h5::after,
.footer-col h3::after,
.footer-col h4::after,
.footer-col .footer-heading::after {
  content: '' !important;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 3px;
  background: var(--color-accent) !important;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(24, 183, 201, 0.75);
}

.footer-col h5::before,
.footer-col h3::before,
.footer-col h4::before,
.footer-col .footer-heading::before {
  content: '' !important;
  position: absolute;
  bottom: 0;
  left: 42px;
  width: 8px;
  height: 3px;
  background: #FFFFFF !important;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #ddd9d9 !important;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0.95;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  position: relative;
}

.footer-col ul li a:hover {
  color: #FFFFFF !important;
  opacity: 1;
  transform: translateX(4px);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6), 0 0 20px rgba(255, 255, 255, 0.2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-addr {
  padding: 0;
}

.footer-addr li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.86rem;
  padding: 8px 0;
  line-height: 1.6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.footer-addr li a {
  color: #FFFFFF;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.footer-addr li a:hover {
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(24, 183, 201, 0.45);
}

.footer-addr li:last-child {
  border-bottom: none;
}

.footer-addr li i {
  color: var(--color-accent);
  font-size: 0.95rem;
  margin-top: 3px;
  min-width: 16px;
}

.hbma-wrap {
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  margin-top: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

.hbma-wrap img {
  max-width: 110px;
  height: auto;
  border-radius: var(--radius-sm);
  opacity: 0.95;
}

.hbma-wrap p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.74rem;
  margin: 6px 0 0;
}

/* ── 6. NEWSLETTER STRIP & BOTTOM COPYRIGHT BAR ── */
.footer-news-strip {
  background: rgba(255, 255, 255, 0.05);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
}

.footer-news-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-right: 90px;
}

.footer-news-inner span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.footer-news-inner form {
  display: flex;
  gap: 10px;
  flex: 1;
  max-width: 420px;
}

.footer-news-inner input {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  font-size: 0.87rem;
  outline: none;
}

.footer-news-inner input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.footer-news-inner input:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 255, 0.12);
}

.footer-news-inner button {
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.87rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 102, 179, 0.35);
  transition: var(--transition);
  white-space: nowrap;
}

.footer-news-inner button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 102, 179, 0.48);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: #FFFFFF;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 90px 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
  text-decoration: none;
}

.footer-bottom-links a:hover {
  color: var(--color-primary);
}

/* ── RESPONSIVE MOBILE FOOTER & NEWSLETTER (<= 768px) ── */
@media (max-width: 768px) {
  .footer-main {
    padding: 44px 0 36px !important;
  }

  .footer-news-strip {
    padding: 32px 0 !important;
    margin-top: 14px !important;
  }

  .footer-news-inner {
    padding-right: 0 !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
  }

  .footer-news-inner span {
    display: block !important;
    text-align: center !important;
    white-space: normal !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    width: 100% !important;
    color: #FFFFFF !important;
  }

  .footer-news-inner span ion-icon {
    display: inline-block !important;
    vertical-align: -2px !important;
    font-size: 1.22rem !important;
    color: var(--color-accent) !important;
    margin-right: 6px !important;
  }

  .footer-news-inner form {
    width: 100% !important;
    max-width: 440px !important;
    display: flex !important;
    gap: 10px !important;
    margin: 0 auto !important;
  }

  .footer-news-inner input {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 12px 18px !important;
    font-size: 0.88rem !important;
  }

  .footer-news-inner button {
    flex-shrink: 0 !important;
    padding: 12px 24px !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
  }

  .footer-bottom {
    padding: 22px 16px calc(85px + env(safe-area-inset-bottom, 0px)) 16px !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .footer-bottom span {
    text-align: center !important;
    font-size: 0.80rem !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.70) !important;
    display: block !important;
    max-width: 380px !important;
    margin: 0 auto !important;
  }

  .footer-bottom-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px 14px !important;
    flex-wrap: wrap !important;
    padding: 0 8px !important;
    width: 100% !important;
  }

  .footer-bottom-links a {
    font-size: 0.80rem !important;
    padding: 3px 6px !important;
    color: rgba(255, 255, 255, 0.82) !important;
    transition: color 0.2s ease !important;
    white-space: nowrap !important;
  }

  .footer-bottom-links a:hover {
    color: var(--color-accent) !important;
  }

  #back-to-top {
    bottom: 16px !important;
    right: 16px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }

  #back-to-top .progress-ring {
    width: 42px !important;
    height: 42px !important;
  }

  .ai-fab-container {
    bottom: 66px !important;
    right: 14px !important;
    width: 46px !important;
    height: 46px !important;
  }

  .ai-fab-main {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
  }

  .ai-fab-main ion-icon,
  .ai-fab-main .fab-icon-open,
  .ai-fab-main .fab-icon-close {
    width: 24px !important;
    height: 24px !important;
    font-size: 24px !important;
  }
}

@media (max-width: 480px) {
  .footer-news-strip {
    padding: 28px 0 !important;
  }

  .footer-news-inner form {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .footer-news-inner button {
    width: 100% !important;
    padding: 12px 20px !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

/* â”€â”€ GLOBAL CLIPBOARD COPY TOAST NOTIFICATION â”€â”€ */
.copy-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #FFFFFF;
  color: var(--color-text);
  border: 1.5px solid var(--color-primary);
  box-shadow: 0 10px 30px rgba(0, 102, 179, 0.18), 0 2px 8px rgba(18, 48, 74, 0.08);
  border-radius: 50px;
  padding: 10px 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.copy-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.copy-toast i,
.copy-toast ion-icon {
  color: var(--color-success) !important;
  font-size: 1.1rem;
}

/* â”€â”€ 7. MODAL OVERLAY & BACK-TO-TOP BUTTON â”€â”€ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18, 48, 74, 0.5);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-head {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head h3 {
  color: #FFFFFF;
  font-size: 1.15rem;
  margin: 0;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #FFFFFF;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

.modal-body {
  padding: 24px;
}

.modal-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 102, 179, 0.35);
  transition: var(--transition);
}

.modal-submit:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 102, 179, 0.48);
}

#back-to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-primary);
  border: none;
  cursor: pointer;
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(0.85);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s, background 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 20px rgba(18, 48, 74, 0.10), 0 2px 6px rgba(0, 102, 179, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0;
}

#back-to-top.visible,
#back-to-top.show {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  background: #FFFFFF;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 10px 28px rgba(0, 102, 179, 0.25), 0 0 16px rgba(24, 183, 201, 0.35);
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.progress-ring-bg {
  stroke: rgba(0, 102, 179, 0.14);
}

.progress-ring-circle {
  stroke-linecap: round;
  transition: stroke-dashoffset 0.12s ease-out;
}

.back-to-top-icon {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, color 0.25s ease;
}

#back-to-top ion-icon,
#back-to-top i {
  font-size: 1.3rem;
  color: var(--color-primary);
  display: block;
  transition: transform 0.25s ease, color 0.25s ease;
}

#back-to-top:hover ion-icon,
#back-to-top:hover i {
  color: var(--color-secondary);
  transform: translateY(-2px);
}

@media (max-width: 640px) {

  .footer-cols,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-main {
    padding: 40px 0 24px;
  }

  .footer-col h5::after {
    display: none;
  }

  .footer-cta-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ── 8. PRACTICE SAVINGS CALCULATOR & GLOBAL FAB MODALS ── */
.fab-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 48, 74, 0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s;
}

.fab-modal-overlay.is-visible,
.fab-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Docked cleanly on desktop near the bottom right */
.fab-calc-overlay {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  z-index: 1000000 !important;
}

@media (min-width: 769px) {
  .fab-calc-overlay {
    align-items: flex-end !important;
    justify-content: flex-end !important;
    padding: 0 28px 28px 28px !important;
  }
}

.fab-modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(18, 48, 74, 0.24), 0 0 0 1px rgba(0, 102, 179, 0.08);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  transform: translateY(20px) scale(0.96);
  transform-origin: bottom right;
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.28s ease;
  max-height: min(720px, calc(100vh - 56px));
  display: flex;
  flex-direction: column;
}

.fab-modal-overlay.is-visible .fab-modal-box,
.fab-modal-overlay.active .fab-modal-box {
  transform: translateY(0) scale(1);
}

.fab-calc-modal-box {
  max-width: 440px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(18, 48, 74, 0.25), 0 0 0 1.5px rgba(0, 102, 179, 0.14);
}

.fab-modal-head {
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--color-background-soft) 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.fab-modal-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fab-modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #FFFFFF;
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 102, 179, 0.28);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.fab-modal-icon-badge ion-icon {
  color: #FFFFFF !important;
  font-size: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), filter 0.28s ease, color 0.28s ease;
}

.fab-modal-icon-badge:hover,
.fab-modal-head:hover .fab-modal-icon-badge {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 102, 179, 0.38);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
}

.fab-modal-icon-badge:hover ion-icon,
.fab-modal-head:hover .fab-modal-icon-badge ion-icon {
  color: #FFFFFF !important;
  transform: scale(1.12) rotate(-5deg);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.85));
}

.fab-modal-title h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-text) !important;
  margin: 0 0 2px 0;
  line-height: 1.2;
}

.fab-modal-subtitle {
  font-size: 0.78rem;
  color: var(--color-body-text);
  display: block;
  font-weight: 500;
}

.fab-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #FFFFFF;
  color: var(--color-text);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.fab-modal-close:hover {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
  transform: rotate(90deg);
}

.fab-modal-body {
  padding: 20px 22px 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

/* Custom Slim Scrollbar */
.fab-modal-body::-webkit-scrollbar {
  width: 5px;
}

.fab-modal-body::-webkit-scrollbar-track {
  background: var(--color-background-soft);
}

.fab-modal-body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
}

.fab-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary);
}

.fab-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.fab-calc-grid .full-col {
  grid-column: 1 / -1;
}

.fab-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fab-form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}

.fab-form-control {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-background-soft);
  font-size: 0.9rem;
  color: var(--color-text);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  font-weight: 500;
}

.fab-form-control:focus {
  border-color: var(--color-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.12);
  outline: none;
}

.fab-select-wrapper {
  position: relative;
}

.fab-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fab-range-badge {
  background: var(--color-background-soft);
  color: var(--color-primary);
  font-weight: 700;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  font-size: 0.8rem;
}

.fab-range-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
}

.fab-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  outline: none;
  cursor: pointer;
}

.fab-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 102, 179, 0.35);
  cursor: pointer;
  transition: transform 0.18s ease;
}

.fab-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.fab-range-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--color-body-text);
  font-weight: 500;
}

/* ── CALCULATE TRIGGER BUTTON ── */
.fab-calc-trigger-wrap {
  margin-top: 6px;
  margin-bottom: 6px;
}

.fab-calc-gate-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--color-background-soft);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  padding: 6px 14px;
  margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  color: var(--color-body-text);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 102, 179, 0.04);
  transition: all 0.25s ease;
}

.fab-calc-gate-hint ion-icon {
  font-size: 0.95rem;
  color: var(--color-accent);
}

.fab-calc-gate-hint.is-unlocked {
  background: rgba(39, 166, 111, 0.08);
  border-color: rgba(39, 166, 111, 0.3);
  color: var(--color-text);
}

.fab-calc-gate-hint.is-unlocked ion-icon {
  color: var(--color-success);
}

.fab-calc-trigger-btn {
  width: 100%;
  padding: 13px 20px;
  border: none;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(0, 102, 179, 0.28);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.fab-calc-trigger-btn ion-icon {
  font-size: 1.3rem;
  color: var(--color-accent);
  transition: transform 0.3s ease;
}

.fab-calc-trigger-btn:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 102, 179, 0.40);
}

.fab-calc-trigger-btn:hover ion-icon {
  transform: rotate(20deg) scale(1.15);
}

.fab-calc-trigger-btn i {
  transition: transform 0.2s ease;
}

.fab-calc-trigger-btn:hover i {
  transform: translateX(4px);
}

/* ── CELEBRATORY RESULT CARD & CONFETTI ── */
.fab-calc-result-wrapper {
  margin-top: 14px;
  position: relative;
}

.fab-calc-result-wrapper[hidden] {
  display: none !important;
}

@keyframes celebrationPop {
  0% {
    opacity: 0;
    transform: scale(0.88) translateY(18px);
  }

  50% {
    transform: scale(1.03) translateY(-4px);
  }

  75% {
    transform: scale(0.99) translateY(2px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes celebrationGlow {

  0%,
  100% {
    box-shadow: 0 12px 36px rgba(0, 102, 179, 0.18), 0 0 0 1px var(--color-border);
  }

  50% {
    box-shadow: 0 16px 44px rgba(0, 102, 179, 0.25), 0 0 24px rgba(24, 183, 201, 0.40), 0 0 0 1.5px var(--color-accent);
  }
}

.fab-calc-result-card {
  background: linear-gradient(135deg, var(--color-background-soft) 0%, rgba(24, 183, 201, 0.12) 100%);
  border: 1.5px solid var(--color-border);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fab-calc-result-card.is-celebrating {
  animation: celebrationPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, celebrationGlow 2.5s infinite ease-in-out;
}

.fab-confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

.calc-result-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.fab-calc-result-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  font-weight: 800;
  color: var(--color-primary);
  margin: 4px 0 4px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.calc-result-subtext {
  font-size: 0.78rem;
  color: var(--color-body-text);
  margin: 0 0 12px;
  line-height: 1.35;
}

.fab-calc-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.fab-calc-stat {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 8px 6px;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.calc-stat-label {
  font-size: 0.68rem;
  color: var(--color-body-text);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.calc-stat-val {
  font-size: 0.95rem;
  font-weight: 800;
}

.text-success {
  color: var(--color-success) !important;
}

.text-primary {
  color: var(--color-primary) !important;
}

.text-secondary {
  color: var(--color-secondary) !important;
}

.fab-calc-actions {
  display: flex;
}

.fab-calc-cta-btn {
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #FFFFFF !important;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 102, 179, 0.28);
  transition: all 0.25s ease;
}

.fab-calc-cta-btn:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 102, 179, 0.38);
}

.fab-calc-cta-btn i {
  transition: transform 0.2s ease;
}

.fab-calc-cta-btn:hover i {
  transform: translateX(4px);
}

@media (max-width: 480px) {
  .fab-calc-modal-box {
    max-width: 94vw;
  }

  .fab-calc-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .fab-modal-body {
    padding: 16px 16px 18px;
  }

  .fab-calc-stats-strip {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ── 9. FLOATING ACTION BUTTON (FAB) CONTROLS ── */
.ai-fab-container {
  position: fixed;
  bottom: 84px;
  right: 24px;
  z-index: 99990;
  display: flex;
  flex-direction: column-reverse;
  /* Main button at bottom, menu opens upwards */
  align-items: center;
  gap: 12px;
  width: 58px;
  height: 58px;
  pointer-events: none;
  /* Eliminates phantom hit-box line above button */
}

.ai-fab-container.is-open {
  height: auto;
  pointer-events: auto !important;
}

.ai-fab-main {
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #FFFFFF;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  box-shadow: 0 8px 28px rgba(0, 102, 179, 0.40);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 2;
  pointer-events: auto;
  /* Button itself remains clickable */
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
  animation: fabPulse 3s ease-in-out infinite;
}

.ai-fab-main:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 36px rgba(0, 102, 179, 0.50);
  animation-play-state: paused;
}

.ai-fab-main:active {
  transform: scale(0.96);
}

/* Icon toggle - Geometric Dead-Center Stacking */
.ai-fab-main ion-icon,
.ai-fab-main .fab-icon-open,
.ai-fab-main .fab-icon-close {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px !important;
  height: 32px !important;
  font-size: 32px !important;
  line-height: 1;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transform-origin: center center;
}

.ai-fab-main .fab-icon-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-fab-main .fab-icon-close {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) rotate(-90deg) scale(0.6);
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.28s;
}

.ai-fab-container.is-open .ai-fab-main .fab-icon-open {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) rotate(90deg) scale(0.6);
}

.ai-fab-container.is-open .ai-fab-main .fab-icon-close {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.ai-fab-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transform: translateY(16px) scale(0.95);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.22s ease, max-height 0.25s ease;
}

.ai-fab-container.is-open .ai-fab-menu {
  opacity: 1;
  visibility: visible;
  max-height: 350px;
  overflow: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto !important;
}

.ai-fab-item {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
  box-shadow: 0 4px 14px rgba(18, 48, 74, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: var(--transition);
  pointer-events: auto !important;
}

.ai-fab-item ion-icon {
  width: 22px !important;
  height: 22px !important;
  font-size: 22px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex-shrink: 0;
  pointer-events: none !important;
  transition: color 0.22s ease, transform 0.22s ease, filter 0.22s ease;
}

.ai-fab-main ion-icon svg,
.ai-fab-item ion-icon svg,
.ai-fab-item .icon-inner,
.ai-fab-main .icon-inner,
.ai-fab-item .icon-inner svg,
.ai-fab-main .icon-inner svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

.ai-fab-item:hover {
  background: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
  transform: scale(1.08) translateX(-3px);
}

.ai-fab-item:hover ion-icon,
.ai-fab-item:hover [class*="icon-color-"],
.ai-fab-item:focus ion-icon,
.ai-fab-item:focus [class*="icon-color-"] {
  color: #FFFFFF !important;
  transform: scale(1.12);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.75));
}

.ai-fab-item::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 54px;
  background: var(--color-text);
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-fab-item:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* ==========================================================================
   SHORELINE ASSISTANT CHATBOT COMPONENT (RULE[westyle.md] & RULE[code-quality.md])
   ========================================================================== */
.shoreline-chatbox {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 620px;
  max-height: calc(100dvh - 100px);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 102, 179, 0.16), 0 4px 16px rgba(18, 48, 74, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000005;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.28s;
  pointer-events: none;
}

body.chatbox-open .ai-fab-container,
body.chatbox-open #back-to-top,
body.calc-modal-open .ai-fab-container,
body.calc-modal-open #back-to-top,
body.modal-open .ai-fab-container,
body.modal-open #back-to-top,
.fab-modal-overlay.is-visible ~ .ai-fab-container,
.fab-modal-overlay.active ~ .ai-fab-container {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.85);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.shoreline-chatbox.is-active,
.shoreline-chatbox.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ── ASSISTANT CHATBOT MODAL ── */
.bot-header {
  background: linear-gradient(100deg, var(--color-primary) 0%, var(--color-secondary) 60%);
  color: #FFFFFF;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 102, 179, 0.22);
  flex-shrink: 0;
}

.bot-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-header-avatar,
.bot-avatar-badge {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-text) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.bot-header-avatar img,
.bot-avatar-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
  display: block;
}

.bot-header-meta h2,
.bot-header-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.bot-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.bot-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 6px rgba(39, 166, 111, 0.9);
}

.bot-status-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 500;
}

.bot-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.bot-header-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #FFFFFF !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bot-header-btn:hover {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--color-primary) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bot-header-btn:active {
  transform: scale(0.95);
}

.bot-header-btn ion-icon {
  font-size: 1.15rem;
  color: inherit !important;
  stroke-width: 36px;
  pointer-events: none !important;
}

.bot-messages-area {
  flex: 1;
  padding: 18px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-background);
  scroll-behavior: smooth;
}

.bot-messages-area::-webkit-scrollbar {
  width: 6px;
}

.bot-messages-area::-webkit-scrollbar-track {
  background: var(--color-background-soft);
}

.bot-messages-area::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 8px;
}

.bot-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: botFadeIn 0.25s ease forwards;
}

@keyframes botFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bot-msg-row.bot-msg {
  justify-content: flex-start;
}

.bot-msg-row.user-msg {
  justify-content: flex-end;
}

.bot-avatar-badge {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-text) 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  box-shadow: 0 3px 8px rgba(0, 102, 179, 0.25);
  flex-shrink: 0;
}

.bot-avatar-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.bot-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
  word-wrap: break-word;
}

.bot-bubble.bot-text {
  background: var(--color-background-soft);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-top-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 102, 179, 0.03);
}

.bot-bubble.bot-text a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bot-bubble.user-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #FFFFFF;
  border-top-right-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 102, 179, 0.2);
}

.bot-typing-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  background: var(--color-background-soft);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  border-top-left-radius: 4px;
  width: fit-content;
}

.bot-typing-dot {
  width: 7px;
  height: 7px;
  background: var(--color-secondary);
  border-radius: 50%;
  animation: botTypingBounce 1.3s infinite ease-in-out;
}

.bot-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--color-accent);
}

.bot-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--color-primary);
}

@keyframes botTypingBounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

.bot-options-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.bot-option-btn {
  width: 100%;
  padding: 9px 13px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  box-shadow: 0 2px 6px rgba(18, 48, 74, 0.04);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bot-opt-icon-wrap {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: transform 0.22s ease, background 0.22s ease;
  flex-shrink: 0;
}

.bot-opt-text {
  flex: 1;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  letter-spacing: -0.1px;
}

.bot-opt-arrow {
  font-size: 1.05rem;
  color: var(--color-body-text);
  opacity: 0.55;
  transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.bot-option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 179, 0.12);
  background: #FFFFFF;
}

.bot-option-btn:hover .bot-opt-icon-wrap {
  transform: scale(1.08);
}

.bot-option-btn:hover .bot-opt-arrow {
  transform: translateX(3px);
  opacity: 1;
}

.bot-option-btn:active {
  transform: scale(0.98);
}

.bot-option-btn * {
  pointer-events: none !important;
}

/* ── DOMAIN COLOR VARIANTS (RULE[icon-color-variety.md]) ── */
/* 1. Primary Blue (Services & Custom Pricing, Menu Return) */
.bot-option-btn.opt-primary {
  border-left: 3.5px solid var(--color-primary);
}
.bot-option-btn.opt-primary .bot-opt-icon-wrap {
  background: rgba(0, 102, 179, 0.08);
  color: var(--color-primary);
}
.bot-option-btn.opt-primary:hover {
  border-color: var(--color-primary);
}
.bot-option-btn.opt-primary:hover .bot-opt-arrow {
  color: var(--color-primary);
}

/* 2. Teal / Specialty (Careers & Job Openings) */
.bot-option-btn.opt-secondary {
  border-left: 3.5px solid var(--color-secondary);
}
.bot-option-btn.opt-secondary .bot-opt-icon-wrap {
  background: rgba(0, 143, 163, 0.10);
  color: var(--color-secondary);
}
.bot-option-btn.opt-secondary:hover {
  border-color: var(--color-secondary);
}
.bot-option-btn.opt-secondary:hover .bot-opt-arrow {
  color: var(--color-secondary);
}

/* 3. Cyan / Operations (Existing Customer Support Hub) */
.bot-option-btn.opt-accent {
  border-left: 3.5px solid var(--color-accent);
}
.bot-option-btn.opt-accent .bot-opt-icon-wrap {
  background: rgba(24, 183, 201, 0.12);
  color: #008FA3;
}
.bot-option-btn.opt-accent:hover {
  border-color: var(--color-accent);
}
.bot-option-btn.opt-accent:hover .bot-opt-arrow {
  color: #008FA3;
}

/* 4. Indigo / Tech & Analytics (Patient Billing Inquiry & Portal) */
.bot-option-btn.opt-indigo {
  border-left: 3.5px solid #6366F1;
}
.bot-option-btn.opt-indigo .bot-opt-icon-wrap {
  background: rgba(99, 102, 241, 0.10);
  color: #6366F1;
}
.bot-option-btn.opt-indigo:hover {
  border-color: #6366F1;
}
.bot-option-btn.opt-indigo:hover .bot-opt-arrow {
  color: #6366F1;
}

/* 5. Success / Green (Large Systems, Financial Growth) */
.bot-option-btn.opt-success {
  border-left: 3.5px solid var(--color-success);
}
.bot-option-btn.opt-success .bot-opt-icon-wrap {
  background: rgba(39, 166, 111, 0.10);
  color: var(--color-success);
}
.bot-option-btn.opt-success:hover {
  border-color: var(--color-success);
}
.bot-option-btn.opt-success:hover .bot-opt-arrow {
  color: var(--color-success);
}

.bot-input-area {
  padding: 12px 16px;
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bot-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.bot-input-control {
  flex: 1;
  height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-background-soft);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--color-text);
  transition: all 0.2s ease;
}

.bot-input-control:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(24, 183, 201, 0.18);
}

.bot-send-btn {
  height: 44px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border: none;
  border-radius: 10px;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.bot-send-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 179, 0.25);
}

.bot-error-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: #C0392B;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
}

.bot-summary-box {
  background: var(--color-background-soft);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-secondary);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--color-body-text);
}

.bot-summary-box strong {
  color: var(--color-text);
}

@media (max-width: 768px) {
  body.chatbox-open {
    overflow: hidden !important;
  }

  body.chatbox-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 48, 74, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1000000;
    opacity: 1;
    pointer-events: auto;
    animation: botBackdropFade 0.25s ease;
  }

  .shoreline-chatbox {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    height: 88dvh;
    max-height: 88dvh;
    border-radius: 22px 22px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    box-shadow: 0 -12px 40px rgba(18, 48, 74, 0.22);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, visibility 0.22s;
  }

  .shoreline-chatbox.is-active,
  .shoreline-chatbox.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Mobile Sheet Pull Handle Indicator */
  .shoreline-chatbox::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.55);
    z-index: 20;
    pointer-events: none;
  }

  .bot-header {
    padding: 16px 16px 12px 16px;
  }

  .bot-header-avatar,
  .bot-avatar-badge {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .bot-header-meta h2,
  .bot-header-title {
    font-size: 0.98rem;
  }

  .bot-header-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 10px;
    font-size: 1.25rem;
  }

  .bot-messages-area {
    padding: 14px 12px;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .bot-bubble {
    max-width: 88%;
    font-size: 0.88rem;
    padding: 10px 13px;
    line-height: 1.48;
  }

  .bot-option-btn {
    padding: 11px 13px;
    gap: 10px;
  }

  .bot-opt-icon-wrap {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }

  .bot-opt-text {
    font-size: 0.84rem;
  }

  .bot-input-area {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) 12px;
  }

  .bot-input-control {
    height: 44px;
    font-size: 16px; /* Prevents auto-zoom on iOS Safari */
    border-radius: 10px;
  }

  .bot-send-btn {
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 0.88rem;
  }
}

@keyframes botBackdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   10. SHORELINE INTERACTIVE 3D AI PET & MASCOT (RULE[westyle.md])
   ========================================================================== */

/* ── 1. MASCOT CONTAINER ── */
.shoreline-ai-pet-wrapper {
  position: fixed;
  bottom: 154px;
  right: 20px;
  width: 88px;
  height: 88px;
  z-index: 99980;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* Allows click-through outside active mascot hit area */
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
}

/* Hide Pet When Chatbox, Assessment, Calculator, or FAB Menu is Open */
body.chatbox-open .shoreline-ai-pet-wrapper,
body.calc-modal-open .shoreline-ai-pet-wrapper,
body.modal-open .shoreline-ai-pet-wrapper,
body.fab-open .shoreline-ai-pet-wrapper,
.fab-modal-overlay.is-visible ~ .shoreline-ai-pet-wrapper,
.fab-modal-overlay.active ~ .shoreline-ai-pet-wrapper,
.ai-fab-container.is-open ~ .shoreline-ai-pet-wrapper,
.shoreline-chatbox.is-active ~ .shoreline-ai-pet-wrapper,
.shoreline-chatbox.active ~ .shoreline-ai-pet-wrapper {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(14px) scale(0.8);
}

/* Minimized State */
.shoreline-ai-pet-wrapper.is-minimized {
  transform: scale(0.65) translateY(40px);
  opacity: 0.45;
}

.shoreline-ai-pet-wrapper.is-minimized:hover {
  opacity: 1;
  transform: scale(0.85) translateY(20px);
}

/* ── 2. PET CANVAS & INTERACTIVE STAGE ── */
.ai-pet-stage {
  position: relative;
  width: 88px;
  height: 88px;
  pointer-events: auto;
  cursor: pointer;
}

.ai-pet-canvas {
  width: 88px;
  height: 88px;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0, 102, 179, 0.22));
  transition: filter 0.25s ease;
}

.ai-pet-stage:hover .ai-pet-canvas {
  filter: drop-shadow(0 12px 24px rgba(24, 183, 201, 0.42));
}

/* Floating shadow beneath pet */
.ai-pet-shadow {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 44px;
  height: 9px;
  background: radial-gradient(ellipse at center, rgba(18, 48, 74, 0.22) 0%, rgba(18, 48, 74, 0) 72%);
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.ai-pet-stage:hover .ai-pet-shadow {
  transform: translateX(-50%) scale(1.18);
  opacity: 0.8;
}

/* ── 3. SMART CONTEXTUAL SPEECH BUBBLE (Left Aligned & Responsive) ── */
.ai-pet-speech-bubble {
  position: absolute;
  right: calc(100% + 14px);
  bottom: 8px;
  width: max-content;
  max-width: min(280px, calc(100vw - 120px));
  min-width: 200px;
  background: var(--color-background);
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(18, 48, 74, 0.14), 0 2px 8px rgba(0, 102, 179, 0.08);
  font-family: 'Inter', sans-serif;
  color: var(--color-text);
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px) scale(0.94);
  transform-origin: bottom right;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s;
  z-index: 20;
  box-sizing: border-box;
}

.ai-pet-speech-bubble.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

/* Speech Bubble Tail Pointing East Toward Mascot */
.ai-pet-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: 18px;
  right: -6px;
  width: 10px;
  height: 10px;
  background: var(--color-background);
  border-top: 1.5px solid var(--color-border);
  border-right: 1.5px solid var(--color-border);
  transform: rotate(45deg);
}

.ai-pet-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.ai-pet-bubble-header-left {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.ai-pet-bubble-header-left ion-icon {
  font-size: 0.85rem;
  color: var(--color-accent);
  flex-shrink: 0;
}

.ai-pet-bubble-title {
  white-space: nowrap;
}

.ai-pet-bubble-close {
  background: transparent;
  border: none;
  padding: 0 4px;
  margin: -3px -4px 0 0;
  color: var(--color-body-text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.ai-pet-bubble-close:hover {
  color: var(--color-text);
  background: var(--color-background-soft);
}

.ai-pet-bubble-body {
  margin: 0;
  padding: 0;
}

.ai-pet-bubble-text {
  color: var(--color-text);
  font-size: 0.80rem;
  line-height: 1.44;
  font-weight: 500;
  display: block;
  margin: 0;
  word-break: normal;
  overflow-wrap: break-word;
}

.ai-pet-bubble-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.74rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.ai-pet-bubble-cta ion-icon {
  font-size: 0.82rem;
  color: var(--color-accent);
  transition: transform 0.2s ease;
}

.ai-pet-speech-bubble:hover .ai-pet-bubble-cta {
  color: var(--color-secondary);
}

.ai-pet-speech-bubble:hover .ai-pet-bubble-cta ion-icon {
  transform: translateX(3px);
}

/* ── 4. CHARACTER SELECTOR & MICRO CONTROLS ── */
.ai-pet-controls-pill {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(18, 48, 74, 0.10);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  pointer-events: auto;
  z-index: 15;
  white-space: nowrap;
}

.shoreline-ai-pet-wrapper:hover .ai-pet-controls-pill,
.shoreline-ai-pet-wrapper.show-controls .ai-pet-controls-pill {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.ai-pet-char-btn {
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 50%;
  color: var(--color-body-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.ai-pet-char-btn svg {
  width: 15px;
  height: 15px;
  display: block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.ai-pet-char-btn:hover {
  background: var(--color-background-soft);
  color: var(--color-primary);
  transform: translateY(-1px) scale(1.1);
}

.ai-pet-char-btn.is-active {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(0, 102, 179, 0.35);
  transform: scale(1.08);
}

.ai-pet-char-btn.is-active svg {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

.ai-pet-char-btn[data-char="pip"].is-active svg {
  fill: #FFFFFF !important;
  stroke: none !important;
}

/* ── 5. ORGANIC SLEEP PARTICLES (ZZZ) ── */
.ai-pet-sleep-particles {
  position: absolute;
  top: -6px;
  right: 14px;
  pointer-events: none;
}

.ai-pet-zzz {
  position: absolute;
  font-family: 'Caveat', cursive, sans-serif;
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0;
  transform: translateY(0) scale(0.6);
  animation: zzzFloat 2.8s infinite ease-out;
}

.ai-pet-zzz:nth-child(1) {
  font-size: 0.85rem;
  animation-delay: 0s;
  right: 0;
}

.ai-pet-zzz:nth-child(2) {
  font-size: 1.15rem;
  animation-delay: 0.9s;
  right: -8px;
}

.ai-pet-zzz:nth-child(3) {
  font-size: 1.45rem;
  animation-delay: 1.8s;
  right: -16px;
}

@keyframes zzzFloat {
  0% {
    opacity: 0;
    transform: translate(0, 4px) scale(0.6);
  }
  20% {
    opacity: 0.9;
  }
  80% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translate(-14px, -32px) scale(1.2);
  }
}

/* ── 6. RESPONSIVE MEDIA QUERIES & ALL-DEVICE ADAPTATION ── */
@media (max-width: 768px) {
  .shoreline-ai-pet-wrapper {
    bottom: 120px !important;
    right: 10px !important;
    width: 54px !important;
    height: 54px !important;
  }

  .ai-pet-stage {
    width: 54px !important;
    height: 54px !important;
  }

  .ai-pet-canvas {
    width: 54px !important;
    height: 54px !important;
  }

  .ai-pet-shadow {
    width: 32px !important;
    height: 6px !important;
    bottom: 1px !important;
  }

  /* Contextual Speech Bubble Positions Elegantly Above Pet on Mobile */
  .ai-pet-speech-bubble {
    position: absolute !important;
    bottom: calc(100% + 10px) !important;
    right: 0 !important;
    left: auto !important;
    width: min(285px, calc(100vw - 26px)) !important;
    max-width: min(285px, calc(100vw - 26px)) !important;
    min-width: 0 !important;
    padding: 10px 14px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    transform: translateY(8px) scale(0.96) !important;
    transform-origin: bottom right !important;
    box-shadow: 0 10px 28px rgba(18, 48, 74, 0.16), 0 2px 8px rgba(0, 102, 179, 0.08) !important;
  }

  .ai-pet-speech-bubble.is-visible {
    transform: translateY(0) scale(1) !important;
  }

  /* Downward Speech Bubble Tail Pointing at Pet */
  .ai-pet-speech-bubble::after {
    top: auto !important;
    bottom: -6px !important;
    right: 18px !important;
    left: auto !important;
    width: 10px !important;
    height: 10px !important;
    background: var(--color-background) !important;
    border-top: none !important;
    border-left: none !important;
    border-bottom: 1.5px solid var(--color-border) !important;
    border-right: 1.5px solid var(--color-border) !important;
    transform: rotate(45deg) !important;
  }

  .ai-pet-bubble-header-left {
    font-size: 0.70rem !important;
  }

  .ai-pet-bubble-text {
    font-size: 0.78rem !important;
    line-height: 1.42 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }

  .ai-pet-bubble-cta {
    font-size: 0.72rem !important;
    margin-top: 5px !important;
  }

  .ai-pet-controls-pill {
    top: -26px !important;
    padding: 2px 5px !important;
    gap: 3px !important;
  }

  .ai-pet-char-btn {
    width: 22px !important;
    height: 22px !important;
    font-size: 0.74rem !important;
  }
}

@media (max-width: 480px) {
  #back-to-top {
    bottom: 14px !important;
    right: 14px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }

  #back-to-top .progress-ring {
    width: 40px !important;
    height: 40px !important;
  }

  .ai-fab-container {
    bottom: 62px !important;
    right: 12px !important;
    width: 44px !important;
    height: 44px !important;
  }

  .ai-fab-main {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  .ai-fab-main ion-icon,
  .ai-fab-main .fab-icon-open,
  .ai-fab-main .fab-icon-close {
    width: 22px !important;
    height: 22px !important;
    font-size: 22px !important;
  }

  .shoreline-ai-pet-wrapper {
    bottom: 114px !important;
    right: 9px !important;
    width: 50px !important;
    height: 50px !important;
  }

  .ai-pet-stage {
    width: 50px !important;
    height: 50px !important;
  }

  .ai-pet-canvas {
    width: 50px !important;
    height: 50px !important;
  }

  .ai-pet-shadow {
    width: 28px !important;
    height: 6px !important;
  }

  .ai-pet-speech-bubble {
    bottom: calc(100% + 8px) !important;
    right: 0 !important;
    width: min(270px, calc(100vw - 20px)) !important;
    max-width: min(270px, calc(100vw - 20px)) !important;
    padding: 9px 12px !important;
    border-radius: 12px !important;
  }

  .ai-pet-speech-bubble::after {
    bottom: -5px !important;
    right: 16px !important;
    width: 9px !important;
    height: 9px !important;
  }

  .ai-pet-bubble-text {
    font-size: 0.74rem !important;
    line-height: 1.38 !important;
  }

  .ai-pet-bubble-cta {
    font-size: 0.70rem !important;
  }
}

@media (max-width: 360px) {
  #back-to-top {
    bottom: 12px !important;
    right: 12px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
  }

  #back-to-top .progress-ring {
    width: 38px !important;
    height: 38px !important;
  }

  .ai-fab-container {
    bottom: 58px !important;
    right: 10px !important;
    width: 42px !important;
    height: 42px !important;
  }

  .ai-fab-main {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
  }

  .shoreline-ai-pet-wrapper {
    bottom: 108px !important;
    right: 8px !important;
    width: 46px !important;
    height: 46px !important;
  }

  .ai-pet-stage {
    width: 46px !important;
    height: 46px !important;
  }

  .ai-pet-canvas {
    width: 46px !important;
    height: 46px !important;
  }

  .ai-pet-shadow {
    width: 26px !important;
    height: 5px !important;
  }

  .ai-pet-speech-bubble {
    bottom: calc(100% + 6px) !important;
    right: 0 !important;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    padding: 8px 11px !important;
    border-radius: 10px !important;
  }

  .ai-pet-speech-bubble::after {
    bottom: -4px !important;
    right: 14px !important;
    width: 8px !important;
    height: 8px !important;
  }

  .ai-pet-bubble-text {
    font-size: 0.72rem !important;
    line-height: 1.34 !important;
  }

  .ai-pet-bubble-cta {
    font-size: 0.68rem !important;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .shoreline-ai-pet-wrapper {
    display: none !important;
  }
}
