/**
 * Public-facing CSS for AI Match Predictor Plugin
 * Custom styles for bastoresportive.com (with Responsive Fix)
 */

/* --- Common Container Styles --- */
.amp-odds-table-container,
.amp-league-table-container {
    margin: 40px 0;
}

/* --- Odds Table Styles --- */
.amp-odds-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.amp-odds-table th {
    background-color: #1a0a3c;
    color: #ffffff;
    padding: 18px 15px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Prevents header text from wrapping */
}
.amp-odds-table td {
    padding: 15px;
    background-color: #ffffff;
    color: #333;
    font-weight: 500;
}
.amp-odds-table tbody tr {
    border-bottom: 1px solid #e9ecef;
}
.amp-odds-table tbody tr:last-child {
    border-bottom: none;
}
.amp-odds-table .amp-bookmaker-cell {
    font-weight: 700;
    color: #1a0a3c;
    white-space: nowrap;
}
.amp-odds-table .amp-odds-button {
    background-color: #ff00f7;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    display: inline-block;
    border: none;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.amp-odds-table .amp-odds-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(255, 0, 247, 0.3);
    color: #ffffff;
}

/* --- League Table Styles --- */
.amp-league-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
}
.amp-league-table th {
    background-color: #1a0a3c;
    color: #ffffff;
    padding: 15px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}
.amp-league-table td {
    padding: 12px 10px;
    background-color: #ffffff;
}
.amp-league-table tbody tr {
    border-bottom: 1px solid #f1f1f1;
}
.amp-league-table tbody tr:last-child {
    border-bottom: none;
}
.amp-league-table .team-name {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.amp-league-table .points {
    font-weight: 700;
}
.amp-league-table .amp-highlight-team td {
    background-color: #f0e6ff; /* A very light purple to highlight */
}

/* --- No Odds Message --- */
.amp-no-odds-message {
    padding: 20px;
    background-color: #f1f1f1;
    border: 1px solid #dddddd;
    border-radius: 8px;
    text-align: center;
    color: #555;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}


/* --- RESPONSIVE FIX FOR MOBILE --- */
@media (max-width: 768px) {
    .amp-odds-table-container,
    .amp-league-table-container {
        overflow-x: auto; /* This enables horizontal scrolling */
        -webkit-overflow-scrolling: touch; /* This makes scrolling smooth on iOS devices */
        border-radius: 12px;
    }

    .amp-odds-table,
    .amp-league-table {
        min-width: 550px; /* This sets a minimum width for the tables, preventing them from squishing */
    }
}