/**
 * FindEdition — questions-responsive.css
 * Questions module responsive layout adjustments.
 *
 * Copyright (c) FindEdition Developers. All rights reserved.
 */
.questions-page,
.question-show-page,
.questions-ask-page,
.questions-edit-page {
  width: 100%;
}

/* Desktop-first row: vote | content (same as original) */
.qa-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
  width: 100%;
}

.qa-row > .vote-section {
  flex-shrink: 0;
}

.qa-row > .qa-body,
.qa-row > .flex-1 {
  flex: 1 1 auto;
  min-width: 0;
}

.qa-body h1,
.qa-body h2,
.question-card h2 a {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.qa-meta,
.qa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

/* Meta bar: bundle me gap-x-* missing hai, ye guaranteed spacing deta hai */
.qa-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
  width: 100%;
}

.qa-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  line-height: 1.25;
}

.qa-meta-item > i {
  flex-shrink: 0;
  width: 1em;
  text-align: center;
  opacity: 0.85;
}

.qa-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
}

.qa-meta-badge > i {
  flex-shrink: 0;
}

.qa-author-link {
  color: inherit;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  z-index: 2;
  transition: color 0.15s ease;
}

.qa-author-link:hover,
.qa-author-link:focus,
.qa-author-link:active,
.qa-author-link:visited {
  color: #0891b2;
  text-decoration: none !important;
  border-bottom: none !important;
  outline: none;
}

.questions-page .qa-meta-bar a,
.question-show-page .qa-meta-bar a,
.question-show-page .qa-answer-header a {
  text-decoration: none !important;
  border-bottom: none !important;
}

.qa-meta-item,
.qa-meta-item span {
  text-decoration: none !important;
}

.qa-breadcrumb {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.qa-body img,
.question-show-page .prose img {
  max-width: 100%;
  height: auto;
}

.qa-body pre,
.question-show-page .prose pre {
  max-width: 100%;
  overflow-x: auto;
}

/* —— Tablet (keep desktop-like row layout) —— */
@media (min-width: 768px) and (max-width: 1023px) {
  .qa-row {
    gap: 0.875rem;
  }
}

/* —— Phone only —— */
@media (max-width: 767px) {
  #mobileFilterSidebar {
    width: min(22rem, 92vw) !important;
    max-width: 100vw;
  }

  .questions-page h1.text-2xl,
  .questions-ask-page h1,
  .question-show-page .qa-body > h1 {
    line-height: 1.3;
  }

  /* Compact cards */
  .questions-page .question-card,
  .question-show-page .answer-card {
    padding: 1rem;
  }

  /* Votes as horizontal strip above content */
  .qa-stack-mobile {
    flex-direction: column;
    gap: 0.5rem;
  }

  .qa-stack-mobile > .vote-section {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    min-width: 0 !important;
  }

  .qa-stack-mobile > .vote-section .vote-btn {
    width: 2rem;
    height: 2rem;
  }

  .qa-actions {
    width: 100%;
  }

  .qa-actions > a,
  .qa-actions > button {
    flex: 1 1 calc(50% - 0.5rem);
    justify-content: center;
    min-width: 6.5rem;
  }

  .qa-answer-header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .questions-page nav[role="navigation"],
  .questions-page .pagination {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .qa-actions > a,
  .qa-actions > button {
    flex: 1 1 100%;
  }
}
