/* "Got a minute?" feedback survey widget — ported from cognisci-website index.html.
   Production CSS variables resolved to literal values so the widget renders
   identically regardless of the host page's :root tokens. */

/* Floating Widget */
.feedback-widget {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 99998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Collapsed state - just the button */
.feedback-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #00bfff;
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 191, 255, 0.3);
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.9rem;
}
.feedback-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 191, 255, 0.4);
}
.feedback-trigger svg,
.feedback-trigger i {
  width: 18px;
  height: 18px;
  display: block;
}
.feedback-trigger-text {
  display: none;
}
.feedback-trigger.expanded .feedback-trigger-text {
  display: inline;
}

/* Prompt card - asks if willing to give feedback */
.feedback-prompt {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 100000;
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  width: 300px;
}
.feedback-prompt.active {
  display: block;
  animation: feedbackPromptPop 0.25s ease;
}
@keyframes feedbackPromptPop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.98); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.feedback-prompt-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
}
.feedback-prompt-close:hover { color: #333; }
.feedback-prompt h4 {
  font-size: 1.1rem;
  color: #0b1324;
  margin: 0 0 8px;
}
.feedback-prompt p {
  font-size: 0.9rem;
  color: #5b6470;
  margin: 0 0 16px;
  line-height: 1.4;
}
.feedback-prompt-buttons {
  display: flex;
  gap: 8px;
}
.feedback-prompt-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: inherit;
}
.feedback-prompt-btn.primary {
  background: #00bfff;
  color: #fff;
}
.feedback-prompt-btn.primary:hover { background: #009ed9; }
.feedback-prompt-btn.secondary {
  background: #f0f0f0;
  color: #5b6470;
}
.feedback-prompt-btn.secondary:hover {
  background: #e5e5e5;
  color: #0b1324;
}

/* Full modal overlay */
.feedback-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.feedback-overlay.active {
  display: flex !important;
}
.feedback-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 32px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-height: 90vh;
  overflow-y: auto;
}
.feedback-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 4px 8px;
}
.feedback-close:hover { color: #333; }
.feedback-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0b1324;
  margin: 0 0 8px;
  text-align: center;
  font-family: inherit;
}
.feedback-subtitle {
  color: #5b6470;
  font-size: 0.95rem;
  margin: 0 0 20px;
  text-align: center;
}

/* Progress indicator */
.feedback-progress {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
  gap: 8px;
}
.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e7edf3;
  transition: background 0.3s;
}
.progress-dot.active   { background: #00bfff; }
.progress-dot.completed{ background: #90be6d; }
.progress-line {
  width: 40px;
  height: 2px;
  background: #e7edf3;
}
.progress-line.completed { background: #90be6d; }

/* Steps */
.feedback-step { display: none; }
.feedback-step.active { display: block; }

/* Radio options */
.feedback-options {
  text-align: left;
  margin-bottom: 24px;
}
.feedback-option {
  display: block;
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 2px solid #e7edf3;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  color: #0b1324;
}
.feedback-option:hover {
  border-color: #00bfff;
  background: #f8fcff;
}
.feedback-option.selected {
  border-color: #00bfff;
  background: #e8f7ff;
}
.feedback-option input { display: none; }
.feedback-option-text {
  font-weight: 600;
  color: #0b1324;
  font-size: 0.95rem;
  display: block;
}
.feedback-option-desc {
  font-size: 0.85rem;
  color: #5b6470;
  margin-top: 2px;
  display: block;
}

/* Other input */
.feedback-other-input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid #e7edf3;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-top: 8px;
  display: none;
  font-family: inherit;
}
.feedback-other-input:focus {
  outline: none;
  border-color: #00bfff;
}
.feedback-option.selected .feedback-other-input { display: block; }

/* Textarea */
.feedback-textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid #e7edf3;
  border-radius: 10px;
  font-size: 0.95rem;
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  margin-bottom: 24px;
  color: #0b1324;
}
.feedback-textarea:focus {
  outline: none;
  border-color: #00bfff;
}
.feedback-textarea::placeholder { color: #aaa; }

/* Email input */
.feedback-email-section { margin-bottom: 24px; }
.feedback-email-label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 8px;
}
.feedback-email-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e7edf3;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #0b1324;
}
.feedback-email-input:focus {
  outline: none;
  border-color: #00bfff;
}
.feedback-email-input::placeholder { color: #aaa; }
.feedback-email-privacy {
  font-size: 0.75rem;
  color: #888;
  margin-top: 6px;
  margin-bottom: 0;
}

/* Buttons */
.feedback-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #00bfff;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.feedback-btn:hover {
  background: #009ed9;
  color: #fff;
}
.feedback-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.feedback-btn-secondary {
  background: transparent;
  color: #5b6470;
  border: 2px solid #e7edf3;
}
.feedback-btn-secondary:hover {
  background: #f5f5f5;
  color: #0b1324;
}

/* Thank you */
.feedback-thankyou {
  text-align: center;
  padding: 20px 0;
}
.feedback-thankyou-icon {
  width: 64px;
  height: 64px;
  background: #90be6d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.feedback-thankyou-icon svg {
  width: 32px;
  height: 32px;
  color: #fff;
}
.feedback-thankyou h3 {
  font-size: 1.5rem;
  color: #0b1324;
  margin: 0 0 12px;
  font-family: inherit;
}
.feedback-thankyou p {
  color: #5b6470;
  margin: 0 0 24px;
}
