/* Questions & Answers on the government job page (Views/Jobs/details.cshtml, Scripts/commentJs.js). */
.qa {
    --qa-accent: #e11d48;
    --qa-ink: #0f172a;
    --qa-muted: #64748b;
    --qa-line: #e8ebf3;
    --qa-soft: #f8fafc;
    margin: 18px 0 40px; border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--qa-line);
    box-shadow: 0 2px 4px rgba(15, 23, 42, .04), 0 14px 32px rgba(15, 23, 42, .08);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif; color: var(--qa-ink);
}

/* header */
.qa-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: #fff;
    background: radial-gradient(circle at 92% -30%, rgba(255, 255, 255, .25), transparent 45%), linear-gradient(120deg, #be123c 0%, #e11d48 45%, #f97316 100%); }
.qa-head-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); font-size: 1.05rem; }
.qa-head-text { flex: 1 1 auto; min-width: 0; }
.qa-title { margin: 0; font-family: 'Montserrat', 'Montserrat Fallback', 'Inter', sans-serif; font-size: 1.12rem; font-weight: 800; color: #fff; }
.qa-sub { margin: 2px 0 0; font-size: .8rem; color: rgba(255, 255, 255, .9); }
.qa-count { flex: 0 0 auto; padding: 3px 10px; border-radius: 999px; background: #fff; color: #be123c; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.qa-count[hidden] { display: none; }

/* ask box */
.qa-ask { padding: 16px 18px; background: var(--qa-soft); border-bottom: 1px solid var(--qa-line); }
.qa-guest { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qa-field { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 700; color: #334155; }
.qa-field .form-control, .qa-box .form-control, .qa-reply-box .form-control {
    border-radius: 10px; border: 1px solid #dbe1ea; background: #fff; font-size: .9rem; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.qa-field .form-control:focus, .qa-box .form-control:focus, .qa-reply-box .form-control:focus { border-color: #fb7185; box-shadow: 0 0 0 3px rgba(225, 29, 72, .14); }
.qa-note { margin: 8px 0 0; font-size: .78rem; color: var(--qa-muted); }
.qa-note a { color: var(--qa-accent); font-weight: 700; }
.qa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.qa-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #fecdd3; background: #fff; color: #be123c; font-size: .78rem; font-weight: 700; cursor: pointer; transition: background-color .15s, border-color .15s; }
.qa-chip:hover, .qa-chip:focus-visible { background: #fff1f2; border-color: var(--qa-accent); outline: none; }
.qa-box { position: relative; display: block; margin: 0; }
.qa-box textarea { min-height: 96px; padding: 10px 12px 26px; resize: vertical; }
.qa-counter { position: absolute; right: 12px; bottom: 8px; font-size: .7rem; color: #94a3b8; pointer-events: none; }
.qa-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.qa-status { margin-right: auto; font-size: .82rem; font-weight: 600; color: var(--qa-muted); }
.qa-status.is-good { color: #15803d; }
.qa-status.is-bad { color: #b91c1c; }
.qa-post { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; border: 0; border-radius: 11px; cursor: pointer;
    background: linear-gradient(120deg, #e11d48, #f97316); color: #fff; font-weight: 800; font-size: .9rem; box-shadow: 0 6px 14px rgba(225, 29, 72, .25); transition: transform .15s, box-shadow .15s, opacity .15s; }
.qa-post:hover, .qa-post:focus-visible { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(225, 29, 72, .32); outline: none; }
.qa-post:disabled { opacity: .6; cursor: progress; transform: none; }
.qa-post-sm { height: 34px; padding: 0 14px; font-size: .82rem; }
.qa-cancel { height: 34px; padding: 0 12px; border: 1px solid #dbe1ea; border-radius: 10px; background: #fff; color: #475569; font-weight: 700; font-size: .82rem; cursor: pointer; }

/* list */
.qa-list { padding: 4px 18px; }
.qa-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--qa-line); }
.qa-item:last-child { border-bottom: 0; }
.qa-avatar { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #f1f5f9; }
.qa-avatar.is-letter { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff; font-weight: 800; font-size: 1rem; }
.qa-avatar-sm { width: 32px; height: 32px; font-size: .82rem; }
.qa-avatar-sm.is-letter { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }
.qa-body { flex: 1 1 auto; min-width: 0; }
.qa-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.qa-name { font-weight: 800; font-size: .9rem; color: var(--qa-ink); }
.qa-when { font-size: .74rem; color: #94a3b8; }
.qa-text { margin: 4px 0 0; font-size: .92rem; line-height: 1.5; color: #1e293b; white-space: pre-line; overflow-wrap: anywhere; }
.qa-tools { margin-top: 6px; }
.qa-reply-btn { border: 0; background: none; padding: 4px 8px 4px 0; color: var(--qa-accent); font-weight: 700; font-size: .8rem; cursor: pointer; }
.qa-reply-btn span { color: var(--qa-muted); font-weight: 600; }
.qa-reply-btn:hover, .qa-reply-btn:focus-visible { text-decoration: underline; outline: none; }
.qa-replies:empty { display: none; }
.qa-replies { margin-top: 8px; padding-left: 12px; border-left: 3px solid #fecdd3; display: flex; flex-direction: column; gap: 10px; }
.qa-reply { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--qa-soft); }
.qa-reply .qa-text { font-size: .88rem; }
.qa-reply-box { margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--qa-soft); border: 1px dashed #fecdd3; }
.qa-reply-box textarea { resize: vertical; }
.qa-reply-box .qa-actions { margin-top: 8px; }
.qa-reply-box.is-guest { font-size: .84rem; color: var(--qa-muted); }
.qa-reply-box.is-guest a { color: var(--qa-accent); font-weight: 700; }
.qa-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 12px; text-align: center; color: var(--qa-muted); font-size: .88rem; }
.qa-empty i { font-size: 2rem; color: #fda4af; margin-bottom: 4px; }
.qa-empty strong { color: var(--qa-ink); font-size: .98rem; }
.qa-more { display: block; width: calc(100% - 36px); margin: 4px 18px 16px; height: 40px; border-radius: 11px; border: 1px solid #fecdd3; background: #fff; color: #be123c; font-weight: 800; cursor: pointer; }
.qa-more:hover { background: #fff1f2; }
.qa-more[hidden] { display: none; }

/* loading placeholders */
.qa-skel { display: flex; gap: 12px; padding: 14px 0; }
.qa-skel span { width: 42px; height: 42px; border-radius: 50%; }
.qa-skel div { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.qa-skel i { display: block; height: 10px; border-radius: 6px; }
.qa-skel i:first-child { width: 30%; } .qa-skel i:last-child { width: 80%; }
.qa-skel span, .qa-skel i { background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%); background-size: 200% 100%; animation: qaShimmer 1.2s linear infinite; }
@keyframes qaShimmer { to { background-position: -200% 0; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 767px) {
    .qa-guest { grid-template-columns: 1fr; }
    .qa-head { padding: 12px 14px; }
    .qa-ask, .qa-list { padding-left: 14px; padding-right: 14px; }
    .qa-more { width: calc(100% - 28px); margin: 4px 14px 14px; }
    .qa-actions { flex-wrap: wrap; }
    .qa-status { flex: 1 1 100%; order: 2; }
    .qa-post:not(.qa-post-sm) { flex: 1 1 100%; justify-content: center; }
}

/* dark theme */
html[data-theme="dark"] .qa { --qa-ink: #e2e8f0; --qa-muted: #94a3b8; --qa-line: #1e293b; --qa-soft: #111c31; background: #0f172a; }
html[data-theme="dark"] .qa-text { color: #cbd5e1; }
html[data-theme="dark"] .qa-field { color: #cbd5e1; }
html[data-theme="dark"] .qa .form-control, html[data-theme="dark"] .qa-chip, html[data-theme="dark"] .qa-cancel, html[data-theme="dark"] .qa-more { background: #0b1220; border-color: #334155; color: #e2e8f0; }
@media (prefers-reduced-motion: reduce) { .qa-skel span, .qa-skel i { animation: none; } .qa-post { transition: none; } }
