.wa-widget-root {
  --wa-navy: #001973;
  --wa-green: #25d366;
  --wa-green-dark: #1a9d52;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050;
  font-family: var(--default-font, 'Poppins', sans-serif);
}

.wa-widget-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: min(352px, calc(100vw - 32px));
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(0, 25, 115, 0.08);
  box-shadow:
    0 20px 50px rgba(0, 25, 115, 0.12),
    0 4px 16px rgba(37, 211, 102, 0.15);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
  pointer-events: none;
}

.wa-widget-root.is-open .wa-widget-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.wa-widget-header {
  position: relative;
  padding: 14px 48px 14px 16px;
  background: linear-gradient(160deg, var(--wa-navy) 0%, #0d47a1 55%, var(--wa-green-dark) 100%);
  color: #fff;
}

.wa-widget-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--wa-green), #7bed9f, var(--wa-green));
}

.wa-widget-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wa-widget-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}

.wa-widget-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.65rem;
  font-weight: 600;
  flex-shrink: 0;
}

.wa-widget-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7bed9f;
  box-shadow: 0 0 0 2px rgba(123, 237, 159, 0.35);
}

.wa-widget-header-close {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}

.wa-widget-header-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.wa-widget-list {
  list-style: none;
  margin: 0;
  padding: 12px 12px 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.wa-widget-item {
  margin-bottom: 8px;
}

.wa-widget-item:last-child {
  margin-bottom: 0;
}

.wa-widget-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e8ecf2;
  border-radius: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.wa-widget-link:hover {
  color: inherit;
  border-color: rgba(37, 211, 102, 0.45);
  box-shadow: 0 6px 18px rgba(0, 25, 115, 0.08);
  transform: translateY(-1px);
}

.wa-widget-avatar {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}

.wa-widget-avatar-img,
.wa-widget-avatar-initials {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.wa-widget-avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  background: linear-gradient(145deg, var(--wa-avatar-accent, var(--wa-navy)), #334155);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.wa-widget-avatar-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wa-green);
  color: #fff;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  line-height: 1;
}

.wa-widget-link-body {
  flex: 1;
  min-width: 0;
}

.wa-widget-link-label {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wa-navy);
  opacity: 0.75;
}

.wa-widget-link-title {
  margin: 0 0 3px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.35;
}

.wa-widget-link-phone {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.wa-widget-link-arrow {
  flex-shrink: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.wa-widget-link:hover .wa-widget-link-arrow {
  color: var(--wa-green);
  transform: translateX(2px);
}

.wa-widget-footer {
  padding: 10px 16px 14px;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #64748b;
  background: #fff;
}

.wa-widget-fab {
  position: relative;
  width: auto;
  min-width: 56px;
  height: 56px;
  padding: 0 18px 0 16px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: linear-gradient(135deg, var(--wa-green) 0%, var(--wa-green-dark) 100%);
  color: #fff;
  box-shadow:
    0 6px 20px rgba(37, 211, 102, 0.4),
    0 0 0 4px rgba(37, 211, 102, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-left: auto;
}

.wa-widget-fab:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 28px rgba(37, 211, 102, 0.45),
    0 0 0 4px rgba(37, 211, 102, 0.18);
}

.wa-widget-fab-label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.wa-widget-fab i {
  font-size: 1.5rem;
  line-height: 1;
}

.wa-widget-fab .wa-icon-close {
  display: none;
  font-size: 1.35rem;
}

.wa-widget-root.is-open .wa-widget-fab {
  min-width: 56px;
  width: 56px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wa-navy), #0d47a1);
  box-shadow: 0 6px 20px rgba(0, 25, 115, 0.35);
}

.wa-widget-root.is-open .wa-widget-fab .wa-icon-open,
.wa-widget-root.is-open .wa-widget-fab .wa-widget-fab-label {
  display: none;
}

.wa-widget-root.is-open .wa-widget-fab .wa-icon-close {
  display: block;
}

@media (max-width: 767px) {
  .wa-widget-root {
    bottom: 15px;
    right: 15px;
  }

  .wa-widget-panel {
    bottom: 70px;
  }

  .wa-widget-fab {
    min-width: 52px;
    height: 52px;
    padding: 0 14px 0 12px;
  }

  .wa-widget-fab-label {
    display: none;
  }

  .wa-widget-root.is-open .wa-widget-fab {
    width: 52px;
    min-width: 52px;
  }
}
