/* huyen-khong-dai-quai.css */

.hkdq-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 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%;
    }
}
