/* Custom Post Table Filter Styles */

/* Container */
.cptf-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Filters Section */
.cptf-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.cptf-filters-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    border-bottom: 2px solid #73c3c0;
    padding-bottom: 10px;
}

.cptf-filters-row {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); */
    gap: 15px;
    align-items: end;
}

.cptf-filter-item {
    display: flex;
    flex-direction: column;
}

.cptf-filter-item label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.cptf-filter-item input[type="text"],
.cptf-filter-item input[type="date"],
.cptf-filter-item select {
    /* padding: 10px; */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.cptf-filter-item input[type="text"]:focus,
.cptf-filter-item input[type="date"]:focus,
.cptf-filter-item select:focus {
    border-color: #73c3c0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.cptf-filter-buttons {
    display: flex;
    gap: 10px;
    flex-direction: row;
    justify-content: center;
}

/* Buttons */
.cptf-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(230deg, rgba(85, 197, 194, 1) 28%, rgba(227, 220, 32, 1) 100%);
}

.cptf-btn:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cptf-btn-primary {
    background: #73c3c0;
    color: #fff;
}

.cptf-btn-primary:hover {
    background: #005a87;
}

.cptf-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.cptf-btn-secondary:hover {
    background: #5a6268;
}

.cptf-btn-success {
    background: #28a745;
    color: #fff;
}

.cptf-btn-success:hover {
    background: #218838;
}

.cptf-btn-small {
    padding: 5px 15px;
    font-size: 12px;
}

/* Export Section */
.cptf-export-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 8px;
    border-left: 4px solid #73c3c0;
}

.cptf-total-records {
    font-size: 14px;
    color: #555;
}

.cptf-total-records strong {
    color: #73c3c0;
    font-size: 18px;
}

/* Loading Spinner */
.cptf-loading {
    text-align: center;
    padding: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    margin: 20px 0;
}

.cptf-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #73c3c0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table Wrapper */
.cptf-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Table Styles */
.cptf-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.cptf-table thead {
    background: linear-gradient(230deg, rgba(85, 197, 194, 1) 28%, rgba(227, 220, 32, 1) 100%);
    color: #fff;
}

.cptf-table thead th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #004d73;
}

.cptf-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.cptf-table tbody tr:hover {
    background-color: #f8f9fa;
}

.cptf-table tbody td {
    padding: 12px 10px;
    font-size: 14px;
    color: #333;
}

.cptf-table tbody td:first-child {
    font-weight: 600;
    color: #73c3c0;
}

/* Badges */
.cptf-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #d9f2f1;
    color: #73c3c0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
}

/* Status Labels */
.cptf-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.cptf-status-success {
    background: #d4edda;
    color: #155724;
}

.cptf-status-warning {
    background: #fff3cd;
    color: #856404;
}

/* Pagination */
.cptf-pagination {
    margin-top: 20px;
}

.cptf-pagination-inner {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.cptf-page-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.cptf-page-btn:hover {
    background: #73c3c0;
    color: #fff;
    border-color: #73c3c0;
}

.cptf-page-btn.active {
    background: #73c3c0;
    color: #fff;
    border-color: #73c3c0;
}

/* DataTables Custom Styles */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    padding: 10px;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 5px 10px;
    margin: 0 2px;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #73c3c0 !important;
    color: white !important;
    border: 1px solid #73c3c0 !important;
}

/* Dashicons Support */
.dashicons {
    font-family: dashicons;
    font-size: 16px;
    vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cptf-filters-row {
        grid-template-columns: 1fr;
    }
    
    .cptf-filter-buttons {
        flex-direction: column;
    }
    
    .cptf-export-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .cptf-table {
        font-size: 12px;
    }
    
    .cptf-table thead th,
    .cptf-table tbody td {
        padding: 8px 5px;
    }
}

@media (max-width: 480px) {
    .cptf-container {
        padding: 10px;
    }
    
    /* Mobile Table */
    .cptf-table thead {
        display: none;
    }
    
    .cptf-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }
    
    .cptf-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .cptf-table tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
    }
    
    .cptf-table tbody td:last-child {
        border-bottom: none;
    }
}
