/*Login*/
/* Giao diện tinh gọn, tập trung vào Icon ổ khóa */
.bcms-restricted-zone {
    text-align: center;
    padding: 60px 0; /* Khoảng cách trên dưới thoải mái */
    background: transparent; /* Bỏ cái nền xám bao quanh */
}

.bcms-card {
    background: transparent; /* Phá bỏ cái ô trắng */
    box-shadow: none; /* Bỏ đổ bóng */
    border: none; /* Bỏ viền */
    margin: 0 auto;
}

/* Style cho Icon ổ khóa */
.bcms-icon-box {
    width: 70px;
    height: 70px;
    background: #fdf2f2; /* Màu đỏ hồng rất nhạt để làm nổi icon */
    color: #dc3232; /* Màu đỏ của ổ khóa để báo hiệu bị chặn */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    border: 2px solid #f5d7d7;
}

.bcms-icon-box .dashicons {
    font-family: dashicons; /* Bắt buộc phải có dòng này */
    font-size: 35px;        /* Độ lớn của cái khóa */
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc3232;         /* Màu đỏ cho ổ khóa */
}

/* Chỉnh lại font chữ cho đẹp */
.bcms-heading {
    font-size: 22px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 10px !important;
}

.bcms-text {
    color: #646970;
    font-size: 15px;
    margin-bottom: 25px !important;
}

/* Nút đăng nhập WordPress chuẩn */
.bcms-login-button {
    background: #2271b1;
    color: #fff !important;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 500;
    transition: background 0.2s;
}

.bcms-login-button:hover {
    background: #135e96;
}

/* Style cho Form đăng nhập tại chỗ */
#bcms-login-form {
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
}

.bcms-input-group {
    margin-bottom: 15px;
}

.bcms-input-group input {
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

.bcms-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 20px;
    color: #646970;
}

.bcms-lost-pwd {
    color: #2271b1;
    text-decoration: none;
}

.bcms-login-button {
    width: 100%;
    cursor: pointer;
    border: none;
    font-size: 16px;
    padding: 12px !important;
}

/*==================== ======================*/
/* Container chính */
.bcms-frontend-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Header & Search */
.bcms-frontend-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f1;
    padding-bottom: 20px;
}

.bcms-title { margin: 0; color: #1d2327; font-size: 24px; }
.bcms-subtitle { margin: 5px 0 0; color: #646970; font-size: 14px; }

.bcms-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.bcms-search-input-group .dashicons {
    position: absolute;
    left: 10px;
    color: #8c8f94;
}

.bcms-search-input-group input {
    padding: 10px 10px 10px 35px !important;
    width: 320px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 14px;
}

/* Table */
.bcms-table-responsive { overflow-x: auto; }

.bcms-frontend-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.bcms-frontend-table th {
    background: #f6f7f7;
    color: #2c3338;
    text-align: left;
    padding: 12px 15px;
    font-weight: 600;
    border-bottom: 2px solid #dcdcde;
}

.bcms-frontend-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
    color: #50575e;
}

.bcms-frontend-table th, 
.bcms-frontend-table td {
    padding: 16px 20px !important; /* Tăng khoảng cách cho thoáng */
    text-align: left;
}

.bcms-frontend-table thead th {
    background-color: #f9fafb;
    border-bottom: 2px solid #f3f4f6;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.bcms-frontend-table tr:hover { background: #f9f9f9; }

/* Thumbnail & Description */


.bcms-desc-cell {
    max-width: 250px;
    font-size: 13px;
    line-height: 1.4;
}

/* Footer & Pagination */
.bcms-frontend-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
}

.bcms-page-info { color: #646970; font-style: italic; }

.bcms-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.bcms-pagination-btns {display:flex;gap:10px}
.bcms-btn:disabled { background: #dcdcde; cursor: not-allowed; }
.bcms-btn:hover:not(:disabled) { background: #135e96; }


/* Thumbnail */

/* Khung xem trước ảnh khi hover */
#bcms-image-preview {
	pointer-events: none; /* Đảm bảo không cản trở con trỏ chuột */
    border: 4px solid #fff;
    border-radius: 8px;
    overflow: hidden;
}

#bcms-image-preview img {
    display: block;
    max-width: 450px; /* Độ rộng ảnh khi phóng to, bạn có thể tăng thêm */
    height: auto;
    border-radius: 4px;
}

.bcms-frontend-table td:nth-child(2) {
    text-align: center;
}

/* Hiệu ứng mờ nhẹ cho ảnh trong bảng khi hover vào */
.mfmm-thumbnail {
	display: block;
    max-width: 100%;    /* Không bao giờ vượt quá chiều ngang của ô td */
    height: auto;       /* Tự động tính chiều cao theo tỉ lệ ảnh */
    width: 100%;        /* Kích thước hiển thị lý tưởng */
    object-fit: cover;  /* Cắt ảnh gọn gàng nếu ảnh gốc không vuông */
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    cursor: zoom-in;    /* Kính lúp như bạn muốn */
    margin: 0 auto;     /* Căn giữa ảnh trong ô */
}

.mfmm-thumbnail:hover {
	border-color: #2271b1; /* Hiện viền xanh trùng màu thương hiệu của bạn */
    box-shadow: 0 0 8px rgba(34, 113, 177, 0.3);
    opacity: 0.9;
}

/* Style cho nút tải về mã vạch */
.bcms-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #2271b1;
    color: white !important;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 11px;
    transition: background 0.2s;
}

.bcms-download-btn:hover {
    background-color: #135e96;
}

.bcms-download-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Container chính chứa Sidebar và Bảng */
.bcms-frontend-body {
    display: flex;
    gap: 30px; /* Khoảng cách giữa Sidebar và Bảng */
    margin-top: 20px;
    align-items: flex-start; /* Giúp sidebar không bị kéo dài theo chiều cao bảng */
    width: 100%;
}

/* Ép phần nội dung chính chiếm hết diện tích còn lại */
.bcms-main-content {
    flex: 1; 
    min-width: 0; /* Quan trọng: Ngăn bảng làm vỡ layout trên mobile */
}

/* Đảm bảo bảng luôn rộng 100% của cột chính */
.bcms-table-responsive {
    width: 100%;
}

/*=============  SIDEBAR ======================*/
/* Khung bao ngoài của Sidebar */
.bcms-sidebar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 260px; /* Tăng độ rộng một chút cho thoải mái */
    flex-shrink: 0; /* Không cho sidebar bị bóp méo */
}

/* Chỉnh lại tiêu đề thư mục giống ảnh */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-left: 5px;
}

/* Tiêu đề "Thư mục" */
.sidebar-header h4 {
    margin: 0 !important;
    font-size: 18px;
    font-weight: 700;
}

.bcms-sidebar h4 .dashicons {
    color: #666;
    font-size: 20px;
}

/* Danh sách Ul */
#bcms-frontend-folder-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Từng mục folder */
.folder-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 6px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.folder-item::before {
    content: "\f141"; /* Dashicon folder */
    font-family: dashicons;
    font-size: 18px;
    opacity: 0.7;
}

.folder-item.active::before {
    opacity: 1;
}

/* Hiệu ứng khi rê chuột qua */
.folder-item:hover {
    background-color: #f5f7fa;
    color: #2271b1;
    border-color: #d1d9e4;
}

/* Khi folder được chọn (Active) */
.folder-item.active {
    background-color: #2271b1 !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

/* Khoảng cách cuối cùng */
.folder-item:last-child {
    margin-bottom: 0;
}