.mathar-float {
  --mathar-float-size: 44px;
  --mathar-float-gap: 6px;
  --mathar-float-career-height: 136px;
  --mathar-float-mobile-bottom: 32px;
  --mathar-float-consent-offset: 0px;
  --mathar-float-duration: 220ms;
  position: fixed;
  inset: 50% 0 auto auto;
  z-index: 8;
  width: var(--mathar-float-size);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--mathar-float-gap);
  transform: translateY(-50%);
  pointer-events: none;
  font-family: Outfit, system-ui, sans-serif;
}

.mathar-float .mathar-float__link {
  position: relative;
  display: grid;
  align-items: center;
  width: var(--mathar-float-size);
  min-height: var(--mathar-float-size);
  min-width: var(--mathar-float-size);
  overflow: hidden;
  interpolate-size: allow-keywords;
  border-radius: 6px 0 0 6px;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-decoration: none;
  transform: translateX(-6px);
  transition: width var(--mathar-float-duration), opacity var(--mathar-float-duration),
    transform var(--mathar-float-duration), visibility 0s var(--mathar-float-duration);
}

.mathar-float .mathar-float__link[data-visible] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}

.mathar-float .mathar-float__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 2px var(--mathar-ink, #10243a);
}

.mathar-float .mathar-float__phone {
  height: var(--mathar-float-size);
  background: #254473;
}

.mathar-float__icon {
  position: absolute;
  right: 12px;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--mathar-icon-phone) center / contain no-repeat;
  mask: var(--mathar-icon-phone) center / contain no-repeat;
}

.mathar-float .mathar-float__career {
  height: var(--mathar-float-career-height);
  background: var(--mathar-red, #d9001a);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
}

.mathar-float__vertical {
  position: absolute;
  top: 50%;
  right: calc(var(--mathar-float-size) / 2);
  width: calc(var(--mathar-float-career-height) - 12px);
  transform: translate(50%, -50%) rotate(-90deg);
  text-align: center;
  overflow-wrap: anywhere;
}

.mathar-float__number,
.mathar-float__details {
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--mathar-float-duration);
}

.mathar-float__number {
  justify-self: end;
  margin: 0 42px 0 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.mathar-float__details {
  display: grid;
  gap: 5px;
  padding-inline: 14px;
  overflow-wrap: anywhere;
  font-weight: 400;
  font-size: 13px;
}

.mathar-float__details strong {
  font-size: 16px;
  font-weight: 600;
}

.mathar-float__more { font-weight: 600; }

.mathar-float .mathar-float__phone[data-visible]:focus-visible { width: max-content; }
.mathar-float .mathar-float__career[data-visible]:focus-visible { width: 192px; }
.mathar-float .mathar-float__link[data-visible]:focus-visible :is(.mathar-float__number, .mathar-float__details) {
  visibility: visible;
  opacity: 1;
}
.mathar-float .mathar-float__career[data-visible]:focus-visible .mathar-float__vertical { visibility: hidden; }

@media (hover: hover) and (pointer: fine) {
  .mathar-float .mathar-float__phone[data-visible]:hover { width: max-content; }
  .mathar-float .mathar-float__career[data-visible]:hover { width: 192px; }
  .mathar-float .mathar-float__link[data-visible]:hover :is(.mathar-float__number, .mathar-float__details) {
    visibility: visible;
    opacity: 1;
  }
  .mathar-float .mathar-float__career[data-visible]:hover .mathar-float__vertical { visibility: hidden; }
}

@media (max-width: 767px) {
  .mathar-float {
    --mathar-float-career-height: 130px;
    inset: auto env(safe-area-inset-right, 0px)
      calc(var(--mathar-float-mobile-bottom) + var(--mathar-float-consent-offset) + env(safe-area-inset-bottom, 0px)) auto;
    transform: none;
  }
  .mathar-float .mathar-float__career { font-size: 13px; }
}

body:has(dialog[open], [aria-modal="true"]:not([hidden], [aria-hidden="true"]), .mathar-header-final .mobile_nav.opened)
  .mathar-float { display: none; }

@media (prefers-reduced-motion: reduce) {
  .mathar-float { --mathar-float-duration: 0s; }
}
