/* huyen-khong-dai-quai.css */

.hkdq-wrapper {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    background: #fffdf5; /* Warm light yellow tint to match the image UI */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 1000px;
    margin: 0 auto 30px auto;
}

.hkdq-header {
    text-align: center;
    border-bottom: 2px solid #f5b041;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.hkdq-title {
    color: #e65100;
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
}

.hkdq-tagline {
    font-size: 16px;
    color: #5d4037;
    margin: 0;
    font-style: italic;
}

.hkdq-intro {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    background: #fff8e1;
    padding: 15px;
    border-left: 4px solid #f5b041;
    border-radius: 4px;
}

/* Form Styles */
.hkdq-form-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #ffe082;
}

.hkdq-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hkdq-form-group-title {
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.hkdq-form-group-title h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #4e342e;
    text-transform: uppercase;
    flex: 1;
}

.hkdq-form-col {
    flex: 1;
    min-width: 300px;
}

.hkdq-form-group {
    margin-bottom: 15px;
}

.hkdq-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #4e342e;
}

.hkdq-input, .hkdq-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cfd8dc;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
}

.hkdq-input:focus {
    outline: none;
    border-color: #f5b041;
    box-shadow: 0 0 5px rgba(245, 176, 65, 0.3);
}

.hkdq-radio-group, .hkdq-checkbox-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.hkdq-radio-group label, .hkdq-checkbox-group label {
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    margin-bottom: 0;
    color: #333;
}

/* Buttons */
.hkdq-btn-lap {
    background: #e65100;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    padding: 15px 40px;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 4px 6px rgba(230, 81, 0, 0.3);
}

.hkdq-btn-lap:hover {
    background: #bf360c;
    transform: translateY(-2px);
}

/* Summary Box */
.hkdq-summary-box {
    background: #e8f5e9;
    border: 1px solid #81c784;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

/* Canvas Area - Responsive aspects */
.hkdq-canvas-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Perfect square container */
    max-width: 800px;
    background: #fafafa;
    border: 2px solid #eceff1;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 auto;
}

.hkdq-map-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    transform-origin: center center;
}

.hkdq-compass-dragger {
    position: absolute;
    z-index: 2;
    cursor: grab;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 1 / 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
}

.hkdq-compass-dragger:active {
    cursor: grabbing;
}

#hkdq-compass-canvas {
    max-width: 100%;
    height: auto;
    display: block;
    pointer-events: none; /* Drag events pass to container */
    opacity: 0.85;
}

/* Controls Panel - Outside the Canvas for Mobile Responsiveness */
.hkdq-controls {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    max-width: 800px;
    margin: 15px auto 20px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hkdq-controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

#hkdq-controls-sliders {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hkdq-control-item {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hkdq-control-item label {
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    color: #4e342e !important;
    margin-bottom: 2px;
}

.hkdq-control-item input[type="range"] {
    width: 100%;
    cursor: pointer;
    margin: 0;
}

/* Action buttons */
.hkdq-canvas-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hkdq-btn-action {
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.1s;
}

.hkdq-btn-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.hkdq-btn-download {
    background: #1976d2;
}

.hkdq-btn-copy {
    background: #388e3c;
}

/* AI Section Links */
.hkdq-ai-links {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hkdq-btn-ai-link {
    text-decoration: none;
    padding: 10px 18px;
    color: #fff;
    border-radius: 4px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.92rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hkdq-btn-ai-link:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.hkdq-btn-gemini {
    background: #1a73e8;
}

.hkdq-btn-chatgpt {
    background: #10a37f;
}

/* 8 Directions Table */
.hkdq-directions-table-section {
    margin-top: 30px;
    background: #ffffff;
    border: 1px solid #ffe082;
    padding: 20px;
    border-radius: 8px;
}

.hkdq-directions-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.hkdq-directions-table th {
    background: #fff8e1;
    border: 1px solid #ffe082;
    font-weight: bold;
    color: #4e342e;
    padding: 10px;
}

.hkdq-directions-table td {
    padding: 10px;
    border: 1px solid #eee;
    color: #333;
}

.hkdq-directions-table tr:nth-child(even) td {
    background: #fafafa;
}

/* AI Document Luận Giải */
.hkdq-analysis-doc {
    background: #ffffff;
    border: 1px solid #ffd54f;
    border-radius: 8px;
    padding: 25px;
    color: #333;
}

.hkdq-doc-section {
    margin-top: 20px;
}

.hkdq-doc-section h4 {
    margin: 0 0 10px 0;
    color: #e65100;
    font-size: 1.15rem;
    border-left: 4px solid #e65100;
    padding-left: 10px;
}

.hkdq-doc-section p, .hkdq-doc-section ul {
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Footer */
.hkdq-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #777;
    font-size: 14px;
}

.hkdq-footer p {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hkdq-form-row {
        flex-direction: column;
    }
    
    .hkdq-form-group-title {
        display: none;
    }
    
    .hkdq-canvas-container {
        max-width: 100%;
        height: auto;
    }
    
    .hkdq-control-item {
        flex: 100%;
    }
}

/* Learn Section & Accordion Styles */
.hkdq-learn-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px dashed #f5b041;
}

.hkdq-learn-header {
    background: #e65100;
    color: #fff;
    padding: 18px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(230, 81, 0, 0.15);
    margin-bottom: 25px;
}

.hkdq-learn-header h3 {
    margin: 0;
    font-size: 1.55em;
    font-weight: 700;
}

.hkdq-learn-header p {
    margin: 6px 0 0 0;
    opacity: 0.95;
    font-size: 0.95rem;
}

.hkdq-chapter {
    margin-bottom: 15px;
    border: 1px solid #ffd54f;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.hkdq-chapter-header {
    background: #fffdf5;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #e65100;
    border-bottom: 1px solid #ffe082;
    transition: background 0.2s;
}

.hkdq-chapter-header:hover {
    background: #fff8e1;
}

.hkdq-chapter-title {
    flex-grow: 1;
    margin-left: 10px;
    font-size: 1.05rem;
}

.hkdq-chapter-body {
    display: none;
    padding: 20px;
    background: #ffffff;
}

.hkdq-lesson-item {
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.hkdq-lesson-toggle {
    background: #f8fafc;
    padding: 12px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.hkdq-lesson-toggle:hover {
    background: #f1f5f9;
}

.hkdq-lesson-title {
    flex-grow: 1;
    margin-left: 10px;
    font-weight: 600;
    color: #475569;
    font-size: 0.95rem;
}

.hkdq-lesson-body {
    display: none;
    padding: 15px 20px;
    line-height: 1.7;
    color: #334155;
    background: #fff;
    font-size: 0.95rem;
}

.hkdq-lesson-body p {
    margin-top: 0;
    margin-bottom: 12px;
}

.hkdq-lesson-body ul, .hkdq-lesson-body ol {
    margin-top: 0;
    margin-bottom: 12px;
    padding-left: 20px;
}

.hkdq-lesson-body li {
    margin-bottom: 6px;
}

.hkdq-lesson-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.92rem;
}

.hkdq-lesson-table th, .hkdq-lesson-table td {
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    text-align: left;
}

.hkdq-lesson-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: bold;
}

.hkdq-lesson-table tr:nth-child(even) td {
    background: #f8fafc;
}

/* ========== AI INSTRUCTIONS & BOT BUTTONS ========== */
.hk-ai-guide-box {
    background: #fffdf5;
    border: 1.5px solid #f3c267;
    border-radius: 14px;
    padding: 22px 20px;
    margin-top: 20px;
    margin-bottom: 22px;
    box-shadow: 0 4px 15px rgba(243, 194, 103, 0.12);
    box-sizing: border-box;
}

.hk-ai-guide-title {
    text-align: center;
    color: #8b0000;
    font-family: 'Playfair Display', serif, 'Be Vietnam Pro', sans-serif;
    font-size: 16.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.hk-ai-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.hk-ai-step-card {
    border-radius: 10px;
    padding: 14px 12px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.hk-ai-step-card.step-1 { border: 1px solid #d0ebff; background: #f8fbff; }
.hk-ai-step-card.step-2 { border: 1px solid #b2ebf2; background: #f0fdff; }
.hk-ai-step-card.step-3 { border: 1px solid #c7f0db; background: #f2fbf7; }

.hk-ai-step-card .step-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.hk-ai-step-card.step-1 .step-title { color: #dc2626; }
.hk-ai-step-card.step-2 .step-title { color: #0284c7; }
.hk-ai-step-card.step-3 .step-title { color: #059669; }

.hk-ai-step-card .step-desc { font-size: 12.5px; color: #374151; line-height: 1.5; }

.hk-ai-text-box {
    background: #fffdfa;
    border: 1px solid #ebd9c5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(139, 0, 0, 0.03);
    box-sizing: border-box;
}

.hk-ai-text-title {
    margin: 0 0 12px 0;
    color: #8b0000;
    font-family: 'Playfair Display', serif, 'Be Vietnam Pro', sans-serif;
    font-weight: 700;
    font-size: 16px;
}

.hk-ai-textarea {
    width: 100%;
    min-height: 150px;
    max-height: 250px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    font-family: Consolas, Monaco, monospace;
    font-size: 12.5px;
    line-height: 1.5;
    color: #374151;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
}

.hk-ai-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
}

.hk-btn-copy-ai {
    background: #8b0000;
    color: #ffffff !important;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(139, 0, 0, 0.2);
}

.hk-btn-copy-ai:hover {
    background: #a00b0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(139, 0, 0, 0.3);
}

.hk-btn-gemini {
    background: #2563eb;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.hk-btn-gemini:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

@media (max-width: 768px) {
    .hk-ai-guide-title { font-size: 14.5px; }
    .hk-ai-steps-grid { grid-template-columns: 1fr; gap: 10px; }
    .hk-ai-btn-group { flex-direction: column; width: 100%; }
    .hk-btn-copy-ai, .hk-btn-gemini { width: 100%; box-sizing: border-box; text-align: center; }
}



/* ========== ZALO CTA BANNER & AI BOT DIRECT CARD (HKDQ v2.0) ========== */
.hkdq-btn-lap,
.hkdq-btn-run-ai,
.hkdq-ai-chip,
.hkdq-btn-send-chat,
.hkdq-btn-copy-ai-res,
.hk-btn-copy-ai,
.hkdq-btn-action {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.hkdq-cta-banner {
    margin: 22px 0;
    padding: 18px 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #7c2d12 0%, #c2410c 55%, #b91c1c 100%);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(194, 65, 12, 0.25);
}

.hkdq-cta-icon {
    font-size: 34px;
    line-height: 1;
    flex-shrink: 0;
}

.hkdq-cta-content {
    flex: 1;
}

.hkdq-cta-title {
    font-size: 16.5px;
    font-weight: 800;
    color: #ffffff !important;
    margin: 0 0 4px 0;
    line-height: 1.35;
}

.hkdq-cta-desc {
    font-size: 13.5px;
    color: #ffffff !important;
    opacity: 0.95;
    margin: 0;
    line-height: 1.45;
}

.hkdq-cta-btn {
    background: #fde68a;
    color: #7c2d12 !important;
    font-weight: 800;
    font-size: 14.5px;
    padding: 11px 20px;
    border-radius: 999px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
}

.hkdq-cta-btn:hover {
    background: #fef08a;
    transform: translateY(-2px);
}

/* AI Direct Card */
.hkdq-ai-direct-card {
    border: 2px solid #f59e0b;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(180, 83, 9, 0.14);
    margin-bottom: 20px;
}

.hkdq-ai-direct-header {
    background: linear-gradient(135deg, #431407 0%, #9a3412 55%, #b91c1c 100%);
    padding: 22px 24px;
    color: #ffffff !important;
}

.hkdq-ai-direct-badge {
    display: inline-block;
    background: rgba(253, 230, 138, 0.18);
    border: 1px solid rgba(253, 230, 138, 0.55);
    color: #fde68a !important;
    font-size: 11.5px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hkdq-ai-direct-title {
    color: #fde68a !important;
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.hkdq-ai-direct-sub {
    color: #f8fafc !important;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
}

.hkdq-ai-direct-body {
    padding: 22px 24px;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.hkdq-ai-quick-chips-label {
    font-size: 13px;
    font-weight: 700;
    color: #9a3412;
    margin-bottom: 10px;
}

.hkdq-ai-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.hkdq-ai-chip {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Be Vietnam Pro', sans-serif;
    text-align: left;
}

.hkdq-ai-chip:hover,
.hkdq-ai-chip.active {
    background: #c2410c;
    border-color: #c2410c;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(194, 65, 12, 0.25);
}

.hkdq-ai-input-wrap {
    margin-bottom: 16px;
}

.hkdq-ai-input-wrap label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.hkdq-ai-question-field {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14.5px;
    color: #111827;
    background: #ffffff;
    font-family: 'Be Vietnam Pro', sans-serif;
    box-sizing: border-box;
}

.hkdq-ai-question-field:focus {
    border-color: #c2410c;
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.14);
    outline: none;
}

.hkdq-ai-action-row {
    text-align: center;
    margin: 8px 0 10px;
}

.hkdq-btn-run-ai {
    width: 100%;
    max-width: 640px;
    padding: 15px 26px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #9a3412 0%, #c2410c 50%, #b91c1c 100%);
    color: #fde68a !important;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(194, 65, 12, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.hkdq-btn-run-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(194, 65, 12, 0.42);
}

.hkdq-btn-run-ai:disabled {
    opacity: 0.65;
    cursor: wait;
}

.hkdq-ai-loading {
    margin-top: 18px;
    padding: 24px 18px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px dashed #ea580c;
    text-align: center;
}

.hkdq-ai-spinner {
    width: 38px;
    height: 38px;
    margin: 0 auto 12px;
    border: 4px solid #fed7aa;
    border-top-color: #c2410c;
    border-radius: 50%;
    animation: hkdq-spin 0.9s linear infinite;
}

@keyframes hkdq-spin {
    to { transform: rotate(360deg); }
}

.hkdq-ai-loading-text {
    font-size: 15px;
    font-weight: 700;
    color: #9a3412;
    margin-bottom: 4px;
}

.hkdq-ai-loading-sub {
    font-size: 12.5px;
    color: #b45309;
}

.hkdq-ai-error {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 14px;
    font-weight: 600;
}

.hkdq-ai-output-wrap {
    margin-top: 22px;
}

.hkdq-ai-output-card {
    border: 1.5px solid #fdba74;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
}

.hkdq-ai-output-header {
    background: linear-gradient(135deg, #431407 0%, #9a3412 100%);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.hkdq-ai-output-title {
    color: #fde68a !important;
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.hkdq-btn-copy-ai-res {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(253, 230, 138, 0.5);
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

/* Markdown Body */
.hkdq-ai-markdown-body {
    padding: 22px 24px;
    font-size: 15px;
    line-height: 1.75;
    color: #1f2937;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.hkdq-md-h3,
.hkdq-md-h4 {
    font-size: 16.5px;
    font-weight: 800;
    color: #9a3412 !important;
    background: #fff7ed;
    border-left: 4px solid #c2410c;
    padding: 10px 14px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0 12px 0;
    line-height: 1.4;
}

.hkdq-md-h5 {
    font-size: 15px;
    font-weight: 700;
    color: #b45309 !important;
    margin: 14px 0 8px 0;
}

.hkdq-md-p {
    margin: 0 0 12px 0;
    color: #1f2937;
}

.hkdq-md-ul {
    margin: 0 0 14px 0;
    padding-left: 22px;
}

.hkdq-md-li {
    margin-bottom: 8px;
    color: #1f2937;
}

.hkdq-md-li strong,
.hkdq-md-p strong {
    color: #9a3412;
    font-weight: 700;
}

.hkdq-md-quote {
    margin: 12px 0;
    padding: 12px 16px;
    background: #fff7ed;
    border-left: 4px solid #ea580c;
    color: #4b5563;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.hkdq-md-hr {
    border: none;
    border-top: 1px dashed #e5e7eb;
    margin: 18px 0;
}

.hkdq-md-table-wrap {
    overflow-x: auto;
    margin: 14px 0;
}

.hkdq-md-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.hkdq-md-table th {
    background: #9a3412;
    color: #ffffff !important;
    padding: 9px 12px;
    text-align: left;
    font-weight: 700;
}

.hkdq-md-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

/* Follow-up Chat */
.hkdq-ai-chat-wrap {
    margin-top: 20px;
    background: #fff7ed;
    border: 1.5px solid #fdba74;
    border-radius: 14px;
    padding: 18px 20px;
}

.hkdq-ai-chat-title {
    font-size: 14px;
    font-weight: 700;
    color: #9a3412;
    margin-bottom: 12px;
}

.hkdq-ai-chat-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.hkdq-chat-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14.5px;
    line-height: 1.65;
}

.hkdq-chat-user {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    align-self: flex-end;
    max-width: 90%;
}

.hkdq-chat-bot {
    background: #ffffff;
    border: 1px solid #fdba74;
    align-self: flex-start;
    width: 100%;
}

.hkdq-chat-role {
    font-size: 12px;
    font-weight: 800;
    color: #9a3412;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.hkdq-chat-bot .hkdq-ai-markdown-body {
    padding: 6px 0 0 0;
}

.hkdq-ai-chat-input-row {
    display: flex;
    gap: 10px;
}

.hkdq-ai-chat-input {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.hkdq-btn-send-chat {
    height: 44px;
    padding: 0 20px;
    background: #c2410c;
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Be Vietnam Pro', sans-serif;
}

/* Legacy Option 2 Details */
.hkdq-legacy-ai-details {
    margin: 18px 0 28px 0;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
    overflow: hidden;
}

.hkdq-legacy-ai-summary {
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #9a3412;
    cursor: pointer;
    background: #ffedd5;
    user-select: none;
}

.hkdq-legacy-ai-inner {
    padding: 18px;
}

.hk-btn-chatgpt {
    background: #10a37f;
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

@media (max-width: 768px) {
    .hkdq-input,
    .hkdq-select,
    .hkdq-ai-question-field,
    .hkdq-ai-chat-input {
        font-size: 16px !important;
    }
    .hkdq-cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 18px 16px;
    }
    .hkdq-cta-btn {
        width: 100%;
        justify-content: center;
    }
    .hkdq-ai-direct-header {
        padding: 18px 16px;
    }
    .hkdq-ai-direct-title {
        font-size: 17px;
    }
    .hkdq-ai-direct-body {
        padding: 16px 14px;
    }
    .hkdq-ai-markdown-body {
        padding: 16px 14px;
        font-size: 14.5px;
    }
    .hkdq-ai-chat-input-row {
        flex-direction: column;
    }
    .hkdq-btn-send-chat,
    .hk-btn-chatgpt {
        width: 100%;
    }
}
