/* Feedback, report modal, and toast styles. */

.report-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(141, 152, 186, 0.35);
  background: rgba(255, 255, 255, 0.82);
  color: #6b7280;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}

.report-btn:hover,
.admin-reports-btn.has-reports {
  background: #fff7ed;
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.55);
}

.stage-report-btn {
  flex: 0 0 auto;
}







.report-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.42);
  z-index: 100000;
  padding: 18px;
}

.report-modal-content {
  width: min(520px, 100%);
  border-radius: 18px;
  background: #fff;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  position: relative;
}

.report-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: #64748b;
}

.report-modal-meta {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

#reportMessage {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid rgba(141, 152, 186, 0.35);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
}

.report-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.learning-friction-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.learning-friction-sheet {
  position: relative;
  width: min(620px, 100%);
  padding: 22px;
  border: 1px solid rgba(96, 112, 145, 0.18);
  border-radius: 18px;
  background: #fff;
  color: #24304d;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.learning-friction-kicker {
  margin-bottom: 5px;
  color: #17845b;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.learning-friction-sheet h2 {
  margin: 0 36px 7px 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.learning-friction-sheet p {
  margin: 0 0 16px;
  color: #667085;
  line-height: 1.45;
}

.learning-friction-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f9;
  color: #59657b;
  font-size: 1.35rem;
  cursor: pointer;
}

.learning-friction-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.learning-friction-reasons button {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(77, 102, 134, 0.20);
  border-radius: 999px;
  background: #f7f9fc;
  color: #2d3a55;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
}

.learning-friction-reasons button:hover,
.learning-friction-reasons button:focus-visible {
  border-color: #2b9b70;
  background: #eefaf5;
}

.learning-friction-hint {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid #2b9b70;
  border-radius: 8px;
  background: #f0faf6;
  line-height: 1.4;
}

.learning-friction-hint strong,
.learning-friction-hint span {
  display: block;
}

.learning-friction-hint span {
  margin-top: 3px;
  font-size: 1rem;
}

.learning-friction-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 18px;
}

.learning-friction-actions button {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.learning-friction-hint-btn {
  border: 1px solid rgba(43, 155, 112, 0.28);
  background: #eefaf5;
  color: #176b4c;
}

.learning-friction-continue {
  border: 0;
  background: #334155;
  color: #fff;
}

.report-admin-diagnostics {
  margin: 8px 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eef7f3;
  color: #285c49;
  font-size: 0.82rem;
  line-height: 1.45;
}

@media (min-width: 700px) {
  .learning-friction-overlay {
    align-items: center;
  }
}

@media (max-width: 520px) {
  .learning-friction-overlay {
    padding: 10px;
  }

  .learning-friction-sheet {
    padding: 19px 16px max(16px, env(safe-area-inset-bottom));
    border-radius: 16px;
  }

  .learning-friction-reasons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .learning-friction-reasons button {
    width: 100%;
    white-space: normal;
  }

  .learning-friction-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.report-submit-btn,
.report-cancel-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

.report-submit-btn {
  background: #635bff;
  color: #fff;
}

.report-cancel-btn {
  background: #eef2ff;
  color: #334155;
}

.feedback-footer {
  margin-top: 20px;
  font-size: 0.75rem;
  text-align: center;
  border-top: 1px solid rgba(130,148,190,0.12);
  padding-top: 12px;
  color: var(--muted);
}

.feedback-contact-shell {
  width: fit-content;
  max-width: min(100%, 640px);
  margin: 0 auto;
  padding: 5px;
  border: 1px solid rgba(130,148,190,0.18);
  border-radius: 24px;
  background: rgba(255,255,255,0.62);
  box-shadow: 0 10px 26px rgba(24,35,63,0.05), inset 0 1px 0 rgba(255,255,255,0.70);
  backdrop-filter: blur(12px);
}

.feedback-contact-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  color: #31456d;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.feedback-contact-toggle::-webkit-details-marker {
  display: none;
}

.feedback-contact-toggle::after {
  content: "⌄";
  color: rgba(99,91,255,0.78);
  font-size: 0.9rem;
  transition: transform 0.18s ease;
}

.feedback-contact-shell[open] .feedback-contact-toggle::after {
  transform: rotate(180deg);
}

.feedback-contact-toggle small {
  color: rgba(78,86,110,0.62);
  font-size: 0.72rem;
  font-weight: 750;
}

.feedback-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding: 5px 5px 2px;
  text-align: center;
}

.feedback-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(130,148,190,0.18);
  background: rgba(246,248,255,0.72);
  color: #3b4668;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1;
  box-shadow: none;
}

.feedback-action-telegram {
  background: rgba(0,136,204,0.10);
}

.feedback-action-whatsapp {
  background: rgba(37,211,102,0.12);
}

.feedback-action-email {
  background: rgba(234,67,53,0.10);
}

.feedback-action-privacy {
  background: rgba(238,242,255,0.78);
}

.feedback-note {
  margin-top: 9px;
  color: rgba(78,86,110,0.72);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translate(-50%, 14px) scale(0.98);
  z-index: 10020;
  width: max-content;
  max-width: min(560px, calc(100% - 32px));
  padding: 13px 18px 13px 42px;
  border: 1px solid rgba(99, 91, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 255, 0.94)),
    #fff;
  color: #25304f;
  box-shadow: 0 18px 44px rgba(42, 53, 96, 0.18);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-toast::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6f64ff, #2fbf8f);
  color: #fff;
  font-size: 0.72rem;
  transform: translateY(-50%);
}

.app-toast.info::before {
  content: "i";
  background: linear-gradient(135deg, #6f64ff, #5aa9ff);
}

.app-toast.success::before {
  content: "✓";
  background: linear-gradient(135deg, #6f64ff, #2fbf8f);
}

.app-toast.warning {
  border-color: rgba(238, 153, 54, 0.26);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 236, 0.94)),
    #fff;
  color: #4f3a18;
}

.app-toast.warning::before {
  content: "!";
  background: linear-gradient(135deg, #f0b94b, #f06b4b);
}

.app-toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.app-toast,
.skip-toast,
#rankToast {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.97), rgba(244,247,255,0.94)),
    #fff !important;
  color: #25304f !important;
  border: 1px solid rgba(99, 91, 255, 0.18) !important;
  box-shadow: 0 18px 44px rgba(42, 53, 96, 0.18) !important;
}

.skip-toast {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -45%) scale(0.96);
  padding: 13px 18px 13px 42px;
  border-radius: 18px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  min-width: min(280px, calc(100% - 32px));
  max-width: min(520px, calc(100% - 32px));
  text-align: left;
  opacity: 0;
  pointer-events: none;
  z-index: 10001;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.skip-toast::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #6f64ff, #2fbf8f);
  color: #fff;
  font-size: 0.72rem;
  transform: translateY(-50%);
}

.skip-toast.info::before {
  content: "i";
  background: linear-gradient(135deg, #6f64ff, #5aa9ff);
}

.skip-toast.warning {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.97), rgba(255,249,236,0.94)),
    #fff !important;
  color: #4f3a18 !important;
  border-color: rgba(238, 153, 54, 0.26) !important;
}

.skip-toast.warning::before {
  content: "!";
  background: linear-gradient(135deg, #f0b94b, #f06b4b);
}

.skip-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 800px) {
.skip-toast {
  top: 46%;
    width: calc(100% - 28px);
    min-width: 0;
    padding: 13px 16px 13px 42px;
    font-size: 0.95rem;
  }
}


@media (max-width: 640px) {
  .feedback-contact-shell {
    width: 100%;
    border-radius: 22px;
  }

  .feedback-contact-toggle {
    width: 100%;
  }

  .feedback-contact-toggle small {
    display: none;
  }

  .feedback-actions {
    gap: 7px;
  }
}
