/* Support Contact Widget Styles */

.support-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
}

/* Main Support Button */
.support-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  position: relative;
}

.support-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.support-button svg {
  width: 28px;
  height: 28px;
  stroke: white;
  fill: none;
}

/* Pulse animation */
.support-button::before {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #3b82f6;
  animation: support-pulse 2s infinite;
  z-index: -1;
}

@keyframes support-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

/* Tooltip */
.support-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8125rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  pointer-events: none;
}

.support-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #333;
}

.support-widget:not(.open):hover .support-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Support Popup */
.support-popup {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 360px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
  overflow: hidden;
}

.support-widget.open .support-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Popup Header */
.support-header {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  padding: 20px;
  color: white;
  position: relative;
}

.support-header-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.support-avatar {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.support-info {
  flex: 1;
}

.support-info h4 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.support-info p {
  margin: 6px 0 0;
  font-size: 0.8125rem;
  opacity: 0.9;
  line-height: 1.4;
}

.support-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.support-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.support-close svg {
  width: 16px;
  height: 16px;
  stroke: white;
}

/* Popup Body */
.support-body {
  padding: 20px;
  background: #f8fafc;
}

/* Form styles */
.support-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  position: relative;
}

.support-form input,
.support-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #1f2937;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  transition: all 0.2s;
  outline: none;
}

.support-form input:focus,
.support-form textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.support-form input.valid,
.support-form textarea.valid {
  border-color: #10b981;
}

.support-form input.invalid,
.support-form textarea.invalid {
  border-color: #ef4444;
}

.support-form input::placeholder,
.support-form textarea::placeholder {
  color: #9ca3af;
}

.support-form textarea {
  resize: none;
  min-height: 100px;
}

.form-error {
  display: none;
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
  padding-left: 4px;
}

/* Submit button */
.support-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.support-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.support-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.support-submit-btn svg {
  width: 18px;
  height: 18px;
}

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

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

/* Success message */
.support-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 16px;
}

.support-success h4 {
  margin: 0;
  font-size: 1.25rem;
  color: #1f2937;
}

.support-success p {
  margin: 8px 0 20px;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.support-new-btn {
  padding: 10px 20px;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.support-new-btn:hover {
  background: #e5e7eb;
}

/* Responsive */
@media (max-width: 480px) {
  .support-widget {
    bottom: 16px;
    right: 16px;
  }
  
  .support-popup {
    width: calc(100vw - 32px);
    right: 0;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
  
  .support-button {
    width: 54px;
    height: 54px;
  }
  
  .support-button::before {
    width: 54px;
    height: 54px;
  }
  
  .support-button svg {
    width: 24px;
    height: 24px;
  }
  
  .support-tooltip {
    display: none;
  }
  
  .support-header {
    padding: 16px;
  }
  
  .support-body {
    padding: 16px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .support-popup {
    background: #1f2937;
  }
  
  .support-body {
    background: #111827;
  }
  
  .support-form input,
  .support-form textarea {
    background: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
  }
  
  .support-form input:focus,
  .support-form textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  }
  
  .support-form input::placeholder,
  .support-form textarea::placeholder {
    color: #6b7280;
  }
  
  .support-success h4 {
    color: #f3f4f6;
  }
  
  .support-success p {
    color: #9ca3af;
  }
  
  .support-new-btn {
    background: #374151;
    color: #f3f4f6;
  }
  
  .support-new-btn:hover {
    background: #4b5563;
  }
}
