/**
 * EventHex WordPress Connector - Tickets List Widget Styles
 * Version: 2.0.0
 * Table and List View Styles
 */

/* ================================
   TICKETS LIST WIDGET STYLES
================================ */

/* Wrapper */
.eventhex-tickets-list-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Filters Section */
.eventhex-tickets-list-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.eventhex-search-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.eventhex-search-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
    pointer-events: none;
}

.eventhex-tickets-search {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.eventhex-tickets-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.eventhex-filter-wrapper,
.eventhex-sort-wrapper {
    min-width: 200px;
}

.eventhex-tickets-filter-status,
.eventhex-tickets-sort {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    font-family: inherit;
}

.eventhex-tickets-filter-status:focus,
.eventhex-tickets-sort:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Table View */
.eventhex-tickets-list-table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
}

.eventhex-tickets-list-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Table Header */
.eventhex-tickets-list-header th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.eventhex-tickets-list-header th:first-child {
    border-top-left-radius: 12px;
}

.eventhex-tickets-list-header th:last-child {
    border-top-right-radius: 12px;
}

/* Table Rows */
.eventhex-tickets-list-row {
    transition: all 0.3s ease;
    border-bottom: 1px solid #e2e8f0;
}

.eventhex-tickets-list-row:last-child {
    border-bottom: none;
}

.eventhex-tickets-list-row:hover {
    background: #f7fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Striped Rows */
.eventhex-striped .eventhex-tickets-list-row:nth-child(even) {
    background: #fafafa;
}

.eventhex-striped .eventhex-tickets-list-row:nth-child(even):hover {
    background: #f7fafc;
}

/* Table Cells */
.eventhex-tickets-list-row td {
    padding: 18px 20px;
    vertical-align: middle;
    font-size: 14px;
    color: #2d3748;
}

/* Column: Image */
.eventhex-col-image {
    width: 80px;
}

.eventhex-col-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Column: Name */
.eventhex-col-name {
    min-width: 250px;
}

.eventhex-col-name strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
    line-height: 1.3;
}

.eventhex-ticket-desc {
    font-size: 13px;
    color: #718096;
    margin: 4px 0 0 0;
    line-height: 1.5;
}

/* Column: Price */
.eventhex-col-price {
    min-width: 120px;
    font-weight: 600;
}

.eventhex-price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.eventhex-price-free {
    color: #48bb78;
    font-weight: 600;
    font-size: 16px;
}

/* Column: Status */
.eventhex-col-status {
    min-width: 100px;
}

.eventhex-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.eventhex-status-badge.eventhex-status-open {
    background: #c6f6d5;
    color: #22543d;
}

.eventhex-status-badge.eventhex-status-closed {
    background: #fed7d7;
    color: #742a2a;
}

/* Column: Availability */
.eventhex-col-availability {
    min-width: 120px;
}

.eventhex-available {
    color: #48bb78;
    font-weight: 600;
}

.eventhex-sold-out {
    color: #e53e3e;
    font-weight: 600;
}

.eventhex-unlimited {
    color: #667eea;
    font-weight: 600;
}

/* Column: Action */
.eventhex-col-action {
    min-width: 120px;
    text-align: center;
}

.eventhex-list-register-btn {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.eventhex-list-register-btn:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #ffffff;
}

/* List View */
.eventhex-tickets-list-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.eventhex-tickets-list-item {
    display: flex;
    gap: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.eventhex-tickets-list-item:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
    transform: translateX(5px);
}

.eventhex-list-item-image {
    flex-shrink: 0;
}

.eventhex-list-item-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
}

.eventhex-list-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.eventhex-list-item-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.eventhex-list-item-desc {
    font-size: 14px;
    color: #718096;
    line-height: 1.6;
    margin: 8px 0;
}

.eventhex-list-item-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
}

.eventhex-meta-price {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
}

.eventhex-meta-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.eventhex-meta-status.eventhex-status-open {
    background: #c6f6d5;
    color: #22543d;
}

.eventhex-meta-status.eventhex-status-closed {
    background: #fed7d7;
    color: #742a2a;
}

.eventhex-list-item-action {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Compact List View */
.eventhex-view-compact .eventhex-tickets-list-item {
    padding: 16px;
    gap: 16px;
}

.eventhex-view-compact .eventhex-list-item-image img {
    width: 80px;
    height: 80px;
}

.eventhex-view-compact .eventhex-list-item-title {
    font-size: 16px;
}

.eventhex-view-compact .eventhex-list-item-desc {
    font-size: 13px;
}

/* Pagination */
.eventhex-tickets-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.eventhex-pagination-btn {
    padding: 10px 16px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #667eea;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.eventhex-pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
    transform: translateY(-2px);
}

.eventhex-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.eventhex-pagination-info {
    font-size: 14px;
    color: #718096;
    font-weight: 600;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .eventhex-tickets-list-filters {
        flex-direction: column;
    }
    
    .eventhex-search-wrapper,
    .eventhex-filter-wrapper,
    .eventhex-sort-wrapper {
        width: 100%;
        min-width: 100%;
    }
    
    .eventhex-tickets-list-table {
        font-size: 13px;
    }
    
    .eventhex-tickets-list-header th {
        padding: 12px 16px;
        font-size: 12px;
    }
    
    .eventhex-tickets-list-row td {
        padding: 14px 16px;
    }
    
    .eventhex-col-image img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .eventhex-tickets-list-wrapper {
        padding: 16px;
    }
    
    .eventhex-view-table .eventhex-tickets-list-table-wrapper {
        display: none;
    }
    
    .eventhex-view-table::after {
        content: 'Please view on desktop for table view';
        display: block;
        text-align: center;
        padding: 40px 20px;
        color: #718096;
        font-size: 14px;
    }
    
    .eventhex-tickets-list-item {
        flex-direction: column;
        gap: 16px;
    }
    
    .eventhex-list-item-image img {
        width: 100%;
        height: 200px;
    }
    
    .eventhex-list-item-action {
        width: 100%;
    }
    
    .eventhex-list-register-btn {
        width: 100%;
        text-align: center;
    }
    
    .eventhex-tickets-pagination {
        gap: 12px;
    }
    
    .eventhex-pagination-btn {
        min-width: 36px;
        padding: 8px 12px;
    }
}
