/**
 * FloatingPublishButton Styles
 *
 * Uses !important to override any parent container styles
 * that might interfere with fixed positioning.
 */

.container {
  position: fixed !important;
  bottom: 1rem !important;
  right: 1rem !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 1rem !important;
}

.viewSiteButton {
  background-color: #fff;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  padding: calc(0.75rem - 1px) 1.5rem; /* Subtract border from padding for consistent height */
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  height: 44px;
  box-sizing: border-box;
}

.viewSiteButton:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.publishButton {
  background-color: #38bdf8;
  color: #0f172a;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  box-shadow: 0 10px 30px -12px rgba(14, 165, 233, 0.9);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  height: 44px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
}

.publishButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -15px rgba(14, 165, 233, 0.95);
}

.publishButton:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

.publishingButton {
  background-color: #9ca3af;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  height: 44px;
  box-sizing: border-box;
}

.publishedMessage {
  background-color: #16a34a;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 44px;
  box-sizing: border-box;
}

.errorContainer {
  background-color: #fef2f2;
  border: 1px solid #f87171;
  color: #991b1b;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  /* Bound width so the longer ZO-required message (#852) wraps into a tidy
     block in this fixed bottom-right overlay rather than one very wide bar,
     and stays on-screen on small viewports. */
  max-width: min(24rem, calc(100vw - 2rem));
}

.errorMessage {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.retryButton {
  background-color: #dc2626;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.retryButton:hover {
  background-color: #b91c1c;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
