:root { --tdm-wa-clearance: 94px; }

.tdm-wa-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  z-index: 9999;
  text-decoration: none;
  transition: transform 0.2s ease;
  animation: tdmWaPulse 2s infinite;
}

.tdm-wa-float:hover { transform: scale(1.1); }
.tdm-wa-float:focus-visible { outline: 3px solid #0F4A52; outline-offset: 3px; }
.tdm-wa-float img { width: 32px; height: 32px; margin: 0; }

@keyframes tdmWaPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5), 0 0 0 16px rgba(37, 211, 102, 0); }
}

.tdm-contact-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.tdm-contact-action:not([hidden]) {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.tdm-contact-action:is(:hover, :active) { background: #ffffff26; }
.tdm-contact-action:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.tdm-contact-action-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c7f1e9;
  border-radius: 50%;
  background: #0f4a52;
  color: #fff;
}

.tdm-contact-action-icon-wa { background: #21774a; }

.tdm-footer-contact {
  display: flex;
  justify-content: center;
  column-gap: 20px;
  margin-bottom: 8px;
}

.tdm-footer-contact a,
.tdm-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.tdm-footer-contact .tdm-footer-contact-link {
  display: inline-grid;
  align-content: center;
  gap: 2px;
  line-height: 1.25;
}

.tdm-footer-contact-detail {
  color: #F2C4B6;
  font-size: 0.875em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.tdm-footer-contact a:is(:hover, :focus-visible),
.tdm-instagram:hover { text-decoration: underline; }
.tdm-footer-contact a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.tdm-instagram svg { flex: none; pointer-events: none; }

@media (max-width: 680px) {
  .tdm-footer { padding-inline: 16px; }

  .tdm-footer-contact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    justify-items: center;
    gap: 4px 8px;
  }
}

@media (max-width: 600px) {
  :root { --tdm-wa-clearance: 84px; }
  .tdm-wa-float { width: 56px; height: 56px; bottom: 18px; right: 18px; }
  .tdm-wa-float img { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .tdm-wa-float { animation: none; transition: none; }
}

/* ============ SELECTOR DE IDIOMA (ES | EN) ============ */
/* Mientras se aplica el inglés recordado se oculta la página un instante; si el script fallara, se muestra igualmente. */
.tdm-i18n-pending body { opacity: 0; animation: tdmI18nReveal 0s linear 1.2s forwards; }
@keyframes tdmI18nReveal { to { opacity: 1; } }

.tdm-lang {
  position: fixed;
  top: 6px;
  right: 14px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(253, 246, 238, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 74, 82, 0.16);
  box-shadow: 0 2px 10px rgba(15, 74, 82, 0.12);
  color: #0F4A52;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 1.2px;
  line-height: 1;
}
.tdm-lang span { opacity: 0.35; padding: 0 1px; }
.tdm-lang button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  margin: 0;
  min-width: 32px;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  opacity: 0.6;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.tdm-lang button:hover { opacity: 1; }
.tdm-lang button[aria-pressed="true"] {
  opacity: 1;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: #2AABAA;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.tdm-lang button:focus-visible { outline: 2px solid #0F4A52; outline-offset: 1px; opacity: 1; }

@media (max-width: 600px) {
  .tdm-lang { top: 5px; right: 8px; font-size: 0.72rem; }
  .tdm-lang button { min-width: 30px; min-height: 28px; padding: 0 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .tdm-lang button { transition: none; }
}
