/* [dtlx_on_tap] - che do On tap tung cau, dung mau chung voi quiz.css
   (xanh duong #1e4fd8, xanh la #1e7e34, do #b32d2e) de dong bo giao dien. */

.dtlx-page-wrap--ontap { max-width: 100%; width: 80%; padding: 32px 24px 70px; }
@media (max-width: 600px) {
    .dtlx-page-wrap--ontap { width: 100%; padding: 20px 14px 40px; }
}

.dtlx-ontap-app { max-width: none; margin: 0; padding: 0; background: #fff; }

/* Man hinh "chon hang" - the trung tam, co dai ban hieu */
.dtlx-ontap-narrow {
    max-width: 100%;
    margin: 24px auto 0;
    padding: 48px 40px;
    background: linear-gradient(180deg,#f7f9ff 0%,#fff 55%);
    border: 1px solid #eef1f8;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(15,30,70,.06);
}
.dtlx-ontap-title {
    text-align: center; font-size: 26px; font-weight: 800; color: #123a9e;
    letter-spacing: .3px;
}
.dtlx-ontap-subtitle { text-align: center; color: #667; font-size: 15px; margin: 8px 0 32px; }
.dtlx-ontap-empty { text-align: center; color: #999; }
.dtlx-ontap-loading { text-align: center; color: #666; padding: 60px 0; font-size: 15px; }

.dtlx-ontap-hang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dtlx-ontap-hang-btn {
    border: 2px solid #e2e5eb; border-radius: 14px; background: #fff; padding: 22px 20px;
    text-align: left; cursor: pointer; display: flex; flex-direction: column;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.dtlx-ontap-hang-btn:hover {
    border-color: #1e4fd8; background: #f5f8ff;
    box-shadow: 0 8px 20px rgba(30,79,216,.12); transform: translateY(-2px);
}
.dtlx-ontap-hang-ten { font-size: 19px; font-weight: 800; color: #123a9e; }
.dtlx-ontap-hang-meta { font-size: 12.5px; color: #888; }

/* Layout 2 cot: sidebar + noi dung chinh */
.dtlx-ontap-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; margin-top: 8px; }

.dtlx-ontap-side {
    background: #fff; border: 1px solid #eef1f8; border-radius: 16px; padding: 22px;
    box-shadow: 0 4px 18px rgba(15,30,70,.06);
    display: flex; flex-direction: column; gap: 16px;
    position: sticky; top: 16px;
}
.dtlx-ontap-side-label { display: flex; align-items: center; gap: 8px; }
.dtlx-ontap-side-label .dashicons { color: #1e4fd8; }
.dtlx-ontap-filter-chuong {
    flex: 1; padding: 11px 36px 11px 12px; border-radius: 9px; border: 1px solid #e2e5eb !important;
    font-size: 14px; background-color: #fafbfd !important; box-shadow: none !important; height: auto !important;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23667' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

.dtlx-ontap-search-label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: #222; }
.dtlx-ontap-search-label .dashicons { color: #1e4fd8; }
.dtlx-ontap-search-input { padding: 11px 12px; border-radius: 9px; border: 1px solid #e2e5eb !important; font-size: 14px; background-color: #fafbfd !important; box-shadow: none !important; height: auto !important; }
.dtlx-ontap-search-input:focus { border-color: #1e4fd8 !important; outline: none; background-color: #fff !important; }

.dtlx-ontap-list-head { display: flex; align-items: center; justify-content: space-between; }
.dtlx-ontap-list-head span { font-weight: 700; font-size: 14px; color: #222; }
.dtlx-ontap-btn-xoadiem {
    background: #fdeded; color: #b32d2e; border: 1px solid #f3caca; border-radius: 7px;
    padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.dtlx-ontap-btn-xoadiem:hover { background: #b32d2e; color: #fff; border-color: #b32d2e; }

.dtlx-ontap-dots {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 8px;
    max-height: 340px; overflow-y: auto; overflow-x: hidden; padding-right: 4px;
}
.dtlx-ontap-dot {
    aspect-ratio: 1 / 1; width: 100%; min-width: 0; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #e2e5eb; border-radius: 9px; background: #f7f8fa; color: #333;
    font-weight: 700; font-size: 13px; cursor: pointer; box-sizing: border-box;
    transition: all .12s ease;
}
.dtlx-ontap-dot:hover { border-color: #1e4fd8; background: #eef3ff; }
.dtlx-ontap-dot.is-dung { background: #1e7e34; border-color: #1e7e34; color: #fff; }
.dtlx-ontap-dot.is-sai { background: #b32d2e; border-color: #b32d2e; color: #fff; }
.dtlx-ontap-dot.is-active { box-shadow: 0 0 0 3px rgba(30,79,216,.35); border-color: #1e4fd8; }

.dtlx-ontap-btn-thithu {
    margin-top: auto; background: linear-gradient(145deg,#1e4fd8,#123a9e); color: #fff; border: none; border-radius: 10px;
    padding: 14px; font-size: 14.5px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 6px 16px rgba(30,79,216,.25);
}
.dtlx-ontap-btn-thithu:hover { filter: brightness(1.08); }

/* Khu vuc chinh */
.dtlx-ontap-main { display: flex; flex-direction: column; gap: 18px; }
.dtlx-ontap-bar {
    background: #fff; border: 1px solid #eef1f8; border-radius: 12px; padding: 15px 22px;
    box-shadow: 0 4px 18px rgba(15,30,70,.06);
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.dtlx-ontap-bar-center { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.dtlx-ontap-progress { font-weight: 800; font-size: 15px; color: #222; }
.dtlx-ontap-hint { font-size: 12px; color: #888; }
.dtlx-ontap-hint kbd { background: #f2f4f7; border: 1px solid #ddd; border-radius: 4px; padding: 1px 6px; font-size: 11px; }
.dtlx-ontap-nav-btn {
    background: #f2f4f7; border: 1px solid #e2e5eb; border-radius: 9px; padding: 10px 20px;
    font-size: 14px; font-weight: 600; color: #333; cursor: pointer; transition: background .12s ease;
}
.dtlx-ontap-nav-btn:hover { background: #e7eaef; }

.dtlx-ontap-question-card {
    background: #fff; border: 1px solid #eef1f8; border-radius: 16px; padding: 30px 32px;
    box-shadow: 0 4px 20px rgba(15,30,70,.07);
}
.dtlx-ontap-q-tags { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.dtlx-ontap-q-tag {
    display: inline-flex; align-items: center; padding: 6px 16px; border-radius: 20px;
    font-size: 13px; font-weight: 700; background: #f2f4f7; color: #555;
}
.dtlx-ontap-q-tag-num { background: #1e4fd8; color: #fff; }
.dtlx-ontap-q-tag-liet { background: #fdeded; color: #b32d2e; font-weight: 800; }
.dtlx-ontap-q-text { font-size: 18px; font-weight: 700; color: #1a1a1a; margin: 0 0 20px; line-height: 1.55; }
.dtlx-ontap-q-img { max-width: 100%; border-radius: 10px; margin-bottom: 20px; }

.dtlx-ontap-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.dtlx-ontap-option {
    display: flex; align-items: center; gap: 12px; text-align: left;
    border: 2px solid #e2e5eb; border-radius: 10px; background: #fff;
    padding: 16px 20px; font-size: 15px; cursor: pointer; color: #222;
    transition: border-color .12s ease, background .12s ease;
}
.dtlx-ontap-option:hover { border-color: #1e4fd8; background: #f7f9ff; }
.dtlx-ontap-opt-num { font-weight: 700; color: #1e4fd8; }
.dtlx-ontap-option.is-correct { background: #e5f6ea; border-color: #1e7e34; color: #1e7e34; }
.dtlx-ontap-option.is-correct .dtlx-ontap-opt-num { color: #1e7e34; }
.dtlx-ontap-option.is-correct::before { content: "✓"; font-weight: 800; margin-right: 4px; }
.dtlx-ontap-option.is-wrong { background: #fbe7e7; border-color: #b32d2e; color: #b32d2e; }
.dtlx-ontap-option.is-wrong .dtlx-ontap-opt-num { color: #b32d2e; }
.dtlx-ontap-option.is-wrong::before { content: "✗"; font-weight: 800; margin-right: 4px; }

.dtlx-ontap-explain {
    margin-top: 20px; background: #fff8e1; border: 1px solid #f0d878; border-radius: 10px;
    padding: 18px 22px; color: #6b5a12;
}
.dtlx-ontap-explain strong { display: block; margin-bottom: 6px; }
.dtlx-ontap-explain p { margin: 0; line-height: 1.65; }

@media (max-width: 1100px) {
    .dtlx-ontap-grid { grid-template-columns: 280px 1fr; }
}

@media (max-width: 900px) {
    .dtlx-ontap-grid { grid-template-columns: 1fr; }
    .dtlx-ontap-side { order: 2; position: static; }
    .dtlx-ontap-main { order: 1; }
    .dtlx-ontap-hang-grid { grid-template-columns: 1fr; }
    .dtlx-ontap-dots { max-height: none; }
    .dtlx-ontap-narrow { padding: 32px 22px; border-radius: 16px; }
    .dtlx-ontap-question-card { padding: 22px 20px; }
}
