/**
 * online-access.css - v6.0 (Reset & Ghi đè)
 * Vô hiệu hóa style của theme trên .modal-dialog và áp dụng style của riêng mình.
 */

/* 
 * BƯỚC 1: RESET LẠI STYLE CỦA THEME ĐỐI VỚI KHUNG BAO NGOÀI (.modal-dialog)
 * Áp dụng CHỈ KHI modal của chúng ta đang mở.
 */
body.access-modal-is-open #onlineAccessModal .modal-dialog {
    background-image: none !important;      /* Vô hiệu hóa ảnh nền của theme */
    background-color: transparent !important;/* Vô hiệu hóa màu nền của theme */
    border: none !important;                 /* Vô hiệu hóa viền của theme */
    position: relative !important;           /* Reset lại position về mặc định của Bootstrap */
    transform: none !important;              /* Reset lại transform về mặc định của Bootstrap */
    top: auto !important;                    /* Reset lại vị trí */
    left: auto !important;                   /* Reset lại vị trí */
    margin: 1.75rem auto !important;         /* Trả lại margin mặc định của Bootstrap để căn giữa */
    width: auto !important;                  /* Cho phép Bootstrap tự điều chỉnh chiều rộng */
    max-width: 500px !important;             /* Giới hạn chiều rộng tối đa của modal */
}

/* Điều chỉnh lại cho màn hình nhỏ */
@media (max-width: 576px) {
    body.access-modal-is-open #onlineAccessModal .modal-dialog {
        margin: 0.5rem !important;
    }
}

/*
 * BƯỚC 2: TÙY CHỈNH LỚP NỀN MỜ (BACKDROP)
 * Style riêng cho backdrop của CHỈ modal này để không ảnh hưởng modal login.
 */
body.access-modal-is-open .modal-backdrop.fade.show {
    background-color: rgba(0, 0, 0, 0.6) !important;
    opacity: 1 !important; /* Đảm bảo nó hiển thị đúng */
}

/*
 * BƯỚC 3: ÁP DỤNG STYLE MONG MUỐN CHO NỘI DUNG MODAL
 * Code này gần như giữ nguyên, chỉ đảm bảo bộ chọn đủ mạnh.
 */
body.access-modal-is-open #onlineAccessModal .modal-content {
    border-radius: 8px !important;
    border: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    background-color: #ffffff !important;
}

body.access-modal-is-open #onlineAccessModal .modal-header {
    background-color: #1877F2 !important;
    color: #ffffff !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    border-bottom: none !important; /* Bỏ đường kẻ chân header */
    padding: 15px 20px !important;
}

/* ... Toàn bộ các style còn lại (modal-title, input, button, ...) giữ nguyên như phiên bản trước ... */
body.access-modal-is-open #onlineAccessModal .modal-title { font-weight: 600 !important; font-size: 1.25rem !important;color: #ffffff; }
body.access-modal-is-open #onlineAccessModal .modal-header .close { color: #ffffff !important; opacity: 0.9 !important; text-shadow: none !important; }
body.access-modal-is-open #onlineAccessModal .modal-body { padding: 25px !important; }
body.access-modal-is-open #onlineAccessModal .step-instruction { line-height: 1.6; color: #333; margin-bottom: 20px; font-size: 16px; }
body.access-modal-is-open #onlineAccessModal #online-access-email { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ccd0d5; border-radius: 6px; font-size: 16px; box-sizing: border-box; }
body.access-modal-is-open #onlineAccessModal #online-access-email:focus { border-color: #1877F2; box-shadow: 0 0 0 2px #e7f3ff; outline: none; }
body.access-modal-is-open #onlineAccessModal .modal-body .c-btn { background-color: #1877F2 !important; border-color: #1877F2 !important; color: #ffffff !important; font-weight: bold !important; text-transform: none !important; padding: 12px 20px !important; width: 100% !important; border-radius: 6px !important; }
body.access-modal-is-open #onlineAccessModal .modal-body .c-btn:hover { background-color: #166fe5 !important; }
body.access-modal-is-open #onlineAccessModal #access-feedback { margin-top: 15px; font-weight: 500; }
body.access-modal-is-open #onlineAccessModal .access-error { color: #dc3545 !important; }
body.access-modal-is-open #onlineAccessModal .access-loading { color: #1877F2 !important; }
body.access-modal-is-open #onlineAccessModal .access-granted-container { text-align: center; }