/* Feedback Popup Styles — positioned next to feedback button (left, above it) */
.feedback-popup {
  position: fixed;
  bottom: 72px;
  left: 20px;
  right: auto;
  z-index: 9998;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(22, 155, 98, 0.1);
  padding: 20px;
  max-width: 320px;
  width: 320px;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid rgba(30, 41, 59, 0.15);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.feedback-popup.show {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.feedback-popup.hide {
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
}

/* Trigger button */
.feedback-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9998;
  background: linear-gradient(135deg, #334155, #1e293b);
  color: white;
  border: none;
  border-radius: 28px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
  transition: all 0.2s;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.feedback-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 41, 59, 0.4);
}

.feedback-trigger .feedback-trigger-icon {
  font-size: 16px;
}

/* Close button */
.feedback-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: #666;
  font-size: 16px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}

.feedback-close:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* Header */
.feedback-header {
  margin-bottom: 14px;
}

.feedback-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.feedback-header p {
  font-size: 13px;
  color: #6C757D;
  margin: 0;
}

/* Rating */
.feedback-rating {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.feedback-rating-btn {
  flex: 1;
  padding: 8px 4px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-size: 20px;
  line-height: 1.3;
}

.feedback-rating-btn:hover {
  border-color: #334155;
  background: rgba(22, 155, 98, 0.05);
}

.feedback-rating-btn.selected {
  border-color: #334155;
  background: rgba(22, 155, 98, 0.1);
  box-shadow: 0 0 0 1px #334155;
}

.feedback-rating-btn span {
  display: block;
  font-size: 10px;
  color: #6C757D;
  margin-top: 2px;
}

/* Text input */
.feedback-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  max-height: 140px;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}

.feedback-textarea:focus {
  outline: none;
  border-color: #334155;
}

.feedback-textarea::placeholder {
  color: #9CA3AF;
}

/* Submit button */
.feedback-submit {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #334155, #1e293b);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.feedback-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

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

/* Success state */
.feedback-success {
  text-align: center;
  padding: 16px 0;
}

.feedback-success-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 10px;
}

.feedback-success h3 {
  color: #1e293b;
  font-size: 17px;
  margin: 0 0 6px 0;
}

.feedback-success p {
  color: #6C757D;
  font-size: 13px;
  margin: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .feedback-popup {
    bottom: 68px;
    left: 15px;
    right: auto;
    max-width: calc(100vw - 30px);
    width: 320px;
    padding: 16px;
  }

  .feedback-trigger {
    bottom: max(15px, env(safe-area-inset-bottom));
    left: 15px;
    padding: 8px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .feedback-popup {
    bottom: 64px;
    left: 10px;
    right: auto;
    max-width: calc(100vw - 20px);
    padding: 14px;
  }

  .feedback-trigger {
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 24px;
  }

  .feedback-rating-btn {
    font-size: 18px;
    padding: 6px 2px;
  }

  .feedback-rating-btn span {
    font-size: 9px;
  }
}
