/* WooCommerce Purchases Display - Frontend Styles */

.wcpd-table-wrapper {
    margin: 20px 0;
    overflow-x: auto;
}

.wcpd-purchases-table {
    width: 100% !important;
    border-collapse: collapse;
}

/* Table Header Styling */
.wcpd-purchases-table thead th {
    background-color: rgb(42, 169, 106) !important;
    color: #ffffff !important;
    font-weight: 600;
    padding: 12px 8px !important;
    text-align: left;
    border: none !important;
}

/* Alternating Row Colors */
.wcpd-purchases-table tbody tr:nth-child(even) {
    background-color: rgba(42, 170, 106, 0.2) !important;
}

.wcpd-purchases-table tbody tr:nth-child(odd) {
    background-color: #ffffff !important;
}

/* Row Hover Effect */
.wcpd-purchases-table tbody tr:hover {
    background-color: rgba(42, 170, 106, 0.3) !important;
}

/* Table Cell Styling */
.wcpd-purchases-table tbody td {
    padding: 10px 8px !important;
    border: none !important;
    border-bottom: 1px solid rgba(42, 170, 106, 0.1) !important;
}

/* DataTables Controls */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin: 10px 0;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid rgba(42, 170, 106, 0.3);
    border-radius: 4px;
    padding: 5px 10px;
    margin: 0 5px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    outline: none;
    border-color: rgb(42, 169, 106);
    box-shadow: 0 0 0 2px rgba(42, 170, 106, 0.2);
}

/* Pagination Buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid rgba(42, 170, 106, 0.3) !important;
    background: #ffffff !important;
    color: rgb(42, 169, 106) !important;
    padding: 5px 10px !important;
    margin: 0 2px !important;
    border-radius: 4px !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(42, 170, 106, 0.1) !important;
    border-color: rgb(42, 169, 106) !important;
    color: rgb(42, 169, 106) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: rgb(42, 169, 106) !important;
    border-color: rgb(42, 169, 106) !important;
    color: #ffffff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
}

/* Sorting Icons */
.wcpd-purchases-table thead th.sorting,
.wcpd-purchases-table thead th.sorting_asc,
.wcpd-purchases-table thead th.sorting_desc {
    cursor: pointer;
    position: relative;
    padding-right: 30px !important;
}

.wcpd-purchases-table thead th.sorting:after,
.wcpd-purchases-table thead th.sorting_asc:after,
.wcpd-purchases-table thead th.sorting_desc:after {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

/* Search Label */
.dataTables_wrapper .dataTables_filter label {
    font-weight: 500;
}

/* Info Text */
.dataTables_wrapper .dataTables_info {
    color: #666;
    font-size: 0.95em;
}

/* Responsive Table */
@media screen and (max-width: 768px) {
    .wcpd-table-wrapper {
        overflow-x: scroll;
    }
    
    .wcpd-purchases-table {
        min-width: 600px;
    }
    
    .wcpd-purchases-table thead th,
    .wcpd-purchases-table tbody td {
        padding: 8px 6px !important;
        font-size: 0.9em;
    }
}

/* Loading State */
.dataTables_wrapper .dataTables_processing {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgb(42, 169, 106);
    color: rgb(42, 169, 106);
    font-weight: 500;
}

/* Sponsor Link Styling */
.wcpd-sponsor-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgb(42, 169, 106);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 24px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.wcpd-sponsor-link:hover {
    background-color: rgb(35, 145, 90);
    text-decoration: none;
}

.wcpd-sponsor-link:active {
    background-color: rgb(30, 130, 80);
}

/* Disabled form field styling */
#form-field-sponsor:disabled,
#form-field-sponsor[readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

