/**
 * CSS Styling cho QR Code Generator.
 * Tệp này được tải thông qua functions.php
 * Sử dụng tiền tố 'qr-' cho các class/id để tránh xung đột với theme.
 */

/* Container bọc ngoài, căn giữa widget */
.qr-container { 
    display: flex;
    justify-content: center;
    padding: 30px 0;
    margin: 20px 0;
    width: 100%;
}

/* Widget chính */
.qr-widget {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.qr-widget h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.qr-widget p {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 20px;
}

/* Ô nhập liệu */
#qr-url-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

#qr-url-input:focus {
    border-color: #007bff;
    outline: none;
}

/* Nút Tạo QR */
#qr-generate-button {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s, opacity 0.3s;
}

#qr-generate-button:hover:not(:disabled) {
    background-color: #0056b3;
}

#qr-generate-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}


/* Khu vực hiển thị Mã QR */
#qrcode-container {
    margin: 30px auto; /* căn giữa */
    padding: 10px;
    border: 1px dashed #ccc;
    display: inline-block;
}

/* Đảm bảo canvas bên trong được căn giữa nếu có thể */
#qrcode-container > canvas {
    display: block;
}


/* Nút Tải về (Nằm trong thẻ <a>) */
#qr-download-link {
    display: block;
    text-decoration: none; /* Bỏ gạch chân cho link */
}

#qr-download-link button {
    background-color: #28a745;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: background-color 0.3s;
}

#qr-download-link button:hover {
    background-color: #1e7e34;
}

/* Class để ẩn/hiện */
.qr-hidden {
    display: none !important;
}