/* Pangereh — product Q&A */
.pqa { --q-accent: #0f766e; --q-accent-2: #115e59; --q-soft: color-mix(in srgb, var(--q-accent) 9%, transparent); --q-text: #0f172a; --q-muted: #64748b; --q-line: #e2e8f0; --q-bg: #fff; --q-bg2: #f8fafc;
    margin: 32px 0; padding: 26px; border: 1px solid var(--q-line); border-radius: 22px; background: var(--q-bg); color: var(--q-text); direction: rtl; }
html.dark .pqa { --q-text: #e2e8f0; --q-muted: #94a3b8; --q-line: #334155; --q-bg: #1e293b; --q-bg2: #0f172a; }
.pqa * { box-sizing: border-box; }
.pqa-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.pqa-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 800; }
.pqa-title-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--q-accent), var(--q-accent-2)); color: #fff; font-size: 17px; }
.pqa-sub { margin: 6px 0 0; color: var(--q-muted); font-size: 13px; }
.pqa-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.pqa-search { position: relative; display: flex; align-items: center; }
.pqa-search svg { position: absolute; right: 11px; width: 16px; height: 16px; fill: none; stroke: var(--q-muted); stroke-width: 2; }
.pqa-search input, .pqa-sort { height: 38px; border: 1px solid var(--q-line); border-radius: 11px; background: var(--q-bg2); color: var(--q-text); font: inherit; font-size: 13px; outline: 0; }
.pqa-search input { width: 220px; padding: 0 34px 0 12px; }
.pqa-sort { padding: 0 12px; cursor: pointer; }
.pqa-search input:focus, .pqa-sort:focus { border-color: var(--q-accent); box-shadow: 0 0 0 3px var(--q-soft); }
.pqa-flash { margin-bottom: 14px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 700; }
.pqa-flash.is-ok { background: var(--q-soft); color: var(--q-accent-2); }
.pqa-flash.is-bad { background: rgba(220, 38, 38, .08); color: #dc2626; }
html.dark .pqa-flash.is-ok { color: #5eead4; }

.pqa-ask { margin-bottom: 18px; }
.pqa-ask-form { display: flex; gap: 12px; padding: 14px; border: 1.5px solid var(--q-line); border-radius: 16px; background: var(--q-bg2); transition: border-color .15s, box-shadow .15s; }
.pqa-ask-form:focus-within { border-color: var(--q-accent); box-shadow: 0 0 0 4px var(--q-soft); background: var(--q-bg); }
.pqa-ask-field { flex: 1; min-width: 0; }
.pqa textarea { width: 100%; min-height: 48px; padding: 8px 2px; border: 0; background: transparent; color: var(--q-text); font: inherit; font-size: 14px; line-height: 1.9; resize: none; outline: 0; }
.pqa-ask-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.pqa-ask-foot small { color: var(--q-muted); font-size: 12px; }
.pqa-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 20px; border: 0; border-radius: 11px; background: linear-gradient(135deg, var(--q-accent), var(--q-accent-2)); color: #fff; font: inherit; font-size: 13.5px; font-weight: 800; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .15s, filter .15s; }
.pqa-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.pqa-btn.is-sm { height: 34px; padding: 0 16px; font-size: 12.5px; }
.pqa-login { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px dashed var(--q-line); border-radius: 16px; background: var(--q-bg2); }
.pqa-login-icon { font-size: 28px; }
.pqa-login div { flex: 1; min-width: 200px; }
.pqa-login strong { display: block; font-size: 14.5px; }
.pqa-login span { color: var(--q-muted); font-size: 12.5px; }

.pqa-avatar { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--q-soft); color: var(--q-accent-2); font-size: 15px; font-weight: 800; }
.pqa-avatar.is-sm { width: 28px; height: 28px; font-size: 12px; }
.pqa-avatar.is-staff { background: var(--q-accent); color: #fff; }
html.dark .pqa-avatar:not(.is-staff) { color: #5eead4; }

.pqa-list { display: flex; flex-direction: column; gap: 12px; }
.pqa:not(.is-all) .pqa-item.is-more { display: none; }
.pqa-item { border: 1px solid var(--q-line); border-radius: 18px; background: var(--q-bg); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.pqa-item:hover { border-color: color-mix(in srgb, var(--q-accent) 35%, var(--q-line)); box-shadow: 0 8px 26px rgba(15, 23, 42, .06); }
.pqa-item.is-pinned { border-color: color-mix(in srgb, #f59e0b 45%, var(--q-line)); }
.pqa-item.is-focus { animation: pqa-glow 2.2s ease; }
@keyframes pqa-glow { 0%, 40% { box-shadow: 0 0 0 4px var(--q-soft); border-color: var(--q-accent); } }
.pqa-q { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; }
.pqa-q-mark { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--q-text); color: var(--q-bg); font-size: 13px; font-weight: 800; }
.pqa-q-main { flex: 1; min-width: 0; }
.pqa-q-body { margin: 2px 0 6px; font-size: 15px; font-weight: 700; line-height: 1.9; word-break: break-word; }
.pqa-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--q-muted); font-size: 12px; }
.pqa-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.pqa-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.pqa-tag.is-wait { background: rgba(245, 158, 11, .14); color: #b45309; }
.pqa-tag.is-pin { background: rgba(245, 158, 11, .12); color: #b45309; }
.pqa-tag.is-staff { background: var(--q-accent); color: #fff; }

.pqa-votes { display: flex; gap: 4px; }
.pqa-votes button { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border: 1px solid var(--q-line); border-radius: 99px; background: var(--q-bg); color: var(--q-muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: .15s; }
.pqa-votes button:hover { border-color: var(--q-accent); color: var(--q-accent); }
.pqa-votes button.is-on { border-color: var(--q-accent); background: var(--q-soft); color: var(--q-accent-2); }
.pqa-votes button.is-down { border-color: #f87171; background: rgba(248, 113, 113, .1); color: #dc2626; }
.pqa-votes button.is-pop { transform: scale(1.12); }
.pqa-votes svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pqa-votes.is-busy { opacity: .5; pointer-events: none; }
.pqa-votes.is-inline button { height: 28px; padding: 0 10px; }

.pqa-answers { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 16px 18px; padding-inline-start: 60px; }
.pqa-a { position: relative; padding: 12px 14px; border-radius: 14px; background: var(--q-bg2); }
.pqa-a::before { content: ''; position: absolute; top: -8px; right: -22px; width: 16px; height: 26px; border-right: 2px solid var(--q-line); border-bottom: 2px solid var(--q-line); border-bottom-right-radius: 12px; }
.pqa-a.is-staff { border: 1px solid color-mix(in srgb, var(--q-accent) 30%, transparent); background: var(--q-soft); }
.pqa-a.is-hidden { display: none; }
.pqa-a-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.pqa-a-time { margin-inline-start: auto; color: var(--q-muted); font-size: 11.5px; }
.pqa-a-body { margin: 8px 0 0; font-size: 14px; line-height: 2; word-break: break-word; }
.pqa-a-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; color: var(--q-muted); font-size: 12px; }
.pqa-noans { color: var(--q-muted); font-size: 12.5px; }
.pqa-link { align-self: flex-start; padding: 4px 0; border: 0; background: none; color: var(--q-accent); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.pqa-link:hover { text-decoration: underline; }
html.dark .pqa-link { color: #5eead4; }
.pqa-reply { padding: 10px 14px; border: 1.5px solid var(--q-accent); border-radius: 14px; background: var(--q-bg); box-shadow: 0 0 0 4px var(--q-soft); }
.pqa-reply[hidden] { display: none; }
.pqa-more { display: block; width: 100%; margin-top: 12px; padding: 12px; border: 1.5px dashed var(--q-line); border-radius: 14px; background: none; color: var(--q-accent); font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }
.pqa-more:hover { border-color: var(--q-accent); background: var(--q-soft); }
.pqa.is-all .pqa-more { display: none; }
.pqa-empty-search { padding: 20px; color: var(--q-muted); text-align: center; }
.pqa-empty-search[hidden] { display: none; }

@media (max-width: 640px) {
    .pqa { margin: 20px 0; padding: 16px; border-radius: 16px; }
    .pqa-search input { width: 100%; }
    .pqa-tools, .pqa-search { width: 100%; }
    .pqa-q { flex-wrap: wrap; padding: 14px; }
    .pqa-votes:not(.is-inline) { width: 100%; justify-content: flex-end; }
    .pqa-answers { padding: 0 14px 14px; padding-inline-start: 26px; }
    .pqa-a::before { right: -16px; width: 12px; }
    .pqa-ask-form .pqa-avatar { display: none; }
}
