/* ask-question.css — Langard / lightweight
   ВАЖНО: модалки удалены отсюда полностью — теперь они только в /styles/modal.css
*/

/* ===== БАЗА СТРАНИЦЫ ===== */
.ask-page {
  margin-top: 18px;
  margin-bottom: var(--section-gap, 34px);
}

/* ===== ОБОЛОЧКА ФОРМЫ (glass) ===== */
.form-container {
  width: 100%;
  max-width: var(--content-max, 1040px);
  margin: 0 auto;
  padding: 18px 16px 18px;

  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.98);
  border-radius: var(--radius-lg, 20px);
  box-shadow: var(--shadow-glass, 0 8px 24px rgba(31, 38, 135, 0.15));

  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;

  font-family: var(
    --font-sans,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Segoe UI",
    sans-serif
  );
  font-size: var(--fs-body-sm, 14px);
  color: var(--text-main, #0f172a);
}

.form-container > * {
  margin-bottom: 10px;
}

/* Заголовок */
.form-container h4 {
  margin: 0 !important;
  padding: 0 0 4px 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;

  font-size: var(--fs-section-title, 16px);
  font-weight: 600;
  color: #111827;
}

.form-container h4 i {
  font-size: 18px;
  color: var(--accent, #4c6fff);
}

/* Подзаголовок */
.form-container > p {
  margin: 0;
  padding: 0;
  color: var(--text-soft, #4b5563);
  font-size: var(--fs-body-sm, 14px);
  line-height: 1.5;
}

/* ===== TIPS ===== */
.form-container .tips {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-md, 16px);
  background: rgba(248, 250, 252, 0.95);
  border: 1px dashed rgba(148, 163, 184, 0.55);
  box-shadow: none;

  font-size: var(--fs-caption, 13px);
  color: var(--text-soft, #4b5563);
}

.form-container .tips ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.form-container .tips li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
}

.form-container .tips li i {
  margin-top: 2px;
  font-size: 16px;
  color: var(--accent, #4c6fff);
}

/* ===== TEXTAREA ===== */
.textarea-wrapper {
  position: relative;
  min-height: 140px;
  margin: 0;
}

#questionText {
  width: 100% !important;
  min-height: 160px;
  max-height: 60svh;

  padding: 14px 14px 26px !important;
  border-radius: var(--radius-md, 16px);
  border: 1px solid rgba(148, 163, 184, 0.6) !important;
  background: #ffffff !important;

  font-family: inherit;
  font-size: var(--fs-body-sm, 14px);
  line-height: 1.45;

  resize: none;
  overflow: hidden;

  box-shadow: var(--shadow-ink-sm, 0 6px 18px rgba(0, 0, 0, 0.08));
  transition: height 0.05s linear, border-color 0.18s ease,
    box-shadow 0.18s ease;
}

@supports (height: 100dvh) {
  #questionText {
    max-height: 60dvh;
  }
}

#questionText:focus {
  outline: none;
  border-color: var(--accent, #4c6fff) !important;
  box-shadow: var(--shadow-glass, 0 8px 24px rgba(31, 38, 135, 0.15));
}

#questionText::placeholder {
  color: var(--text-muted, #9ca3af);
  opacity: 1;
}

/* typing placeholder */
.typing-placeholder {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  font-size: var(--fs-body-sm, 14px);
  color: #6b7280;
  display: flex;
  gap: 8px;
  pointer-events: none;
  z-index: 1;
}

.placeholder-text::after,
.typing::after {
  content: "|";
  animation: blink 1s infinite;
  color: var(--accent, #4c6fff);
  font-weight: 600;
  margin-left: 2px;
}

/* ===== PROGRESS ===== */
.progress-bar-container {
  width: 100%;
  margin-top: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(226, 232, 240, 0.9);
}

.progress-bar {
  height: 6px;
  width: 0%;
  border-radius: inherit;
  transition: width 0.25s ease;
  background: linear-gradient(
    90deg,
    var(--accent, #4c6fff),
    var(--accent-alt, #2bc5d9)
  );
}

.progress-bar.red {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.progress-bar.orange {
  background: linear-gradient(90deg, #f97316, #facc15);
}

.progress-bar.green {
  background: linear-gradient(
    90deg,
    var(--accent, #4c6fff),
    var(--accent-alt, #2bc5d9)
  );
}

.progress-text {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-soft, #4b5563);
}

/* ===== ACTIONS (privacy + submit) ===== */
.form-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.private-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-body-sm, 14px);
  color: var(--text-soft, #4b5563);
  cursor: pointer;
  position: relative;
}

.private-checkbox {
  transform: scale(1.05);
}

/* tooltip */
.tooltip-icon {
  font-size: 13px;
  color: var(--text-muted, #9ca3af);
}

.tooltip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  padding: 6px 10px;
  border-radius: 8px;

  background: #111827;
  color: #f9fafb;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
  z-index: 20;
}

.private-label:hover .tooltip-text {
  display: block;
}

/* Submit button (same as hero-primary look) */
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 16px;
  border-radius: var(--radius-btn, 15px);
  border: 1px solid rgba(255, 255, 255, 0.95);

  font-size: var(--fs-ui, 14px);
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;

  background: linear-gradient(
    130deg,
    var(--accent, #4c6fff),
    var(--accent-alt, #2bc5d9)
  );
  box-shadow: var(--shadow-glass-strong, 0 8px 24px rgba(31, 38, 135, 0.25));

  cursor: pointer;
  transition: transform var(--transition-fast, 0.16s ease-out),
    box-shadow var(--transition-fast, 0.16s ease-out), filter 0.18s ease;
}

.submit-button i {
  font-size: 14px;
}

@media (hover: hover) {
  .submit-button:hover {
    filter: brightness(1.03);
    box-shadow: var(--shadow-glass, 0 8px 24px rgba(31, 38, 135, 0.15));
    transform: translateY(-1px);
  }
}

.submit-button:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

/* Inline (desktop) */
.submit-button--inline {
  min-width: 220px;
  height: 48px;
}

/* ===== MOBILE SUBMIT BAR ===== */
.submit-bar {
  border-top: 1px solid rgba(15, 23, 42, 0.05);
  background: rgba(248, 250, 252, 0.98);
}

/* Mobile/tablet */
@media (max-width: 1024px) {
  .form-actions .submit-button--inline {
    display: none !important;
  }

  .submit-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;

    z-index: 1200;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .submit-bar .submit-button {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    font-size: 15px;
  }

  .container.container--narrow {
    padding-bottom: calc(52px + 24px + env(safe-area-inset-bottom)) !important;
  }
}

/* Desktop */
@media (min-width: 1025px) {
  .submit-bar {
    display: none !important;
  }

  .form-actions {
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
  }

  .form-actions .private-label {
    flex: 1;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
