.storefront-right-dock .dock-item-service {
  font: inherit;
  cursor: pointer;
}

.storefront-chat-widget[hidden] {
  display: none !important;
}

@keyframes chatDrawerSlideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes chatStatusPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.storefront-chat-widget {
  position: fixed;
  z-index: calc(var(--z-floating-plane, 100) + 5);
  right: 86px;
  bottom: 24px;
  width: min(400px, calc(100vw - 32px));
  height: 590px;
  max-height: calc(100dvh - 90px);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #e6e8eb;
  overscroll-behavior: contain;
  animation: chatDrawerSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.storefront-chat-widget.has-modal-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  min-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  z-index: 100050 !important;
  animation: none !important;
  pointer-events: auto !important;
  overflow: hidden !important;
}

.storefront-chat-widget.has-modal-fullscreen .storefront-chat-widget__close-btn {
  display: none !important;
}

.storefront-chat-widget.has-modal-fullscreen .storefront-chat-widget__frame {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  background: transparent !important;
}

.storefront-chat-widget__header {
  height: 54px;
  flex: 0 0 54px;
  padding: 0 14px;
  background: #ffffff;
  border-bottom: 1px solid #ebebeb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
}

.storefront-chat-widget__header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.storefront-chat-widget__avatar {
  position: relative;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.storefront-chat-widget__avatar-badge {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #ff5000 0%, #ff6a00 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.3px;
  box-shadow: 0 2px 6px rgba(255, 80, 0, 0.2);
}

.storefront-chat-widget__status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #00b050;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 176, 80, 0.2);
  animation: chatStatusPulse 2s ease-in-out infinite;
}

.storefront-chat-widget__header-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  justify-content: center;
}

.storefront-chat-widget__title {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storefront-chat-widget__status {
  font-size: 11.5px;
  color: #666666;
  margin-top: 1px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.storefront-chat-widget__header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.storefront-chat-widget__new-btn {
  background: #fff3eb;
  border: 1px solid #ffd1b8;
  color: #ff5000;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}

.storefront-chat-widget__new-btn:hover {
  background: #ffe6d6;
  border-color: #ffc1a0;
}

.storefront-chat-widget__expand-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #666666;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.storefront-chat-widget__expand-btn:hover {
  background: #f2f3f5;
  color: #1d1d1f;
}

.storefront-chat-widget__close-btn {
  position: absolute;
  top: 11px;
  right: 12px;
  z-index: 50;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f2f3f5;
  color: #666666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  padding: 0;
}

.storefront-chat-widget__close-btn:hover {
  background: #e6e8eb;
  color: #1d1d1f;
}

.storefront-chat-widget iframe {
  width: 100%;
  height: 100%;
  flex: 1;
  border: 0;
  margin: 0;
  padding: 0;
  background: #ffffff;
  display: block;
}

@media (max-width: 700px) {
  .storefront-chat-widget {
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    animation: none !important;
    margin: 0 !important;
  }

  .storefront-chat-widget__close-btn {
    top: calc(11px + env(safe-area-inset-top, 0px));
  }

  .storefront-chat-widget iframe {
    height: 100% !important;
  }
}

.dock-chat-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand-orange, #ff5000);
  color: #ffffff;
  font-family: var(--font-accent, 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(255, 80, 0, 0.35);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

.dock-chat-badge.has-pulse {
  animation: chatBadgePulse 2s infinite;
}

@keyframes chatBadgePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 80, 0, 0.6); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(255, 80, 0, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 80, 0, 0); }
}
