/* events-table.css - Fancy events table styling */

/* Table Container */
.events-table-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}

/* Filters Section */
.events-filters {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.events-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.events-filters label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.events-filters select,
.events-filters input {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 150px;
}

.events-filters button {
    margin-top: auto;
    padding: 8px 20px;
}

/* Table Styling */
.events-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.events-table thead {
    background: var(--primary-gradient);
    color: white;
}

.events-table thead th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    position: relative;
}

.events-table thead th:first-child {
    border-top-left-radius: 10px;
}

.events-table thead th:last-child {
    border-top-right-radius: 10px;
}

/* Sortable headers */
.events-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.events-table thead th.sortable:hover {
    background: rgba(255,255,255,0.1);
}

.events-table thead th.sortable::after {
    content: '⇅';
    margin-left: 8px;
    opacity: 0.5;
}

.events-table thead th.sortable.asc::after {
    content: '↑';
    opacity: 1;
}

.events-table thead th.sortable.desc::after {
    content: '↓';
    opacity: 1;
}

/* Table Body */
.events-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition-base);
}

.events-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.events-table tbody tr:last-child {
    border-bottom: none;
}

.events-table tbody td {
    padding: 15px 12px;
    vertical-align: middle;
}

/* Date Column */
.event-date-cell {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.event-date-cell .day {
    font-size: 1.3rem;
    display: block;
    line-height: 1;
}

.event-date-cell .month-year {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Event Name Column */
.event-name-cell a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition-base);
}

.event-name-cell a:hover {
    color: var(--primary-color);
}

/* Band Column */
.event-band-cell a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-base);
}

.event-band-cell a:hover {
    color: var(--primary-color);
}

.event-band-cell i {
    font-size: 0.85rem;
}

/* Venue Column */
.event-venue-cell a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-base);
}

.event-venue-cell a:hover {
    color: var(--primary-color);
}

.event-venue-cell i {
    font-size: 0.85rem;
    color: var(--primary-color);
}

/* Time Column */
.event-time-cell {
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Price Column */
.event-price-cell {
    font-weight: 600;
    white-space: nowrap;
}

.event-price-cell.free {
    color: var(--success-color);
}

.event-price-cell.paid {
    color: var(--primary-color);
}

/* Status Badge in Table */
.status-badge-table {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge-table.confirmed {
    background: #d4edda;
    color: #155724;
}

.status-badge-table.planning {
    background: #fff3cd;
    color: #856404;
}

.status-badge-table.contract {
    background: #d1ecf1;
    color: #0c5460;
}

/* Actions Column */
.event-actions-cell {
    text-align: center;
    white-space: nowrap;
}

.event-actions-cell .btn {
    padding: 4px 10px;
    font-size: 0.8rem;
    margin: 0 2px;
}

/* Responsive Table */
@media (max-width: 991px) {
    .events-table-container {
        padding: 20px;
    }

    .events-table {
        font-size: 0.9rem;
    }

    .events-table thead th,
    .events-table tbody td {
        padding: 10px 8px;
    }
}

/* Mobile: Stack as cards instead of table */
@media (max-width: 768px) {
    .events-table-container {
        padding: 15px;
    }

    /* Hide table on mobile */
    .events-table {
        display: none;
    }

    /* Show card view on mobile */
    .events-mobile-view {
        display: block !important;
    }
}

/* Mobile Card View */
.events-mobile-view {
    display: none;
}

.event-mobile-card {
    background: white;
    border: 2px solid #e9ecef;
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: var(--transition-base);
}

.event-mobile-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.event-mobile-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.event-mobile-card .card-date {
    background: var(--primary-gradient);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    min-width: 60px;
}

.event-mobile-card .card-date .day {
    font-size: 1.3rem;
    font-weight: bold;
    display: block;
    line-height: 1;
}

.event-mobile-card .card-date .month {
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-top: 2px;
}

.event-mobile-card .card-title h5 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.event-mobile-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.event-mobile-card .card-body i {
    width: 20px;
    color: var(--primary-color);
}

.event-mobile-card .card-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Table Info */
.table-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: var(--bg-light);
    border-radius: 10px;
}

.table-info .results-count {
    font-weight: 600;
    color: var(--text-primary);
}

.table-info .view-toggle {
    display: flex;
    gap: 10px;
}

/* Empty State */
.table-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.table-empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}