/* CSS cho Modal Nhiệm vụ XNTH - Đã đồng bộ Theme */

#xnth-mqt-modal { 
    display: none; 
    position: fixed; 
    z-index: 999999; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0, 0, 0, 0.7); 
    font-family: 'Nunito', sans-serif; 
}

#xnth-mqt-modal .xnth-mqt-content { 
    background-color: #fff; 
    margin: 30px auto; 
    padding: 25px; 
    border: none; 
    width: 660px; 
    text-align: center; 
    font-size: 16px; 
    border-radius: 12px; 
    position: relative; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
    border-top: 5px solid var(--xnth-primary-color); /* Thêm viền màu theme ở trên cùng */
}

#xnth-mqt-modal .xnth-mqt-inner { width: 100%; margin: auto; text-align: left; box-sizing: border-box; }

#xnth-mqt-modal .xnth-mqt-close { 
    color: #aaa; 
    position: absolute; 
    right: 15px; 
    top: 10px; 
    font-size: 32px; 
    font-weight: bold; 
    cursor: pointer; 
    line-height: 1; 
    transition: color 0.2s; 
}
#xnth-mqt-modal .xnth-mqt-close:hover { color: var(--xnth-primary-color); }

/* Sử dụng màu theme cho tiêu đề nhấn mạnh */
#xnth-mqt-modal .xnth-mqt-highlight { 
    color: var(--xnth-primary-color); 
    font-size: 16px; 
    text-align: center; 
    display: block; 
    font-weight: 700; 
    margin-bottom: 20px; 
    line-height: 1.4; 
}

/* Sử dụng màu theme cho các bước Step 1, 2, 3 */
#xnth-mqt-modal .xnth-mqt-step { 
    font-weight: 800; 
    color: var(--xnth-primary-color); 
}

#xnth-mqt-modal a { 
    color: var(--xnth-accent-color); /* Dùng màu accent cho link */
    text-decoration: none; 
    font-weight: 600; 
}

/* Giữ màu đỏ cho các cảnh báo quan trọng hoặc keyword */
#xnth-mqt-modal .xnth-mqt-danger, #xnth-mqt-modal .xnth-mqt-keyword-text { 
    color: #d32f2f; 
    font-weight: 800; 
    background: #ffebee; 
    padding: 2px 5px; 
    border-radius: 4px; 
    border: 1px dashed #d32f2f; 
}

#xnth-mqt-modal .xnth-mqt-form { display: flex; margin: 20px auto; justify-content: center; align-items: center; gap: 10px; }

#xnth-mqt-modal input.xnth-mqt-input { 
    display: block; 
    width: 250px; 
    padding: 10px 15px; 
    font-size: 16px; 
    border: 2px solid #e0e0e0; 
    border-radius: 8px; 
    transition: border 0.3s; 
}
#xnth-mqt-modal input.xnth-mqt-input:focus { 
    border-color: var(--xnth-primary-color); /* Focus màu theme */
    outline: none; 
}

/* Nút bấm sử dụng màu theme */
#xnth-mqt-modal .xnth-mqt-btn { 
    background-color: var(--xnth-primary-color); 
    color: #ffffff; 
    font-size: 16px; 
    padding: 10px 25px; 
    border-radius: 8px; 
    cursor: pointer; 
    text-align: center; 
    border: none; 
    font-weight: 700; 
    transition: background 0.3s; 
}
#xnth-mqt-modal .xnth-mqt-btn:hover { 
    background-color: var(--xnth-primary-hover); 
}
#xnth-mqt-modal .xnth-mqt-btn.disabled { opacity: 0.7; cursor: not-allowed; }

#xnth-mqt-modal .xnth-mqt-demo-search, #xnth-mqt-modal .xnth-mqt-img-result img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid #eee; }
#xnth-mqt-modal .xnth-mqt-demo-search { text-align: center; position: relative; margin: 15px 0; }
#xnth-mqt-modal .xnth-mqt-overlay { position: absolute; left: 24%; top: 75%; transform: translate(0, -50%); font-size: 14px; color: #000; font-weight: 500; font-family: Arial, sans-serif; }

/* Viền ảnh kết quả dùng màu theme luôn cho đồng bộ */
#xnth-mqt-modal .xnth-mqt-img-result .xnth-mqt-image-wrap { 
    display: inline-block; 
    border: 3px solid var(--xnth-accent-color); 
    margin: 10px 0; 
    border-radius: 4px; 
    overflow: hidden; 
}

#xnth-mqt-modal .xnth-mqt-view-more { text-align: center; margin: 10px 0px; }

#xnth-mqt-modal .xnth-mqt-note { 
    color: var(--xnth-primary-color); 
    text-align: center; 
    margin: 5px 0 15px; 
    font-style: italic; 
    font-size: 14px; 
}

#xnth-mqt-modal .xnth-mqt-mask-txt { margin-top: 5px; display: block; text-align: center; font-size: 14px; }
#xnth-mqt-modal .xnth-mqt-mask-box { background-color: #d32f2f; border-radius: 4px; display: inline-block; width: 40px; height: 16px; vertical-align: middle; margin-left: 2px; }

#xnth-mqt-modal .xnth-mqt-copy-btn, #xnth-mqt-modal .xnth-mqt-change-btn { 
    font-size: 13px; 
    color: #555; 
    cursor: pointer; 
    border: 1px solid #ccc; 
    padding: 4px 12px; 
    border-radius: 20px; 
    display: inline-block; 
    user-select: none; 
    background: #f5f5f5; 
    font-weight: 600; 
    margin-left: 5px; 
    transition: all 0.2s; 
}

#xnth-mqt-modal .xnth-mqt-change-btn { padding: 8px 20px; margin-top: 10px; background: #fff; }

#xnth-mqt-modal .xnth-mqt-copy-btn:hover, #xnth-mqt-modal .xnth-mqt-change-btn:hover { 
    color: #fff; 
    background-color: var(--xnth-primary-color); /* Hover chuyển màu theme */
    border-color: var(--xnth-primary-color); 
}

#xnth-mqt-modal .xnth-mqt-change-wrap { text-align: center; margin-top: 15px; padding-top: 10px; border-top: 1px solid #eee; }
#xnth-mqt-modal .xnth-mqt-iframe { width: 100%; height: 315px; margin-top: 15px; border: none; border-radius: 8px; background: #000; }
#xnth-mqt-modal .xnth-mqt-warning { display: none; margin-top: 10px; color: #d32f2f !important; text-align: center; font-weight: bold; }
.xnth-mqt-no-scroll { overflow: hidden; }

@media screen and (max-width: 680px) {
    #xnth-mqt-modal .xnth-mqt-content { width: 90%; padding: 15px; max-height: 85vh; overflow-y: auto; margin: 7vh auto; }
    #xnth-mqt-modal .xnth-mqt-overlay { left: 15%; top: 45%; font-size: 12px; }
    #xnth-mqt-modal .xnth-mqt-form { flex-direction: column; width: 100%; }
    #xnth-mqt-modal input.xnth-mqt-input { width: 100%; box-sizing: border-box; margin-bottom: 10px; }
    #xnth-mqt-modal .xnth-mqt-btn { width: 100%; }
    #xnth-mqt-modal .xnth-mqt-iframe { height: 200px; }
}
.xnth-mqt-guidance { font-size: 13px; text-align: center; color: #666; margin-top: 10px; line-height: 1.5; }