/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/
/* Định dạng chung cho bảng sản phẩm */
.comeon-products-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

/* Định dạng cho hàng tiêu đề */
.comeon-products-table .table-header {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: left;
}

/* Bỏ đường viền dọc ở ngoài và trong bảng */
.comeon-products-table th,
.comeon-products-table td {
    padding: 10px;
    border-top: 1px solid #ddd; /* Chỉ giữ đường viền ngang */
    border-bottom: 1px solid #ddd;
    border-left: none;
    border-right: none;
}

/* Định dạng cho hàng sản phẩm */
.comeon-products-table .product-row {
    border-top: 1px solid #ddd;
}

/* Định dạng cho cột "Sản phẩm" để hiển thị hình ảnh và thông tin sản phẩm */
.comeon-products-table .product-info {
    display: flex;
    align-items: center;
}

/* Định dạng cho hình ảnh sản phẩm */
.comeon-products-table .product-info img {
    max-width: 60px;
    height: auto;
    border-radius: 5px;
    margin-right: 10px;
}

/* Định dạng chi tiết sản phẩm */
.comeon-products-table .product-details {
    display: flex;
    flex-direction: column;
}

.comeon-products-table .product-title {
    font-weight: bold;
}

.comeon-products-table .product-id {
    color: #666;
    font-size: 12px;
}

/* Canh giữa nội dung trong các cột */
.comeon-products-table .product-quantity,
.comeon-products-table .product-price,
.comeon-products-table .product-updated,
.comeon-products-table .product-commission,
.comeon-products-table .product-actions {
    text-align: center;
}

/* Định dạng cho phần hoa hồng */
.comeon-products-table .product-commission {
    font-size: 13px;
    color: #333;
}

/* Định dạng cho phần "Hành động" */
.comeon-products-table .product-actions a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 13px;
    margin-right: 5px;
}

.comeon-products-table .product-actions a:hover {
    text-decoration: underline;
}

/* Định dạng cho ô hình ảnh khi không có hình ảnh */
.comeon-products-table .no-image {
    width: 60px;
    height: 60px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border-radius: 5px;
}
/* CSS cho popup */
.edit-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 400px;
    max-width: 80%;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}


#popup-content-area {
    margin-top: 20px;
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/
}
/* ✅ Bảng giao dịch */
.transaction-history {
    margin-top: 20px;
}

.transaction-history h3 {
    background-color: #007bff;
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: white;
}

.transaction-table th, .transaction-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.transaction-table th {
    background-color: #007bff;
    color: white;
}

.transaction-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.transaction-table .positive {
    color: green;
    font-weight: bold;
}

.transaction-table .negative {
    color: red;
    font-weight: bold;
}

.transaction-table .pending {
    color: orange;
    font-weight: bold;
}

/* ✅ Thông báo không có giao dịch */
.no-transaction {
    text-align: center;
    color: gray;
    font-style: italic;
    padding: 15px;
}

/* ✅ Popup rút tiền */
.withdraw-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid #ddd;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 400px;
    text-align: center;
    border-radius: 5px;
}

.withdraw-popup-content {
    text-align: center;
}

.withdraw-popup label {
    display: block;
    margin-top: 10px;
}

.withdraw-popup input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.withdraw-popup .withdraw-button {
    margin-top: 15px;
    width: 100%;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
    color: red;
}

/* ✅ Nút & thông báo */
.pending-withdrawal {
    background-color: #fff3cd;
    padding: 15px;
    margin-top: 10px;
    border-left: 5px solid #d4a100;
}

.cancel-button {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.withdraw-button {
    background-color: #28a745;
    color: white;
    padding: 10px;
    cursor: pointer;
    border: none;
}

.error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}
.transaction-table tr.canceled {
    color: #6c757d; /* Xám */
    text-decoration: line-through;
}
.transaction-table tr.withdrawal-completed {
    color: #dc3545; /* Đỏ */
}
.transaction-table tr.positive {
    color: #28a745; /* Xanh lá */
}
