.wa-widget {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999999;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wa-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.15);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  padding: 0;
  margin: 0;
  outline: none;
}

.wa-fab:hover {
  transform: scale(1.08);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.3),
    0 3px 8px rgba(0, 0, 0, 0.18);
  background: #20c05c;
}

.wa-fab:active {
  transform: scale(0.97);
}

.wa-fab-icon {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.wa-widget.wa-open .wa-fab-icon {
  transform: rotate(90deg) scale(0.85);
}

.wa-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 520px;
  max-width: calc(100vw - 30px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s;
  transform-origin: bottom right;
}

.wa-widget.wa-open .wa-panel {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.wa-panel-header {
  background: #20c968;
  color: #ffffff;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.wa-panel-header-text {
  flex: 1;
  min-width: 0;
}

.wa-panel-title {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.wa-panel-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
}

.wa-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  padding: 0;
  margin: 0;
  outline: none;
}

.wa-close:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(90deg);
}

.wa-panel-body {
  padding: 14px;
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
}

.wa-panel-body::-webkit-scrollbar {
  width: 6px;
}

.wa-panel-body::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 3px;
}

.wa-panel-body::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

.wa-contacts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.wa-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f7f9fa;
  text-decoration: none;
  color: inherit;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  border: 1px solid transparent;
  min-width: 0;
}

.wa-contact:hover {
  background: #eef7f1;
  border-color: #c8ecd6;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.15);
}

.wa-contact:active {
  transform: translateY(0);
}

.wa-contact-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35);
}

.wa-contact-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.wa-contact-info {
  min-width: 0;
  flex: 1;
}

.wa-contact-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1f2d33;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-contact-role {
  display: block;
  font-size: 12px;
  color: #7a8a91;
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .wa-widget {
    bottom: 18px;
    right: 15px;
  }

  .wa-panel {
    position: fixed;
    bottom: 88px;
    right: 15px;
    left: 15px;
    width: auto;
    max-width: none;
    border-radius: 14px;
  }

  .wa-panel-body {
    max-height: 55vh;
    padding: 12px;
  }

  .wa-contacts-grid {
    grid-template-columns: 1fr;
  }

  .wa-fab {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 360px) {
  .wa-panel-title {
    font-size: 16px;
  }

  .wa-panel-subtitle {
    font-size: 12px;
  }

  .wa-contact-name {
    font-size: 13px;
  }

  .wa-contact-role {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-panel,
  .wa-fab,
  .wa-fab-icon,
  .wa-contact,
  .wa-close {
    transition: none !important;
  }
}
