/* ══════════════════════════════════════════
   TN600 Question Card — Frontend Widget
   ══════════════════════════════════════════ */

.tn600ai-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px 28px 22px;
    margin: 32px 0;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    font-family: -apple-system, 'Segoe UI', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Accent bar top */
.tn600ai-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 50%, #60a5fa 100%);
}

/* Header */
.tn600ai-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.tn600ai-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.tn600ai-badge--try {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

/* Question text */
.tn600ai-card__question {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.55;
    margin: 0 0 18px !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

/* Image */
.tn600ai-card__image {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    margin-bottom: 18px;
    background: #f8fafc;
}
.tn600ai-card__image img {
    display: block;
    width: 100%;
    max-height: 280px;
    object-fit: contain;
}

/* Answers */
.tn600ai-card__answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.tn600ai-ans {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s;
    font-size: 14.5px;
    line-height: 1.5;
    color: #1e293b;
}

.tn600ai-ans:hover:not(:disabled) {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateX(3px);
}

.tn600ai-ans__idx {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    transition: background .15s, color .15s;
}

.tn600ai-ans__text { flex: 1; }

/* Correct answer */
.tn600ai-ans--correct {
    background: #f0fdf4 !important;
    border-color: #4ade80 !important;
    color: #14532d !important;
}
.tn600ai-ans--correct .tn600ai-ans__idx {
    background: #4ade80;
    color: #fff;
}

/* Wrong answer */
.tn600ai-ans--wrong {
    background: #fef2f2 !important;
    border-color: #f87171 !important;
    color: #7f1d1d !important;
    animation: tn600ai-shake .4s ease;
}
.tn600ai-ans--wrong .tn600ai-ans__idx {
    background: #f87171;
    color: #fff;
}

@keyframes tn600ai-shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}

.tn600ai-ans:disabled { cursor: not-allowed; }

/* Result banner */
.tn600ai-result {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 14px;
    animation: tn600ai-fadein .3s ease;
}
.tn600ai-result--correct { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.tn600ai-result--wrong   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.tn600ai-result span     { font-size: 18px; }

@keyframes tn600ai-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Explanation */
.tn600ai-card__explanation {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 10px;
    font-size: 13.5px;
    color: #713f12;
    line-height: 1.6;
    margin-bottom: 16px;
    animation: tn600ai-fadein .35s ease;
}
.tn600ai-expl-icon { flex-shrink: 0; font-size: 18px; }

/* CTA */
.tn600ai-card__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.tn600ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .15s;
}
.tn600ai-btn--primary {
    background: #1d4ed8;
    color: #fff !important;
    border-color: #1d4ed8;
}
.tn600ai-btn--primary:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29,78,216,.3);
}
.tn600ai-btn--ghost {
    background: #fff;
    color: #374151 !important;
    border-color: #d1d5db;
}
.tn600ai-btn--ghost:hover {
    border-color: #1d4ed8;
    color: #1d4ed8 !important;
}

/* Responsive */
@media (max-width: 640px) {
    .tn600ai-card { padding: 20px 16px 16px; }
    .tn600ai-card__question { font-size: 15px; }
    .tn600ai-ans { font-size: 13.5px; padding: 10px 12px; }
}

/* ══════════════════════════════════════════
   TN600 FAQ — Pure CSS Accordion
   Google-readable, no JS required
   ══════════════════════════════════════════ */

.tn600ai-faq {
    margin: 40px 0;
    font-family: -apple-system, 'Segoe UI', sans-serif;
}

.tn600ai-faq__heading {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #6b7280;
    margin: 0 0 12px;
    padding: 0;
    border: none;
    background: none;
}

.tn600ai-faq__wrap {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

/* ── Mỗi item dùng <details> để Google đọc được toàn bộ nội dung ── */
.tn600ai-faq__item {
    border-bottom: 1px solid #e2e8f0;
}
.tn600ai-faq__item:last-child {
    border-bottom: none;
}

/* <details> reset */
.tn600ai-faq__item details {
    margin: 0;
    padding: 0;
}

/* <summary> = dòng câu hỏi */
.tn600ai-faq__item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
    color: #0f172a;
    line-height: 1.55;
    transition: background .15s, color .15s;
    user-select: none;
    -webkit-user-select: none;
}
.tn600ai-faq__item summary::-webkit-details-marker { display: none; }
.tn600ai-faq__item summary::marker { display: none; }

.tn600ai-faq__item summary:hover {
    background: #f8fafc;
}

/* Câu hỏi đang mở → xanh */
.tn600ai-faq__item details[open] > summary {
    color: #1a73e8;
    background: #f8fafc;
}

/* Văn bản câu hỏi */
.tn600ai-faq__q-text {
    flex: 1;
}

/* Mũi tên ▾ */
.tn600ai-faq__arrow {
    flex-shrink: 0;
    font-size: 14px;
    color: #94a3b8;
    display: inline-block;
    transition: transform .25s cubic-bezier(.4,0,.2,1), color .15s;
}

/* Khi mở: xoay 180° + đổi màu xanh */
details[open] > summary .tn600ai-faq__arrow {
    transform: rotate(180deg);
    color: #1a73e8;
}

/* ── Phần trả lời ── */
.tn600ai-faq__body {
    padding: 16px 20px 20px;
    font-size: 14.5px;
    line-height: 1.75;
    color: #475569;
    border-top: 1px solid #e2e8f0;

    /* Slide-in animation thuần CSS */
    animation: tn600ai-faq-slidein .25s cubic-bezier(.4,0,.2,1) both;
}

@keyframes tn600ai-faq-slidein {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tn600ai-faq__body strong {
    color: #0f172a;
    font-weight: 600;
}

.tn600ai-faq__body p {
    margin: 0 0 10px;
    padding: 0;
}
.tn600ai-faq__body p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .tn600ai-faq__item summary {
        padding: 14px 16px;
        font-size: 14px;
    }
    .tn600ai-faq__body {
        padding: 14px 16px 16px;
        font-size: 13.5px;
    }
}
