/* FAQ & feedback modal — canonical styles (loaded from base.html) */

.faq-page-wrap {
  padding: 28px 16px 56px;
  max-width: 820px;
  margin: 0 auto;
}

.faq-page-header {
  margin-bottom: 24px;
}

.faq-page-header h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 800;
  color: #111827;
}

.faq-page-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: #6b7280;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
  border: 1px solid #eef0f3;
  transition: background-color 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}

.faq-card:hover {
  background: #fafbff;
  border-color: #dbeafe;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
}

.faq-card details {
  margin: 0;
}

.faq-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-summary span:first-child {
  flex: 1;
  min-width: 0;
}

.faq-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.25s ease, background-color 0.22s ease, color 0.22s ease;
}

.faq-card details[open] .faq-icon {
  transform: rotate(180deg);
  background: #2563eb;
  color: #fff;
}

.faq-card details[open] {
  background: #fff;
}

.faq-card details[open] .faq-summary {
  border-bottom: 1px solid #eef0f3;
}

.faq-answer {
  padding: 16px 20px 20px;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.7;
}

.faq-answer p {
  margin: 0;
}

.faq-answer a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.faq-answer a:hover {
  text-decoration: underline;
}

.faq-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.faq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.faq-btn-outline {
  background: #fff;
  border-color: #d1d5db;
  color: #374151;
}

.faq-btn-outline:hover {
  border-color: #9ca3af;
  color: #111827;
}

.faq-btn-primary {
  background: #1e293b;
  color: #fff;
}

.faq-btn-primary:hover {
  background: #0f172a;
}

.feedback-landing-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
  padding: 28px 24px;
  text-align: center;
}

.feedback-landing-card p {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.feedback-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.feedback-modal.is-open {
  display: flex;
}

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

.feedback-modal-window,
.modal-window {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  padding: 28px 22px 22px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
}

.feedback-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.feedback-modal-close:hover {
  background: #e5e7eb;
}

.feedback-modal-window h2,
.modal-window h2 {
  margin: 0 36px 8px 0;
  font-size: 24px;
  line-height: 1.25;
  color: #111827;
}

.feedback-modal-lead {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
}

.feedback-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feedback-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-modal-field label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.feedback-modal-field input,
.feedback-modal-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.feedback-modal-field textarea {
  resize: vertical;
  min-height: 120px;
}

.feedback-modal-field input:focus,
.feedback-modal-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.feedback-modal-submit {
  width: 100%;
  margin-top: 4px;
  min-height: 48px;
  border: none;
  border-radius: 10px;
  background: #1e293b;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.feedback-modal-submit:hover {
  background: #0f172a;
}

.feedback-modal-success {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 14px;
  font-weight: 600;
}

.feedback-modal-error {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 14px;
  font-weight: 600;
}

body.feedback-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .faq-page-header h1 {
    font-size: 26px;
  }

  .faq-summary {
    padding: 16px;
    font-size: 15px;
  }

  .faq-answer {
    padding: 14px 16px 18px;
    font-size: 14px;
  }

  .faq-page-actions {
    flex-direction: column;
  }

  .faq-btn {
    width: 100%;
  }

  .feedback-modal {
    padding: 12px;
  }

  .feedback-modal-window,
  .modal-window {
    padding: 24px 16px 18px;
    border-radius: 14px;
  }

  .feedback-modal-window h2,
  .modal-window h2 {
    font-size: 21px;
  }
}
