/* Plugin Style: Simple Fullscreen Popup 
*/

/* --- 1. Style Nút bấm (Giống nút Start Quiz xanh dương) --- */
.sfp-btn-wrap {
    margin: 15px 0;
    display: block;
}

.sfp-trigger-btn {
    width: 100%;
    background-color: #007bff; /* Màu xanh chuẩn */
    color: #ffffff !important;
    border: none;
    border-radius: 8px; /* Bo góc */
    padding: 12px 30px;
    font-size: 18px; /* Chữ to */
    font-weight: 700; /* Chữ đậm */
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    line-height: 1.4;
    box-shadow: 0 4px 0 #0056b3; /* Tạo khối 3D dưới nút */
    text-transform: none;
    text-decoration: none;
    font-family: inherit;
}

.sfp-trigger-btn:hover {
    background-color: #0069d9;
    transform: translateY(-2px); /* Bay lên nhẹ */
    box-shadow: 0 6px 0 #0056b3;
    color: #ffffff !important;
}

.sfp-trigger-btn:active {
    transform: translateY(2px); /* Nhấn xuống */
    box-shadow: 0 2px 0 #0056b3;
}

.sfp-trigger-btn:focus {
    outline: none;
}

/* --- 2. Style Popup Overlay (Fix lỗi full màn hình & bị che) --- */
.sfp-popup-overlay {
    display: none;
    position: fixed !important; /* Quan trọng: thoát khỏi container cha */
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important; /* Lấy chiều rộng màn hình thiết bị */
    height: 100vh !important; /* Lấy chiều cao màn hình thiết bị */
    background-color: #ffffff; /* Nền trắng */
    z-index: 2147483647 !important; /* Đè lên tất cả mọi thứ */
    overflow-y: auto; /* Cho phép cuộn dọc nội dung */
    -webkit-overflow-scrolling: touch; /* Mượt trên iOS */
    margin: 0 !important;
    padding: 0 !important;
}

/* --- 3. Nút Đóng (Close) --- */
.sfp-close-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 45px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    opacity: 0.6;
    transition: opacity 0.3s;
    z-index: 2147483648; /* Cao hơn overlay 1 bậc */
    font-family: Arial, sans-serif;
    font-weight: 300;
}

.sfp-close-btn:hover {
    opacity: 1;
    color: #ff0000;
}

/* --- 4. Container Nội dung --- */
.sfp-popup-content {
    width: 100%;
    min-height: 100%;
    display: flex;
    justify-content: center;
    /* Padding trên dưới để nội dung không bị dính sát nút đóng */
    padding: 70px 20px 50px 20px; 
    box-sizing: border-box;
}

.sfp-container-inner {
    width: 100%;
    max-width: 900px; /* Độ rộng tối đa của nội dung bài học */
    position: relative;
    /* Reset text-align về trái để dễ đọc */
    text-align: left;
}

/* Fix ảnh responsive trong popup */
.sfp-container-inner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
}

/* Class khóa scroll trang chính khi popup mở */
body.sfp-lock-scroll {
    overflow: hidden !important;
    height: 100vh !important;
}