/* ============================================================
   AI QUIZ SOLVER — "(name) passed your quiz" card + result modal
   ============================================================ */

/* ── In-chat clickable card ── */
.aqs-card-msg {
    display: flex;
    justify-content: center;
    margin: 10px 0;
    padding: 0 12px;
}

.aqs-pass-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    border: none;
    cursor: pointer;
    text-align: left;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.10), rgba(255, 64, 129, 0.06));
    box-shadow: 0 2px 14px rgba(233, 30, 99, 0.14);
    border: 1px solid rgba(233, 30, 99, 0.18);
    transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.aqs-pass-card:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(233, 30, 99, 0.22); }
.aqs-pass-card:active { transform: scale(0.985); }

.aqs-pass-icon {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #E91E63, #FF4081);
    box-shadow: 0 3px 10px rgba(233, 30, 99, 0.4);
}

.aqs-pass-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.aqs-pass-title {
    font-size: 14px; font-weight: 700; color: #1a1a1a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aqs-pass-sub { font-size: 12px; color: #8a7080; line-height: 1.3; }
.aqs-pass-arrow { flex: 0 0 auto; color: #E91E63; opacity: 0.7; }

/* ── Result modal ── */
.aqs-modal-overlay {
    position: fixed; inset: 0;
    z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(20, 8, 16, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.aqs-modal-overlay.aqs-modal--visible { opacity: 1; }

.aqs-modal {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    transform: translateY(18px) scale(0.96);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.aqs-modal-overlay.aqs-modal--visible .aqs-modal { transform: translateY(0) scale(1); }

.aqs-modal-head {
    position: relative;
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, #E91E63, #FF4081);
    color: #fff;
}
.aqs-modal-title { font-size: 17px; font-weight: 800; padding-right: 32px; }
.aqs-modal-score { font-size: 13px; opacity: 0.92; margin-top: 3px; font-weight: 600; }
.aqs-modal-x {
    position: absolute; top: 16px; right: 16px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    transition: background 0.15s ease;
}
.aqs-modal-x:hover { background: rgba(255, 255, 255, 0.3); }

.aqs-modal-body {
    padding: 14px 16px 18px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.aqs-q {
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.aqs-q:last-child { border-bottom: none; }
.aqs-q-head { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 8px; }
.aqs-q-num {
    flex: 0 0 auto;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 12px; font-weight: 700;
    color: #E91E63;
    background: rgba(233, 30, 99, 0.1);
}
.aqs-q-text { font-size: 14px; font-weight: 600; color: #1a1a1a; line-height: 1.35; }

.aqs-ans-line {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 10px;
    border-radius: 10px;
    margin-top: 5px;
    font-size: 13px;
}
.aqs-ans-label { flex: 0 0 auto; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.7; }
.aqs-ans-text { flex: 1; min-width: 0; }
.aqs-ans-mark { flex: 0 0 auto; font-weight: 800; }

.aqs-ok { background: rgba(76, 175, 80, 0.1); color: #2e7d32; }
.aqs-ok .aqs-ans-mark { color: #2e7d32; }
.aqs-bad { background: rgba(239, 83, 80, 0.1); color: #c62828; }
.aqs-bad .aqs-ans-mark { color: #c62828; }
.aqs-correct { background: rgba(76, 175, 80, 0.06); color: #2e7d32; }

/* Dark-mode friendliness if the app theming applies one */
@media (prefers-color-scheme: dark) {
    .aqs-pass-title { color: #f5f5f5; }
}

@media (max-width: 480px) {
    .aqs-modal { max-height: 86vh; border-radius: 20px; }
    .aqs-pass-card { max-width: 100%; }
}
