.plh-widget,
.plh-widget * {
  box-sizing: border-box;
}

.plh-widget {
  --plh-size: 62px;
  --plh-bottom: 24px;
  --plh-side: 24px;
  position: fixed;
  z-index: 99999;
  bottom: calc(var(--plh-bottom) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.plh-widget[hidden] {
  display: none !important;
}

.plh-widget.is-right {
  right: var(--plh-side);
  left: auto;
  align-items: flex-end;
}

.plh-widget.is-left {
  left: var(--plh-side);
  right: auto;
  align-items: flex-start;
}

.plh-menu {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 12px;
  padding: 0;
}

.plh-widget.is-open .plh-menu {
  display: flex;
}

.plh-widget.is-right .plh-menu {
  align-items: flex-end;
}

.plh-widget.is-left .plh-menu {
  align-items: flex-start;
}

.plh-widget a.plh-item,
.plh-widget button.plh-launcher {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--plh-size);
  height: var(--plh-size);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}

.plh-widget button.plh-launcher {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  width: var(--plh-size);
  height: var(--plh-size);
  box-shadow: none !important;
}

.plh-face {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--plh-size);
  height: var(--plh-size);
  border-radius: 50%;
  overflow: hidden;
  background: var(--plh-color, #111827);
  color: var(--plh-icon, #fff);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
  transition: transform 0.15s ease;
}

.plh-item:hover .plh-face,
.plh-launcher:hover .plh-face {
  transform: translateY(-2px);
}

.plh-face svg {
  width: 58% !important;
  height: 58% !important;
  max-width: none !important;
  display: block;
}

.plh-icon,
.plh-x {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.plh-x {
  display: none;
}

.plh-widget.is-open .plh-icon {
  display: none;
}

.plh-widget.is-open .plh-x {
  display: flex;
}

.plh-face img,
.plh-icon img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  border: 0;
  border-radius: 50%;
  display: block;
}

.plh-tip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.15s ease;
}

.plh-widget.is-right .plh-tip {
  right: calc(100% + 12px);
  left: auto;
}

.plh-widget.is-left .plh-tip {
  left: calc(100% + 12px);
  right: auto;
}

.plh-item:hover .plh-tip,
.plh-item:focus-visible .plh-tip {
  opacity: 1;
}

.plh-item:focus-visible .plh-face,
.plh-launcher:focus-visible .plh-face {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #2563eb, 0 8px 22px rgba(0, 0, 0, 0.22);
}

@media (prefers-reduced-motion: reduce) {
  .plh-face,
  .plh-tip {
    transition: none;
  }

  .plh-item:hover .plh-face,
  .plh-launcher:hover .plh-face {
    transform: none;
  }
}

@media print {
  .plh-widget {
    display: none !important;
  }
}
