:root {
  --tsl-float-right: max(1rem, env(safe-area-inset-right));
  --tsl-float-bottom: max(1rem, env(safe-area-inset-bottom));
  --tsl-float-size: 58px;
}

.tsl-floating-menu-toggle,
.tsl-floating-whatsapp {
  position: fixed !important;
  z-index: 1080 !important;
  right: var(--tsl-float-right) !important;
  display: inline-grid !important;
  width: var(--tsl-float-size) !important;
  min-width: var(--tsl-float-size) !important;
  height: var(--tsl-float-size) !important;
  min-height: var(--tsl-float-size) !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: 18px !important;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 16px 38px rgba(7, 26, 53, 0.26) !important;
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease !important;
}

.tsl-floating-whatsapp {
  bottom: var(--tsl-float-bottom) !important;
  overflow: hidden !important;
  background: linear-gradient(145deg, #27c98d, #0aa66f) !important;
  font: 800 0.8rem/1 system-ui, sans-serif !important;
  letter-spacing: -0.02em !important;
}

.tsl-floating-whatsapp svg {
  width: 25px !important;
  height: 25px !important;
}

.tsl-floating-whatsapp span {
  display: none !important;
}

.tsl-floating-menu-toggle {
  bottom: calc(var(--tsl-float-bottom) + var(--tsl-float-size) + 0.7rem) !important;
  background: linear-gradient(145deg, rgba(11, 46, 93, 0.96), rgba(7, 26, 53, 0.96)) !important;
  cursor: pointer;
}

.tsl-floating-menu-toggle:hover,
.tsl-floating-whatsapp:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 20px 44px rgba(7, 26, 53, 0.32) !important;
}

.tsl-floating-menu-toggle:focus-visible,
.tsl-floating-whatsapp:focus-visible,
.tsl-mobile-drawer a:focus-visible,
.tsl-mobile-drawer button:focus-visible {
  outline: 3px solid #39a0ff !important;
  outline-offset: 4px !important;
}

.tsl-menu-icon {
  position: relative;
  width: 23px;
  height: 18px;
}

.tsl-menu-icon::before,
.tsl-menu-icon::after,
.tsl-menu-icon span {
  position: absolute;
  left: 0;
  width: 23px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  content: "";
  transition: transform 180ms ease, opacity 180ms ease, top 180ms ease;
}

.tsl-menu-icon::before { top: 1px; }
.tsl-menu-icon span { top: 8px; }
.tsl-menu-icon::after { top: 15px; }

.tsl-floating-menu-toggle[aria-expanded="true"] .tsl-menu-icon::before {
  top: 8px;
  transform: rotate(45deg);
}

.tsl-floating-menu-toggle[aria-expanded="true"] .tsl-menu-icon span {
  opacity: 0;
}

.tsl-floating-menu-toggle[aria-expanded="true"] .tsl-menu-icon::after {
  top: 8px;
  transform: rotate(-45deg);
}

.tsl-mobile-overlay {
  position: fixed;
  z-index: 1090;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  background: rgba(3, 13, 29, 0.54);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.tsl-mobile-overlay[data-open="true"] {
  visibility: visible;
  opacity: 1;
}

.tsl-mobile-drawer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 620px);
  max-height: min(86vh, 720px);
  margin-inline: auto;
  padding: 1.1rem max(1rem, env(safe-area-inset-right)) calc(1.1rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px 28px 0 0;
  color: #10233f;
  background:
    radial-gradient(circle at 88% 4%, rgba(121, 235, 207, 0.34), transparent 28%),
    rgba(250, 252, 255, 0.97);
  box-shadow: 0 -24px 70px rgba(3, 13, 29, 0.3);
  transform: translateY(106%);
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1);
}

.tsl-mobile-overlay[data-open="true"] .tsl-mobile-drawer {
  transform: translateY(0);
}

.tsl-mobile-drawer__head {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.tsl-mobile-drawer__eyebrow {
  display: block;
  margin-bottom: 0.2rem;
  color: #0b55bf;
  font: 800 0.7rem/1.2 system-ui, sans-serif;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.tsl-mobile-drawer h2 {
  margin: 0;
  color: #071a35;
  font: 800 clamp(1.35rem, 6vw, 1.75rem)/1.1 system-ui, sans-serif;
  letter-spacing: -0.035em;
}

.tsl-mobile-drawer__close {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid #cbd9e8;
  border-radius: 14px;
  color: #071a35;
  background: #fff;
  cursor: pointer;
  font: 500 1.45rem/1 system-ui, sans-serif;
}

.tsl-mobile-drawer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.tsl-mobile-drawer__links a {
  display: flex;
  min-height: 52px;
  align-items: center;
  padding: 0.8rem 0.85rem;
  border: 1px solid #dce7f2;
  border-radius: 14px;
  color: #183657;
  background: rgba(255, 255, 255, 0.86);
  font: 750 0.9rem/1.2 system-ui, sans-serif;
  text-decoration: none;
}

.tsl-mobile-drawer__links a:hover {
  border-color: #8ab9f2;
  color: #0b55bf;
  background: #f2f7ff;
}

.tsl-mobile-drawer__cta {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  margin-top: 0.8rem;
  padding: 0.9rem 1rem;
  border-radius: 15px;
  color: #fff !important;
  background: linear-gradient(135deg, #1268f3, #0b55bf);
  box-shadow: 0 12px 26px rgba(18, 104, 243, 0.24);
  font: 800 0.96rem/1.2 system-ui, sans-serif;
  text-decoration: none;
}

.tsl-menu-open {
  overflow: hidden !important;
}

@media (max-width: 899px) {
  body.tsl-floating-ready {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }

  .tsl-floating-ready .site-header .nav-toggle {
    display: none !important;
  }
}

@media (max-width: 379px) {
  :root { --tsl-float-size: 54px; }
  .tsl-mobile-drawer__links { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
  .tsl-floating-menu-toggle,
  .tsl-mobile-overlay {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tsl-floating-menu-toggle,
  .tsl-floating-whatsapp,
  .tsl-menu-icon::before,
  .tsl-menu-icon::after,
  .tsl-menu-icon span,
  .tsl-mobile-overlay,
  .tsl-mobile-drawer {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media print {
  .tsl-floating-menu-toggle,
  .tsl-floating-whatsapp,
  .tsl-mobile-overlay {
    display: none !important;
  }
}
