/* League Fixtures Iframe Styling */
.league-fixtures-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
}

.league-fixtures-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.league-fixtures-header h3 {
    font-family: 'Kanit', sans-serif;
    color: #2d2d2d;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #006E6B 0%, #009E46 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.league-fixtures-header p {
    font-family: 'Metrophobic', sans-serif;
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
}

.league-fixtures-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: white;
    display: none; /* Initially hidden, shown after loading */
}

/* Responsive design */
@media (max-width: 768px) {
    .league-fixtures-container {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .league-fixtures-header h3 {
        font-size: 1.5rem;
    }
    
    .league-fixtures-iframe {
        height: 500px;
    }
}

@media (max-width: 576px) {
    .league-fixtures-iframe {
        height: 400px;
    }
    
    .league-fixtures-header h3 {
        font-size: 1.3rem;
    }
}

/* Loading state */
.league-fixtures-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.league-fixtures-loading::after {
    content: "Loading League Table...";
    font-family: 'Metrophobic', sans-serif;
    color: #6c757d;
    font-size: 1rem;
}

/* Error state */
.league-fixtures-error {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
    font-family: 'Metrophobic', sans-serif;
}

.league-fixtures-error h4 {
    margin-bottom: 0.5rem;
    font-family: 'Kanit', sans-serif;
}

/* Link to external site */
.league-fixtures-link {
    text-align: center;
    margin-top: 1rem;
}

.league-fixtures-link a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #006E6B 0%, #009E46 100%);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Metrophobic', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.league-fixtures-link a:hover {
    background: linear-gradient(135deg, #009E46 0%, #00B050 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

/* Fallback content styling */
.league-fixtures-fallback {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.fallback-content {
    padding: 2rem;
}

.fallback-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.fallback-header i {
    font-size: 2rem;
    color: #009E46;
    margin-bottom: 0.5rem;
}

.fallback-header h4 {
    font-family: 'Kanit', sans-serif;
    color: #2d2d2d;
    margin: 0;
    font-size: 1.5rem;
}

.fallback-body {
    margin-bottom: 2rem;
}

.fallback-body p {
    font-family: 'Metrophobic', sans-serif;
    color: #2d2d2d;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.fallback-body h5 {
    font-family: 'Kanit', sans-serif;
    color: #2d2d2d;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.2rem;
}

.fallback-teams {
    margin-top: 1rem;
}

.league-table {
    overflow-x: auto;
    margin-top: 1rem;
}

.league-table table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Metrophobic', sans-serif;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.league-table thead {
    background: linear-gradient(135deg, #006E6B 0%, #009E46 100%);
    color: white;
}

.league-table th {
    padding: 1rem 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.league-table th:first-child {
    text-align: center;
    width: 50px;
}

.league-table th:nth-child(2) {
    text-align: left;
}

.league-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.league-table tbody tr:hover {
    background-color: #f8f9fa;
}

.league-table tbody tr:last-child {
    border-bottom: none;
}

.league-table td {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
    color: #2d2d2d;
    border: none;
}

.league-table td:first-child {
    font-weight: 600;
    color: #6c757d;
}

.league-table td:nth-child(2) {
    text-align: left;
    font-weight: 500;
}

.league-table td:last-child {
    font-weight: 600;
    color: #009E46;
}

.league-table tbody tr:nth-child(1) {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.league-table tbody tr:nth-child(1) td {
    color: #155724;
    font-weight: 600;
}

.league-table tbody tr:nth-child(1) td:last-child {
    color: #155724;
}

.league-table strong {
    color: #006E6B;
    font-weight: 700;
}

.fallback-actions {
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.fallback-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-family: 'Metrophobic', sans-serif;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.fallback-actions .btn-primary {
    background: linear-gradient(135deg, #006E6B 0%, #009E46 100%);
    color: white;
}

.fallback-actions .btn-primary:hover {
    background: linear-gradient(135deg, #009E46 0%, #00B050 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.fallback-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
}

.fallback-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

/* Responsive design for fallback */
@media (max-width: 768px) {
    .fallback-content {
        padding: 1.5rem;
    }
    
    .league-table {
        font-size: 0.8rem;
    }
    
    .league-table th,
    .league-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .fallback-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .fallback-actions .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .fallback-content {
        padding: 1rem;
    }
    
    .fallback-header h4 {
        font-size: 1.3rem;
    }
    
    .fallback-body h5 {
        font-size: 1.1rem;
    }
}

/* League Table Styles for Scraped Data */
.league-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

.league-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.league-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.league-table thead th {
    padding: 15px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.league-table thead th:first-child {
    text-align: left;
    padding-left: 20px;
}

.league-table thead th:last-child {
    text-align: right;
    padding-right: 20px;
}

.league-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.league-table tbody tr:hover {
    background-color: #f8f9fa;
}

.league-table tbody tr.navan-team {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8f0 100%);
    font-weight: 600;
}

.league-table tbody tr.navan-team:hover {
    background: linear-gradient(135deg, #d4edda 0%, #e8f5e8 100%);
}

.league-table tbody td {
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

.league-table tbody td:first-child {
    text-align: left;
    padding-left: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.league-table tbody td:nth-child(2) {
    text-align: left;
    font-weight: 500;
    color: #34495e;
}

.league-table tbody td:last-child {
    text-align: right;
    padding-right: 20px;
    font-weight: 700;
    color: #27ae60;
}

.league-table tbody tr.navan-team td:last-child {
    color: #1e7e34;
}

.league-table-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.league-table-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.league-table-footer a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.league-table-footer a:hover {
    text-decoration: underline;
}

.league-table-fallback {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.league-table-fallback p {
    margin: 0 0 15px 0;
    color: #856404;
    font-weight: 500;
}

.league-table-fallback iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 8px;
}

/* Responsive League Table */
@media (max-width: 768px) {
    .league-table {
        font-size: 0.85rem;
    }
    
    .league-table thead th,
    .league-table tbody td {
        padding: 8px 6px;
    }
    
    .league-table thead th:first-child,
    .league-table tbody td:first-child {
        padding-left: 12px;
    }
    
    .league-table thead th:last-child,
    .league-table tbody td:last-child {
        padding-right: 12px;
    }
}

@media (max-width: 480px) {
    .league-table {
        font-size: 0.8rem;
    }
    
    .league-table thead th,
    .league-table tbody td {
        padding: 6px 4px;
    }
}