/* Feedback Widget — session bar link + modal */

/* Session bar link (injected between Admin and Logout) */
.feedback-nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease;
  cursor: pointer;
}

.feedback-nav-link:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Fallback FAB for pages without session bar (login) */
.feedback-fab {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--earth) 0%, var(--earth-light) 100%);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(122, 92, 58, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(122, 92, 58, 0.45);
}

.feedback-fab:active {
  transform: scale(0.96);
}

/* Modal overlay */
.feedback-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
}

.feedback-overlay.open {
  display: flex;
}

/* Modal card */
.feedback-card {
  background: var(--surface, #fff);
  border-radius: 14px;
  width: 90%;
  max-width: 400px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  font-family: var(--font-body, sans-serif);
  position: relative;
}

.feedback-card h2 {
  margin: 0 0 16px;
  font-family: var(--font-heading, serif);
  font-size: 20px;
  color: var(--earth, #7a5c3a);
}

/* Close button */
.feedback-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
}

.feedback-close:hover {
  background: var(--cream, #ede7df);
}

/* Type toggle buttons */
.feedback-type-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.feedback-type-btn {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--border, #c5beb5);
  border-radius: 8px;
  background: var(--surface, #fff);
  font-family: var(--font-body, sans-serif);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text, #1f2937);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.feedback-type-btn:hover {
  border-color: var(--earth-light, #a07d55);
}

.feedback-type-btn.selected {
  border-color: var(--earth, #7a5c3a);
  background: var(--cream, #ede7df);
  color: var(--earth-dark, #5e4528);
  font-weight: 600;
}

/* Textarea */
.feedback-textarea {
  width: 100%;
  min-height: 100px;
  padding: 10px 12px;
  border: 2px solid var(--border, #c5beb5);
  border-radius: 8px;
  font-family: var(--font-body, sans-serif);
  font-size: 14px;
  color: var(--text, #1f2937);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.feedback-textarea:focus {
  outline: none;
  border-color: var(--earth, #7a5c3a);
}

/* Char counter */
.feedback-counter {
  text-align: right;
  font-size: 12px;
  color: var(--text-tertiary, #9ca3af);
  margin-top: 4px;
  margin-bottom: 16px;
}

.feedback-counter.near-limit {
  color: var(--ochre, #C4933F);
}

.feedback-counter.at-limit {
  color: var(--brick, #A6503C);
  font-weight: 600;
}

/* Actions */
.feedback-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.feedback-cancel-btn {
  padding: 10px 18px;
  border: 2px solid var(--border, #c5beb5);
  border-radius: 8px;
  background: var(--surface, #fff);
  font-family: var(--font-body, sans-serif);
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  transition: background 0.15s ease;
}

.feedback-cancel-btn:hover {
  background: var(--cream, #ede7df);
}

.feedback-submit-btn {
  padding: 10px 22px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--earth) 0%, var(--earth-light) 100%);
  color: #fff;
  font-family: var(--font-body, sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(122, 92, 58, 0.25);
}

.feedback-submit-btn:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(122, 92, 58, 0.35);
}

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

/* Error message */
.feedback-error {
  color: var(--brick, #A6503C);
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

.feedback-error.visible {
  display: block;
}

/* Success confirmation */
.feedback-success {
  text-align: center;
  padding: 20px 0;
  color: var(--sage, #4a8f4e);
  font-size: 15px;
  font-weight: 500;
}
