/* Sidebar trigger */
.question-suggest-bar {
  margin-bottom: 1rem;
}

.question-suggest-bar.sidebar-panel {
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
}

.question-suggest-open {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 1rem 1.1rem;
  background: var(--theme-sidebar-bg);
  border: 1px solid var(--theme-border);
  border-radius: 16px;
  box-shadow: 0 8px 30px var(--theme-shadow);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.question-suggest-open:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.14);
}

.question-suggest-open:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.question-suggest-open-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.question-suggest-open-label {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--theme-text-heading);
}

.question-suggest-open-chevron {
  flex-shrink: 0;
  color: var(--theme-text-muted);
  transition: transform 0.18s ease, color 0.18s ease;
}

.question-suggest-open:hover .question-suggest-open-chevron {
  color: var(--theme-link);
  transform: translateX(2px);
}

/* Modal shell */
.question-suggest-modal[hidden] {
  display: none !important;
}

.question-suggest-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.question-suggest-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.question-suggest-panel {
  position: relative;
  width: 100%;
  max-width: 34rem;
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(15, 23, 42, 0.08);
  animation: qs-panel-in 0.22s ease-out;
}

.question-suggest-panel::before {
  content: "";
  display: block;
  height: 4px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}

@keyframes qs-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.question-suggest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.question-suggest-header-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.question-suggest-header-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  color: #1d4ed8;
  background: #eff6ff;
}

.question-suggest-header h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.question-suggest-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.question-suggest-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.question-suggest-body {
  padding: 1.15rem 1.35rem 1.35rem;
}

.question-suggest-body > .feedback {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.question-suggest-body > .feedback.ok {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.question-suggest-body > .feedback.err {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.question-suggest-callout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.question-suggest-callout-icon {
  flex-shrink: 0;
  color: #2563eb;
  margin-top: 0.05rem;
}

.question-suggest-callout p {
  margin: 0;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.55;
}

.question-suggest-login {
  padding: 0.5rem 0 0.25rem;
}

.question-suggest-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.question-suggest-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.question-suggest-field input[type="text"],
.question-suggest-field input[type="url"],
.question-suggest-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  font: inherit;
  font-size: 0.94rem;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.question-suggest-field input::placeholder,
.question-suggest-field textarea::placeholder {
  color: #94a3b8;
}

.question-suggest-field input:focus,
.question-suggest-field textarea:focus,
.question-suggest-paste:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

.question-suggest-field textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.question-suggest-field--paste label {
  margin-bottom: 0.5rem;
}

.question-suggest-paste {
  min-height: 10.5rem;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.question-suggest-paste:hover,
.question-suggest-paste:focus {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.25);
}

.question-suggest-paste.has-image {
  min-height: auto;
  border-style: solid;
  border-color: #e2e8f0;
  background: #fff;
  padding: 0.75rem;
}

.question-suggest-paste-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  max-width: 20rem;
}

.question-suggest-paste-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.question-suggest-paste-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
}

.question-suggest-paste-hint {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}

.question-suggest-preview {
  display: block;
  max-width: 100%;
  max-height: 18rem;
  border-radius: 10px;
  object-fit: contain;
}

.question-suggest-preview[hidden] {
  display: none !important;
}

.question-suggest-clear {
  margin-top: 0.55rem;
  padding: 0.35rem 0.65rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.question-suggest-clear:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.question-suggest-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  margin-top: 0.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid #f1f5f9;
}

.question-suggest-footnote {
  flex: 1;
  min-width: 12rem;
  margin: 0;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.45;
}

.question-suggest-submit {
  margin-left: auto;
  padding: 0.62rem 1.45rem;
  border-radius: 10px;
  font-size: 0.92rem;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.22);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.question-suggest-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.28);
}

body.question-suggest-open {
  overflow: hidden;
}

.question-suggest-sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 0.5rem 0.75rem;
}

.question-suggest-success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  color: #15803d;
  background: #dcfce7;
}

.question-suggest-sent .feedback.ok {
  margin: 0 0 1.25rem;
  padding: 0;
  background: none;
  border: none;
  font-size: 0.95rem;
  color: #166534;
}

.question-suggest-sent-actions {
  display: flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .question-suggest-panel {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 16px;
  }

  .question-suggest-body {
    padding: 1rem 1.1rem 1.2rem;
  }

  .question-suggest-header {
    padding: 1rem 1.1rem 0.85rem;
  }

  .question-suggest-paste {
    min-height: 9.5rem;
  }

  .question-suggest-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .question-suggest-submit {
    width: 100%;
    margin-left: 0;
  }
}
