.xhr-floating-language,
.xhr-floating-contact {
  position: fixed;
  right: 18px;
  z-index: 70;
  box-sizing: border-box;
  border: 1px solid rgba(203, 213, 225, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #0f172a;
  font-family: Inter, Arial, "Microsoft YaHei", sans-serif;
}

.xhr-floating-language {
  top: 88px;
  width: 74px;
  padding: 8px;
}

.xhr-floating-language__label {
  margin: 0 0 7px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.xhr-floating-language__buttons {
  display: grid;
  gap: 6px;
}

.xhr-floating-language button {
  min-height: 34px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #1e293b;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.xhr-floating-language button.active,
.xhr-floating-language button.current,
.xhr-floating-language button.is-active {
  border-color: #f59e0b;
  background: #f59e0b;
  color: #111827;
}

.xhr-floating-contact {
  bottom: 20px;
  width: 178px;
  padding: 10px;
}

.xhr-floating-contact__title {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1;
}

.xhr-floating-contact__grid {
  display: grid;
  gap: 7px;
}

.xhr-floating-contact a,
.xhr-floating-contact button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  width: 100%;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.xhr-floating-contact a:first-child {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.xhr-floating-contact a:last-child {
  border-color: #f59e0b;
  background: #f59e0b;
  color: #111827;
}

.xhr-floating-toast {
  position: fixed;
  right: 18px;
  bottom: 194px;
  z-index: 90;
  max-width: 260px;
  border-radius: 8px;
  background: #102238;
  color: #fff;
  padding: 10px 12px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .24);
  font: 800 13px/1.35 Inter, Arial, "Microsoft YaHei", sans-serif;
}

@media (max-width: 820px) {
  .xhr-floating-language {
    top: auto;
    right: 8px;
    bottom: 74px;
    width: auto;
    max-width: calc(100vw - 16px);
    padding: 7px;
  }

  .xhr-floating-language__label {
    display: none;
  }

  .xhr-floating-language__buttons {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
    gap: 5px;
  }

  .xhr-floating-language button {
    min-height: 38px;
    padding: 0 8px;
  }

  .xhr-floating-contact {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    padding: 7px 8px max(7px, env(safe-area-inset-bottom));
  }

  .xhr-floating-contact__title {
    display: none;
  }

  .xhr-floating-contact__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .xhr-floating-contact a,
  .xhr-floating-contact button {
    min-height: 44px;
    padding: 0 3px;
    font-size: 12px;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
  }

  body {
    padding-bottom: 62px;
  }

  .xhr-floating-toast {
    left: 12px;
    right: 12px;
    bottom: 128px;
    max-width: none;
    text-align: center;
  }
}
