/* Floating contact + translate — flashusdt-software.xyz */
.floating-tools {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  pointer-events: none;
}
.floating-tools > * { pointer-events: auto; }

.float-dock {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 0.65rem;
  max-width: calc(100vw - 1.5rem);
}

.float-address-card {
  background: rgba(12, 11, 10, 0.92);
  border: 1px solid rgba(196, 165, 116, 0.35);
  color: #f7f3ec;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-width: min(16.5rem, calc(100vw - 5.5rem));
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
}
.float-address-card strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c4a574;
  font-weight: 600;
}
.float-address-card p { margin: 0 0 0.25rem; color: rgba(247, 243, 236, 0.88); }
.float-address-card a { color: #d8c2a0; text-decoration: none; }
.float-address-card a:hover { color: #fff; }
.float-address-card .float-wallet {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(196, 165, 116, 0.2);
  word-break: break-all;
  font-size: 0.68rem;
  color: rgba(247, 243, 236, 0.65);
}

.float-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.translate-float,
.float-pill {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.translate-float:hover,
.float-pill:hover { transform: translateY(-2px); }

.translate-float {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(145deg, #c4a574, #8a6d3f);
  color: #0c0b0a;
}
.float-pill {
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.float-pill-wa {
  background: #25d366;
  color: #06210f !important;
}
.float-pill-contact {
  background: #181818;
  color: #f7f3ec;
  border: 1px solid rgba(196, 165, 116, 0.35);
}
.float-pill svg { flex: 0 0 auto; display: block; }

.float-contact { position: relative; }
.float-contact .contact-menu-list {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 220px;
  padding: 0.55rem;
  background: rgba(12, 11, 10, 0.96);
  border: 1px solid rgba(196, 165, 116, 0.28);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.float-contact.open .contact-menu-list,
.float-contact[data-contact-menu].open .contact-menu-list { display: flex; }
.float-contact .contact-menu-list a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: #f7f3ec;
  text-decoration: none;
  font-size: 0.82rem;
}
.float-contact .contact-menu-list a:hover { background: rgba(196, 165, 116, 0.12); }
.float-contact .contact-menu-list small {
  display: block;
  color: rgba(247, 243, 236, 0.55);
  font-size: 0.7rem;
}

.translate-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.45);
  z-index: 1198;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: auto;
}
.translate-backdrop.open { opacity: 1; visibility: visible; }

.translate-panel {
  position: fixed;
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 7.5rem);
  right: max(1rem, env(safe-area-inset-right));
  width: min(320px, calc(100vw - 2rem));
  max-height: min(420px, 70vh);
  background: #121110;
  border: 1px solid rgba(196, 165, 116, 0.28);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  z-index: 1201;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  overflow: hidden;
  color: #f7f3ec;
  pointer-events: auto;
}
.translate-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.translate-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(196, 165, 116, 0.18);
  background: rgba(196, 165, 116, 0.08);
}
.translate-panel-head strong { font-size: 0.9rem; }
.translate-panel-head button {
  background: none;
  border: 0;
  color: rgba(247, 243, 236, 0.7);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.translate-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.75rem;
  max-height: calc(min(420px, 70vh) - 3.25rem);
  overflow-y: auto;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(196, 165, 116, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: #f7f3ec;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
}
.lang-option:hover,
.lang-option.active {
  border-color: #c4a574;
  background: rgba(196, 165, 116, 0.12);
}
.lang-flag { font-size: 1rem; line-height: 1; }

.goog-te-banner-frame,
.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* Hide legacy pills when new float is present */
body:has(#floatingTools) .wx-float { display: none !important; }

@media (max-width: 640px) {
  .float-dock { flex-direction: column; align-items: flex-end; }
  .float-address-card { max-width: min(18rem, calc(100vw - 2rem)); }
  .float-pill span { display: none; }
  .float-pill { width: 52px; height: 52px; padding: 0; border-radius: 50%; }
  .translate-panel {
    right: 0.75rem;
    bottom: calc(max(0.75rem, env(safe-area-inset-bottom)) + 12rem);
    width: calc(100vw - 1.5rem);
  }
}
