/**
 * Feedback Widget Styles
 */

/* Floating button */
.feedback-floating-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

.feedback-floating-button:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}

.feedback-floating-button svg {
  flex-shrink: 0;
}

.feedback-button-close {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-button-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.feedback-button-close svg {
  color: white;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .feedback-floating-button {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .feedback-floating-button span {
    display: none;
  }
}

/* Modal */
.feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.feedback-modal.active {
  display: flex;
}

.feedback-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.feedback-modal-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  animation: feedbackSlideUp 0.3s ease;
}

@keyframes feedbackSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal header */
.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.feedback-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

.feedback-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s ease;
}

.feedback-modal-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* Modal body */
.feedback-modal-body {
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

/* Login required */
.feedback-login-required {
  text-align: center;
  padding: 40px 20px;
}

.feedback-login-required svg {
  color: #2563eb;
  margin-bottom: 16px;
}

.feedback-login-required h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
}

.feedback-login-required p {
  margin: 0 0 24px 0;
  font-size: 14px;
  color: #64748b;
}

.feedback-login-button {
  display: inline-block;
  padding: 12px 24px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
}

.feedback-login-button:hover {
  background: #1d4ed8;
}

/* Form */
.feedback-form-group {
  margin-bottom: 20px;
}

.feedback-form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.feedback-required {
  color: #dc2626;
}

.feedback-form-group textarea {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  resize: vertical;
  transition: all 0.2s ease;
}

.feedback-form-group textarea:focus {
  outline: none;
  background: white;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.feedback-char-count {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  text-align: right;
}

/* File upload */
.feedback-file-upload {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feedback-file-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-file-button:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.feedback-file-name {
  flex: 1;
  font-size: 13px;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: none;
}

.feedback-file-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.feedback-file-remove:hover {
  background: #fecaca;
}

.feedback-file-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

/* Form info */
.feedback-form-info {
  margin-bottom: 20px;
  text-align: right;
}

.feedback-form-info span {
  font-size: 12px;
  color: #94a3b8;
}

.feedback-form-info code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Form actions */
.feedback-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.feedback-cancel-button,
.feedback-submit-button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.feedback-cancel-button {
  background: white;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.feedback-cancel-button:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.feedback-submit-button {
  background: #2563eb;
  color: white;
  border: none;
}

.feedback-submit-button:hover:not(:disabled) {
  background: #1d4ed8;
}

.feedback-submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Messages */
.feedback-error,
.feedback-success {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.feedback-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.feedback-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .feedback-modal-content {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .feedback-modal-header {
    padding: 20px;
  }

  .feedback-modal-body {
    padding: 20px;
    max-height: calc(100vh - 76px);
  }

  .feedback-form-actions {
    flex-direction: column-reverse;
  }

  .feedback-cancel-button,
  .feedback-submit-button {
    width: 100%;
  }
}
