/* File: assets/gymnastics-meets.css */

#gymnastics-meets-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Map Styles */
#gymnastics-meets-map {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.meet-popup {
    max-width: 300px;
}

.meet-popup h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.meet-popup p {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.4;
}

.meet-popup strong {
    color: #34495e;
}

.meet-popup a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.meet-popup a:hover {
    text-decoration: underline;
}

/* Filters */
#gymnastics-meets-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

#gymnastics-meets-filters label {
    font-weight: 600;
    color: #2c3e50;
    margin-right: 8px;
}

#gymnastics-meets-filters select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

#gymnastics-meets-filters select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Table Styles */
.gymnastics-meets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.gymnastics-meets-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gymnastics-meets-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

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

.gymnastics-meets-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table Cell Specific Styles */
.meet-name {
    font-weight: 600;
    color: #2c3e50;
    max-width: 250px;
}

.meet-date {
    white-space: nowrap;
    color: #7f8c8d;
    font-weight: 500;
}

.meet-location {
    max-width: 200px;
}

.meet-location small {
    color: #95a5a6;
    font-style: italic;
}

.meet-host {
    color: #34495e;
    max-width: 200px;
}

.meet-levels {
    color: #8e44ad;
    font-weight: 500;
    max-width: 150px;
}

.meet-website a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    background: #ecf0f1;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
}

.meet-website a:hover {
    background: #3498db;
    color: white;
    text-decoration: none;
}

/* Loading and Error States */
.loading, .error, .no-data {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
    font-style: italic;
}

.error {
    color: #e74c3c;
    font-weight: 500;
}

/* Attribution Section */
.attribution {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 20px;
    margin-top: 30px;
    border-radius: 0 8px 8px 0;
}

.attribution h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.attribution p {
    margin: 10px 0;
    color: #5d6d7e;
    line-height: 1.6;
}

.attribution ul {
    margin: 15px 0;
    padding-left: 20px;
}

.attribution li {
    margin: 8px 0;
    color: #5d6d7e;
}

.attribution a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.attribution a:hover {
    text-decoration: underline;
}

.attribution em {
    font-size: 14px;
    color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    #gymnastics-meets-container {
        padding: 15px;
    }
    
    #gymnastics-meets-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    #gymnastics-meets-filters select {
        width: 100%;
        min-width: auto;
    }
    
    .gymnastics-meets-table {
        font-size: 14px;
    }
    
    .gymnastics-meets-table th,
    .gymnastics-meets-table td {
        padding: 10px 8px;
    }
    
    .meet-name,
    .meet-location,
    .meet-host {
        max-width: none;
    }
}

@media (max-width: 480px) {
    .gymnastics-meets-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .gymnastics-meets-table thead,
    .gymnastics-meets-table tbody,
    .gymnastics-meets-table th,
    .gymnastics-meets-table td,
    .gymnastics-meets-table tr {
        display: block;
    }
    
    .gymnastics-meets-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .gymnastics-meets-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 8px;
        background: white;
    }
    
    .gymnastics-meets-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        padding-top: 10px;
        padding-bottom: 10px;
        white-space: normal;
    }
    
    .gymnastics-meets-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #2c3e50;
    }
    
    .meet-name:before { content: "Meet Name"; }
    .meet-date:before { content: "Date"; }
    .meet-location:before { content: "Location"; }
    .meet-host:before { content: "Host Gym"; }
    .meet-levels:before { content: "Levels"; }
    .meet-website:before { content: "Website"; }
}

/* Print Styles */
@media print {
    #gymnastics-meets-map {
        display: none;
    }
    
    #gymnastics-meets-filters {
        display: none;
    }
    
    .gymnastics-meets-table {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .gymnastics-meets-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .meet-website a {
        color: #000;
        text-decoration: underline;
    }
    
    .attribution {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }
}