/* Custom WooCommerce Orders Display Styles */

.custom-woo-orders-list {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Filter Form Styles */
.orders-filter-form {
    background: #fff;
    padding: 20px;
    margin: 0 !important;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
    color: #333;
}

.filter-item input[type="text"],
.filter-item input[type="date"],
.filter-item select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    width: 100%;
}

.filter-item input:focus,
.filter-item select:focus {
    outline: none;
    border-color: #2271b1;
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.filter-actions .button {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    flex: 1;
}

.button-primary {
    background: #2271b1;
    color: #fff;
}

.button-primary:hover {
    background: #135e96;
}

.button-secondary {
    background: #f0f0f1;
    color: #2c3338;
    border: 1px solid #ddd;
}

.button-secondary:hover {
    background: #e5e5e5;
}

.button-export {
    background: #00a32a;
    color: #fff;
}

.button-export:hover {
    background: #008a20;
}

/* Orders Count */
.orders-count {
    margin: 0 !important;
    padding: 15px 20px;
    background: #f0f0f1;
    border-left: 4px solid #2271b1;
}

.orders-count p {
    margin: 0;
    font-size: 14px;
}

/* Table Container */
.custom-orders-table {
    width: 100% !important;
    border-collapse: collapse;
    background: #fff;
    margin: 0 !important;
    table-layout: fixed;
}

.custom-orders-table thead {
    background: #f5f5f5;
}

.custom-orders-table th,
.custom-orders-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    white-space: nowrap;
}

.custom-orders-table th:first-child,
.custom-orders-table td:first-child {
    width: 6%;
    white-space: nowrap;
}

.custom-orders-table th:nth-child(3),
.custom-orders-table td:nth-child(3) {
    width: 10%;
    white-space: nowrap;
    text-align: right;
}

.custom-orders-table th:nth-child(5),
.custom-orders-table td:nth-child(5) {
    width: 10%;
    white-space: nowrap;
    text-align: right;
}

.custom-orders-table th {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.custom-orders-table tbody tr:hover {
    background: #f9f9f9;
}

.custom-orders-table .order-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.custom-orders-table .status-completed {
    background: #c6e1c6;
    color: #5b841b;
}

.custom-orders-table .status-processing {
    background: #c8d7e1;
    color: #2e4453;
}

.custom-orders-table .status-pending,
.custom-orders-table .status-on-hold {
    background: #f8dda7;
    color: #94660c;
}

.custom-orders-table .status-cancelled,
.custom-orders-table .status-refunded,
.custom-orders-table .status-failed {
    background: #eba3a3;
    color: #761919;
}

.custom-orders-table .button {
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 13px;
    display: inline-block;
    transition: background 0.3s ease;
}

.custom-orders-table .button:hover {
    background: #005177;
    color: #fff;
}

/* Pagination Styles */
.orders-pagination {
    margin: 0 !important;
    padding: 20px;
    text-align: center;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
}

.orders-pagination .button {
    padding: 10px 20px;
    margin: 0 5px;
    background: #2271b1;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    display: inline-block;
    transition: background 0.3s ease;
}

.orders-pagination .button:hover {
    background: #135e96;
}

.orders-pagination .pagination-info {
    display: inline-block;
    margin: 0 15px;
    font-weight: 600;
    color: #333;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .button {
        width: 100%;
    }

    .custom-orders-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
    }

    .custom-orders-table thead {
        display: none;
    }

    .custom-orders-table tbody,
    .custom-orders-table tr,
    .custom-orders-table td {
        display: block;
        width: 100%;
    }

    .custom-orders-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        padding: 10px;
    }

    .custom-orders-table td {
        padding: 8px 10px;
        text-align: right;
        border-bottom: 1px solid #f0f0f1;
        position: relative;
        padding-left: 50%;
    }

    .custom-orders-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: 600;
        text-align: left;
    }

    .custom-orders-table td:last-child {
        border-bottom: none;
    }

    .orders-pagination .button {
        padding: 8px 16px;
        font-size: 12px;
    }
}