.floating-widget {
  position: fixed;
  z-index: 1000;
  top: 50%;
  right: 0;
  display: grid;
  width: 65px;
  height: 200px;
  grid-template-rows: 70px 59px 71px;
  border: 2px solid #fae984;
  border-right: 0;
  border-radius: 15px 0 0 15px;
  background: #fdf7d3;
  box-shadow: 0 0 0 6px rgba(205, 161, 48, 0.055);
  overflow: hidden;
  transform: translateY(-50%);
  transition: width 0.26s ease, background 0.26s ease;
}

.floating-widget:hover,
.floating-widget:focus-within {
  width: 221px;
  background: #ffffff;
}

.floating-widget-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: #2d2d2d;
  font-family: "Poppins", Arial, sans-serif;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  transition: background 0.2s ease, padding 0.26s ease, justify-content 0.26s ease;
}

.floating-widget-link + .floating-widget-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2px;
  right: 0;
  height: 1px;
  background: #fae984;
}

.floating-widget-link:hover,
.floating-widget-link:focus-visible {
  background: rgba(250, 233, 132, 0.28);
}

.floating-widget-link:focus-visible {
  outline: 2px solid #cda130;
  outline-offset: -5px;
}

.floating-widget img {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
}

.floating-widget-desktop-label {
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: width 0.26s ease, opacity 0.18s ease;
}

.floating-widget-mobile-title,
.floating-widget-mobile-label {
  display: none;
}

.floating-widget:hover .floating-widget-link,
.floating-widget:focus-within .floating-widget-link {
  gap: 14px;
  justify-content: flex-start;
  padding-left: 18px;
}

.floating-widget:hover .floating-widget-desktop-label,
.floating-widget:focus-within .floating-widget-desktop-label {
  width: 145px;
  opacity: 1;
  transition-delay: 0.08s;
}

@media (max-width: 767px) {
  body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom));
  }

  .floating-widget {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: calc(75px + env(safe-area-inset-bottom));
    grid-template-columns: 100fr 100fr 84fr 91fr;
    grid-template-rows: 75px;
    border: 0;
    border-top: 2px solid #fae984;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
    background: #ffffffd4;
    backdrop-filter: blur(18px);
    box-shadow: 0 0 0 6px rgba(205, 161, 48, 0.055);
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%);
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .floating-widget.is-mobile-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .floating-widget:hover,
  .floating-widget:focus-within {
    width: 100vw;
    background: #ffffff;
  }

  .floating-widget-mobile-title {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #101010;
    font-family: "Poppins-SemiBold", "Poppins", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
  }

  .floating-widget-link {
    flex-direction: column;
    gap: 3px;
    padding: 0;
    color: #101010;
    font-family: "Poppins", Arial, sans-serif;
    font-size: 12px;
    line-height: 17px;
  }

  .floating-widget:hover .floating-widget-link,
  .floating-widget:focus-within .floating-widget-link {
    gap: 3px;
    justify-content: center;
    padding-left: 0;
  }

  .floating-widget-link + .floating-widget-link::before {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 1px;
    height: auto;
  }

  .floating-widget-phone::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1px;
    background: #fae984;
  }

  .floating-widget-whatsapp::before {
    display: none;
  }

  .floating-widget-phone {
    order: 4;
  }

  .floating-widget-whatsapp {
    order: 2;
  }

  .floating-widget-online {
    order: 3;
  }

  .floating-widget-desktop-label {
    display: none;
  }

  .floating-widget-mobile-label {
    display: block;
    width: auto;
    opacity: 1;
    overflow: visible;
  }

  .floating-widget img {
    width: 32px;
    height: 32px;
  }
}
