/* feedback.css - styles for the feedback / bug report dialog */
:root {
  /* Use app theme where possible so modal integrates with dark UI */
  --fc-bg: var(--bg-card, #16213e);
  --fc-ink: var(--text-primary, #ffffff);
  --fc-muted: var(--text-secondary, #b3b3b3);
  --fc-accent: var(--text-accent, #667eea);
  --fc-radius: 12px;
  --fc-shadow: var(--shadow-medium, 0 12px 40px rgba(0, 0, 0, 0.24));
}

/* Base dialog override to use our custom card */
.feedbackDialog {
  border: none;
  padding: 0;
  background: transparent;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(4px);
  /* Ensure backdrop sits behind the modal card but above the page */
  z-index: 1000;
}

.modal-card {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100% - 44px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  /* integrate with main app theme (dark by default) */
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );
  color: var(--fc-ink);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  padding: 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* Make sure the modal card appears above the backdrop and accepts pointer events */
  z-index: 1001;
  pointer-events: auto;
}

.modal-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-card__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-card__close {
  background: transparent;
  border: none;
  color: var(--fc-muted);
  font-size: 1.3rem;
  padding: 6px;
  cursor: pointer;
}

.modal-card__close:focus {
  outline: 2px solid rgba(11, 118, 239, 0.18);
  border-radius: 6px;
}

.modal-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-subtitle {
  margin: 0 0 8px 0;
  color: var(--fc-muted);
}

.feedback-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.form__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
  color: #fff;
  background: linear-gradient(180deg, #0b76ef, #0366d6);
  box-shadow: 0 6px 18px rgba(11, 118, 239, 0.12);
}

.form__btn:active {
  transform: translateY(1px);
}

.form__btn--transfer {
  background: linear-gradient(180deg, #22c55e, #16a34a);
}

.form__btn--bug {
  background: linear-gradient(180deg, #ef4444, #dc2626);
}

/* (no specific override for .form__btn--feedback; it uses .form__btn base styles) */

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* remove any boxed background so form sits flush inside modal */
  background: transparent;
  padding: 0; /* modal padding handles spacing */
}

.form-label {
  font-size: 0.9rem;
  color: var(--fc-muted);
}

.modal-card .feedback-form .form__input,
.modal-card .feedback-form select,
.modal-card .feedback-form textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-glass, rgba(255, 255, 255, 0.03));
  font-size: 0.95rem;
  color: var(--fc-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.modal-card .feedback-form .gf-textarea {
  min-height: 110px;
  resize: vertical;
}

/* Small variant for link-style back button inside modal */
.form__btn--link {
  background: transparent;
  color: var(--fc-muted);
  box-shadow: none;
  font-weight: 600;
  padding: 8px 10px;
}

/* Primary action variant used for submit inside modal */
.form__btn--primary {
  background: linear-gradient(180deg, var(--fc-accent), rgba(0, 0, 0, 0.2));
  color: #fff;
}

.form-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-actions--right {
  justify-content: flex-end;
}

/* small show animation */
.modal-card {
  animation: popin 180ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes popin {
  from {
    transform: translate(-50%, -46%) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Responsive tweaks */
@media (max-width: 420px) {
  .modal-card {
    width: calc(100% - 24px);
    padding: 12px;
  }
  .feedback-actions {
    flex-direction: column;
  }
}

/* Utility: visually hidden for accessible labels if needed */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
