/**
 * HVAC Dashboard Enhanced Styles
 * 
 * Styles for the enhanced dashboard with filters, search, and pagination
 */

/* Table Controls Container */
.hvac-table-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

/* Search Box */
.hvac-search-box {
    flex: 1;
    min-width: 250px;
}

.hvac-search-box input[type="search"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.hvac-search-box input[type="search"]:focus {
    outline: none;
    border-color: #E9AF28;
    box-shadow: 0 0 0 2px rgba(233, 175, 40, 0.2);
}

/* Date Filters */
.hvac-date-filters {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hvac-date-filters label {
    font-weight: 600;
    color: #333;
}

.hvac-date-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.hvac-date-input:focus {
    outline: none;
    border-color: #E9AF28;
}

/* Per Page Selector */
.hvac-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hvac-per-page label {
    font-weight: 600;
    color: #333;
}

.hvac-per-page-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.hvac-per-page-select:focus {
    outline: none;
    border-color: #E9AF28;
}

/* Event Filters (Status Tabs) */
.hvac-event-filters {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 2px solid #e9ecef;
}

.hvac-event-filters span {
    font-weight: 600;
    color: #333;
}

.hvac-filter {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    background: white;
}

.hvac-filter:hover {
    background-color: #f8f9fa;
    border-color: #E9AF28;
}

.hvac-filter-active,
.hvac-filter.ast-button-primary {
    background-color: #E9AF28 !important;
    color: #000 !important;
    border-color: #E9AF28 !important;
}

/* Events Table Wrapper */
.hvac-events-table-wrapper {
    position: relative;
    overflow-x: auto;
    margin-top: 20px;
}

.hvac-events-table-wrapper.loading {
    opacity: 0.6;
}

.hvac-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Enhanced Table Styles */
.hvac-events-table,
.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.hvac-events-table th,
.hvac-events-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.hvac-events-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Sortable Column Headers */
.hvac-events-table th.sortable {
    cursor: pointer;
}

.hvac-events-table th.sortable a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hvac-events-table th.sortable:hover {
    background-color: #e9ecef;
}

/* Sorting Indicators */
.sorting-indicators {
    display: inline-flex;
    flex-direction: column;
    margin-left: 5px;
}

.sorting-indicator {
    width: 0;
    height: 0;
    border-style: solid;
    margin: 1px 0;
}

.sorting-indicator.asc {
    border-width: 0 4px 6px 4px;
    border-color: transparent transparent #ccc transparent;
}

.sorting-indicator.desc {
    border-width: 6px 4px 0 4px;
    border-color: #ccc transparent transparent transparent;
}

.sorted.asc .sorting-indicator.asc,
.sorted.desc .sorting-indicator.desc {
    border-bottom-color: #E9AF28;
    border-top-color: #E9AF28;
}

/* Table Rows */
.hvac-events-table tbody tr:hover {
    background-color: #f8f9fa;
}

.hvac-events-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Column Specific Styles */
.column-status {
    width: 80px;
}

.column-title {
    min-width: 200px;
}

.column-date {
    width: 150px;
}

.column-capacity,
.column-sold {
    width: 80px;
    text-align: center;
}

.column-revenue {
    width: 100px;
    text-align: right;
}

.column-actions {
    width: 150px;
}

/* Pagination */
.tablenav {
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tablenav-pages {
    display: flex;
    align-items: center;
    gap: 10px;
}

.displaying-num {
    color: #666;
    font-size: 13px;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-links .button {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 3px;
    min-width: 30px;
    text-align: center;
    cursor: pointer;
}

.pagination-links .button:hover:not(.disabled) {
    background: #f8f9fa;
    border-color: #E9AF28;
}

.pagination-links .button.disabled {
    opacity: 0.5;
    cursor: default;
}

.paging-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.current-page {
    width: 50px;
    padding: 4px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Error Messages */
.hvac-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hvac-table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hvac-search-box {
        min-width: 100%;
    }
    
    .hvac-date-filters {
        flex-wrap: wrap;
    }
    
    .hvac-events-table {
        font-size: 14px;
    }
    
    .hvac-events-table th,
    .hvac-events-table td {
        padding: 8px 5px;
    }
    
    .column-organizer,
    .column-capacity {
        display: none;
    }
    
    .tablenav {
        flex-direction: column;
        gap: 15px;
    }
}