/**
 * Matchmaking Module Styles
 * 
 * @package PRF
 */

.prf-matchmaking-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.prf-matchmaking-header {
    text-align: center;
    margin-bottom: 30px;
}

.prf-matchmaking-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
}

.prf-matchmaking-description {
    color: #666;
    font-size: 1.1em;
}

.prf-matchmaking-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.prf-matchmaking-tab {
    padding: 12px 24px;
    background: #f5f5f5;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.prf-matchmaking-tab:hover {
    background: #e8e8e8;
    color: #333;
}

.prf-matchmaking-tab.active {
    background: #fff;
    color: #007bff;
    border-bottom-color: #007bff;
}

.prf-matchmaking-content {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.prf-matchmaking-scenario {
    display: none;
}

.prf-matchmaking-scenario.active {
    display: block;
}

.prf-matchmaking-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.prf-matchmaking-info {
    margin-bottom: 15px;
    color: #555;
    font-style: italic;
}

.prf-matchmaking-filter-group {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
}

.prf-matchmaking-filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.prf-matchmaking-filter {
    padding: 3px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95em;
    min-width: 150px;
}

.prf-matchmaking-apply-filters {
    padding: 10px 20px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.prf-matchmaking-apply-filters:hover {
    background: #0056b3;
}

.prf-matchmaking-clear-filters {
    padding: 10px 20px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    margin-top: 20px;
    transition: background 0.3s ease;
    margin-left: 10px;
}

.prf-matchmaking-clear-filters:hover {
    background: #545b62;
}

.prf-matchmaking-download-report {
    padding: 10px 20px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    margin-top: 20px;
    transition: background 0.3s ease;
    margin-left: 10px;
}

.prf-matchmaking-download-report:hover {
    background: #218838;
}

.prf-matchmaking-charts {
    margin-bottom: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 5px;
}

.prf-matchmaking-chart-container {
    margin-bottom: 30px;
}

.prf-matchmaking-chart-container:last-child {
    margin-bottom: 0;
}

.prf-matchmaking-chart-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.prf-matchmaking-chart-canvas {
    max-height: 400px;
}

.prf-matchmaking-table-container {
    margin-top: 30px;
}

.prf-matchmaking-export-buttons {
    margin-bottom: 15px;
    text-align: right;
}

.prf-matchmaking-export-btn {
    padding: 10px 20px;
    margin-left: 10px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: background 0.3s ease;
}

.prf-matchmaking-export-btn:hover {
    background: #218838;
}

.prf-matchmaking-export-btn[data-export="pdf"] {
    background: #dc3545;
}

.prf-matchmaking-export-btn[data-export="pdf"]:hover {
    background: #c82333;
}

.prf-matchmaking-table {
    overflow-x: auto;
}

.prf-matchmaking-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.prf-matchmaking-table th,
.prf-matchmaking-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.prf-matchmaking-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.prf-matchmaking-table th:hover {
    background: #e9ecef;
}

.prf-matchmaking-table th.sortable::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 0.8em;
}

.prf-matchmaking-table th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

.prf-matchmaking-table th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

.prf-matchmaking-table tbody tr:hover {
    background: #f8f9fa;
}

.prf-matchmaking-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.prf-matchmaking-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

.prf-matchmaking-pagination {
    margin-top: 20px;
    text-align: center;
}

.prf-matchmaking-pagination button {
    padding: 8px 16px;
    margin: 0 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prf-matchmaking-pagination button:hover:not(:disabled) {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.prf-matchmaking-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prf-matchmaking-pagination .current-page {
    font-weight: 600;
    color: #007bff;
}

.prf-matchmaking-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.prf-matchmaking-loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.prf-matchmaking-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

.prf-matchmaking-error a {
    color: #721c24;
    text-decoration: underline;
}

.prf-matchmaking-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Location color coding */
.prf-location-shared {
    color: #007bff;
    font-weight: 500;
}

.prf-location-partner-only {
    color: #28a745;
    font-weight: 500;
}

.prf-location-total {
    color: #6c757d;
}

.prf-matchmaking-vendor-list {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.prf-matchmaking-vendor-list h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.3em;
}

.prf-vendor-transaction-list {
    margin-top: 15px;
}

.prf-vendor-transaction-table {
    overflow-x: auto;
}

.prf-vendor-transaction-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.prf-vendor-transaction-table th,
.prf-vendor-transaction-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.prf-vendor-transaction-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.prf-vendor-transaction-table tbody tr:hover {
    background: #f8f9fa;
}

.prf-vendor-transaction-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.prf-vendor-transaction-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

/* Responsive design */
@media (max-width: 768px) {
    .prf-matchmaking-tabs {
        flex-direction: column;
    }
    
    .prf-matchmaking-tab {
        width: 100%;
        text-align: center;
    }
    
    .prf-matchmaking-filter-group {
        display: block;
        width: 100%;
        margin-right: 0;
    }
    
    .prf-matchmaking-filter {
        width: 100%;
    }
    
    .prf-matchmaking-export-buttons {
        text-align: center;
    }
    
    .prf-matchmaking-export-btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .prf-matchmaking-table {
        font-size: 0.9em;
    }
    
    .prf-matchmaking-table th,
    .prf-matchmaking-table td {
        padding: 8px;
    }
}

/* Location Vendors Table */
.prf-location-vendors-table-container {
    margin-top: 30px;
    padding: 20px 0;
}

.prf-location-vendors-table {
    width: 100%;
}

.prf-location-vendors-table h4 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.prf-location-vendors-table .prf-matchmaking-table {
    margin-top: 10px;
}

.prf-location-vendors-table-container .prf-matchmaking-loading,
.prf-location-vendors-table-container .prf-matchmaking-empty,
.prf-location-vendors-table-container .prf-matchmaking-error {
    padding: 30px;
    text-align: center;
    font-size: 1em;
}

@media (max-width: 768px) {
    .prf-location-vendors-table-container {
        margin-top: 20px;
        padding: 15px 0;
    }
    
    .prf-location-vendors-table h4 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
}
