/* ──────────────────────────────────────────────────────────────────────────────
 * screening.css — styles for per-question screening modal + inline banner.
 * Coexists with existing service medical screening modal — different class
 * names ('cqs-' prefix) avoid collision.
 * ────────────────────────────────────────────────────────────────────────── */

/* Inline banner under the question field */
.cqs-banner {
    margin-top: 10px;
    padding: 14px 18px;
    border-radius: 8px;
    border-left: 4px solid;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.5;
    animation: cqsBannerSlide .25s ease-out;
}
@keyframes cqsBannerSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cqs-banner-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.cqs-banner-content { flex: 1; }
.cqs-banner-title { font-weight: 600; margin-bottom: 4px; }
.cqs-banner-body { color: inherit; opacity: .9; }
.cqs-banner-body * { max-width: 100%; }

.cqs-severity-info    { background: #eff6ff; border-color: #3b82f6; color: #1e3a8a; }
.cqs-severity-warning { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.cqs-severity-danger  { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }
.cqs-severity-block   { background: #18181b; border-color: #71717a; color: #fafafa; }

/* Modal overlay */
.cqs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: cqsFade .2s ease-out;
}
@keyframes cqsFade { from { opacity: 0; } to { opacity: 1; } }

.cqs-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cqsScale .25s ease-out;
}
@keyframes cqsScale { from { transform: scale(.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.cqs-modal-header {
    padding: 22px 26px 16px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.cqs-modal-header-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.cqs-severity-info    .cqs-modal-header-icon { background: #dbeafe; color: #1e40af; }
.cqs-severity-warning .cqs-modal-header-icon { background: #fef3c7; color: #92400e; }
.cqs-severity-danger  .cqs-modal-header-icon { background: #fee2e2; color: #991b1b; }
.cqs-severity-block   .cqs-modal-header-icon { background: #18181b; color: #fafafa; }

.cqs-modal-title { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0; line-height: 1.3; }
.cqs-modal-subtitle { font-size: 12px; color: #64748b; margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

.cqs-modal-body {
    padding: 20px 26px;
    overflow-y: auto;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.6;
    flex: 1;
}
.cqs-modal-body * { max-width: 100%; }
.cqs-modal-body a { color: #2A7178; text-decoration: underline; }

.cqs-modal-ack {
    padding: 14px 26px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}
.cqs-checkbox-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.cqs-checkbox-row input[type=checkbox] { margin-top: 3px; width: 18px; height: 18px; cursor: pointer; flex-shrink: 0; }
.cqs-checkbox-label { font-size: 14px; color: #0f172a; font-weight: 500; line-height: 1.4; }

.cqs-typed-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    margin-top: 8px;
    transition: border-color .15s;
}
.cqs-typed-input:focus { border-color: #2A7178; outline: none; }
.cqs-typed-hint { font-size: 12px; color: #64748b; margin-top: 6px; }
.cqs-typed-hint code { background: #fff; padding: 2px 8px; border-radius: 4px; border: 1px solid #e5e7eb; font-family: monospace; }

.cqs-scroll-progress {
    height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin: 8px 0;
}
.cqs-scroll-fill { height: 100%; background: linear-gradient(90deg, #2A7178, #14b8a6); width: 0%; transition: width .2s; }

.cqs-modal-footer {
    padding: 14px 26px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}
.cqs-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.cqs-btn:disabled { opacity: .45; cursor: not-allowed; }
.cqs-btn-primary { background: #2A7178; color: #fff; }
.cqs-btn-primary:not(:disabled):hover { background: #1f5b61; }
.cqs-btn-danger { background: #dc2626; color: #fff; }
.cqs-btn-danger:not(:disabled):hover { background: #b91c1c; }
.cqs-btn-secondary { background: #e5e7eb; color: #1f2937; }
.cqs-btn-secondary:hover { background: #d1d5db; }

.cqs-error { color: #b91c1c; font-size: 13px; margin-top: 8px; }

/* Final summary */
.cqs-summary-list { list-style: none; padding: 0; margin: 0; }
.cqs-summary-item {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fff;
}
.cqs-summary-q { font-weight: 600; color: #0f172a; margin-bottom: 4px; font-size: 14px; }
.cqs-summary-a { font-size: 13px; color: #64748b; }
.cqs-summary-warn { font-size: 13px; color: #92400e; margin-top: 6px; font-weight: 500; }

/* Mobile */
@media (max-width: 600px) {
    .cqs-modal { max-height: 100vh; border-radius: 0; }
    .cqs-modal-header, .cqs-modal-body, .cqs-modal-ack, .cqs-modal-footer { padding-left: 18px; padding-right: 18px; }
}
