.qfy-order-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

.qfy-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.qfy-order-table th {
    background-color: #f8f8f8;
    font-weight: bold;
    color: #333;
}

.qfy-order-table .qfy-product {
    text-align: left;
}

.qfy-order-table .qfy-price {
    text-align: right;
}

.qfy-order-table .qfy-row-even {
    background-color: #f9f9f9;
}

.qfy-order-table .qfy-row-odd {
    background-color: #fff;
}

.qfy-order-table tr:hover {
    background-color: #f1f1f1;
}

.qfy-order-table .qfy-quantity-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.qfy-submit-wrapper {
    text-align: center;
    margin-top: 20px;
}

.qfy-submit-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.qfy-submit-button:hover {
    background-color: #005d8a;
}

/* Modal styles */
.qfy-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.qfy-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    position: relative;
}

.qfy-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.qfy-modal-close:hover,
.qfy-modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

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

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

.qfy-modal-table th {
    background-color: #f8f8f8;
    font-weight: bold;
}

.qfy-modal-table tfoot td {
    font-weight: bold;
}

.qfy-modal-actions {
    text-align: right;
}

.qfy-modal-actions .button {
    margin-left: 10px;
    padding: 10px 20px;
    border-radius: 4px;
}

.qfy-modal-actions .button-primary {
    background-color: #0073aa;
    color: #fff;
    border: none;
}

.qfy-modal-actions .button-primary:hover {
    background-color: #005d8a;
}

.qfy-modal-actions .button-secondary {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.qfy-modal-actions .button-secondary:hover {
    background-color: #e5e5e5;
}

.qfy-order-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.qfy-order-list-table th, .qfy-order-list-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.qfy-order-list-table th {
    background-color: #f7f7f7;
    font-weight: bold;
}

.qfy-order-list-table tr:hover {
    background-color: #f1f1f1;
}

.qfy-submit-wrapper {
    position: fixed;
    display: block;
    bottom: 50px;
    width: 95%;
    background: white;
    padding: 10px;
}

.qfy-user-orders-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* 平滑滾動 */
}

.qfy-user-orders-wrapper table {
    min-width:600px !important;
}


/* Responsive design for mobile */
@media (max-width: 600px) {
    .qfy-order-table th,
    .qfy-order-table td {
        padding: 8px;
        font-size: 14px;
    }

    .qfy-order-table .qfy-quantity-input {
        width: 50px;
    }

    .qfy-order-table .qfy-product,
    .qfy-order-table .qfy-price {
        text-align: center;
    }

    .qfy-modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .qfy-modal-table th,
    .qfy-modal-table td {
        padding: 8px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .qfy-order-table th,
    .qfy-order-table td {
        padding: 8px;
        font-size: 14px; /* 減小字體 */
    }

    .qfy-order-table th {
        white-space: nowrap; /* 防止標題換行 */
    }

    .qfy-order-table .qfy-order-id,
    .qfy-order-table .qfy-date,
    .qfy-order-table .qfy-total,
    .qfy-order-table .qfy-status {
        font-size: 12px; /* 進一步縮小特定欄位字體 */
    }

    .qfy-order-table {
        font-size: 14px; /* 總體字體縮小 */
    }

    .qfy-modal-table th,
    .qfy-modal-table td {
        padding: 6px;
        font-size: 13px;
    }
}
