/* Base styles */
:root {
    --primary-color: #0066cc;
    --secondary-color: #4d4d4d;
    --success-color: #66cc99;
    --danger-color: #dc3545;
    --light-gray: #e5e5e5;
    --background-light: #fafafa;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Common styles */
body {
    font-family: "Roboto", Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.5;
}

/* Ensure the container has proper padding */
.container {
    width: 100%;
    /*max-width: 1200px;*/
    margin: 0 auto;
    /*padding: 20px;*/
    box-sizing: border-box;
}

/* Form elements */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

select,
input[type="text"],
input[type="number"],
textarea,
button {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0055aa;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    width: auto;
}

fieldset {
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1.5rem 0;
}

legend {
    padding: 0 0.5rem;
    font-weight: 500;
}

/* Radio buttons */
input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
}

.height-input {
    width: 100px;
    display: inline-block;
}

/* Code snippet */
.code-container {
    margin-top: 2rem;
}

.code-container h2 {
    margin-bottom: 1rem;
}

textarea {
    width: 100%;
    height: 160px;
    font-family: monospace;
    padding: 1rem;
    background-color: #f5f5f5;
}

/* Preview */
.preview-container {
    margin-top: 2rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 1rem;
}

/* Table styles */
.standings-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.standings-table th,
.standings-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
}

/* Update the standings-table thead th style to be neutral instead of primary color */
.standings-table thead th {
    background-color: white;
    color: var(--secondary-color);
    font-weight: 500;
    border-bottom: 2px solid var(--light-gray);
}

.standings-table tbody tr:nth-child(odd) {
    background-color: white;
}

.standings-table tbody tr:nth-child(even) {
    background-color: var(--background-light);
}

.standings-table tbody tr:hover {
    background-color: rgba(0, 102, 204, 0.05);
}

.standings-table th:first-child,
.standings-table td:first-child {
    text-align: left;
}

/* Team info */
.team-info {
    display: grid;
    grid-template-columns: minmax(30px, auto) auto 1fr;
    align-items: center;
    gap: 0.5rem;
}

.position {
    white-space: nowrap;
    text-align: left;
    font-weight: 600;
}

.team-name {
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-logo {
    width: 24px;
    height: 24px;
    /*margin-right: 0.75rem;*/
    object-fit: contain;
}

/* Match rounds */
.round {
    margin-bottom: 1rem;
}

.round-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-gray);
    border-top: 1px solid var(--light-gray);
    margin-bottom: 1rem;
}

.round-title {
    text-align: center;
    font-weight: 500;
    color: var(--secondary-color);
}

.arrow-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    transition: color 0.2s;
}

.arrow-button:hover {
    color: var(--primary-color);
}

.arrow-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

.right-arrow {
    justify-self: end;
}

/* Match card */
.match-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.stadium-name {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.match-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    width: 100%;
    align-items: center;
    margin-bottom: 0.75rem;
}

.team-home {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.team-away {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
}

.match-score {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.score {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.match-datetime {
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* Status de partida ao vivo */
.match-datetime.live {
    background-color: #00a000;
    color: white !important;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    animation: pulse 2s infinite;
}

/* Status de partida encerrada */
.match-datetime.finished {
    color: var(--secondary-color) !important;
    font-weight: 500;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}


/* Recent results dots */
.recent-results {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-win {
    background-color: var(--success-color);
}
.dot-draw {
    background-color: #bbb;
}
.dot-lost {
    background-color: var(--danger-color);
}

/* Add banner styles */
.banner-container {
    width: 100%;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.banner-container img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Footer */
.footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem;
    background-color: white;
    border-top: 1px solid var(--light-gray);
    font-size: 0.75rem;
}

.footer img {
    height: 20px;
}

/* Update the scrollable-table class to handle overflow properly */
.scrollable-table {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
}

/* Add styles for the new vertical rounds widget */
.rounds-vertical {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.rounds-vertical::-webkit-scrollbar {
    height: 6px;
}

.rounds-vertical::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.rounds-vertical::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.rounds-vertical::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.match-card-vertical {
    min-width: 200px;
    max-width: 200px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 0;
    background-color: white;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
}

.match-card-vertical .stadium-name {
    padding: 0.5rem;
    background-color: var(--background-light);
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card-vertical .match-teams {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
    margin-bottom: 0;
}

.match-card-vertical .team-home,
.match-card-vertical .team-away {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.25rem 0;
}

.match-card-vertical .team-home span,
.match-card-vertical .team-away span {
    font-weight: 500;
}

.match-card-vertical .match-score {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.25rem 0;
}

.match-card-vertical .match-datetime {
    text-align: center;
    padding: 0.5rem;
    border-top: 1px solid var(--light-gray);
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Add styles for the horizontal rounds widget */
/* --- permanece como wrapper do scroll --- */
.rounds-container {
    width: 100%;
    overflow-x: auto;
    /* opcional: replicar aqui a customização de scrollbar */
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    background-color: #f9f9f9;
}
.rounds-container::-webkit-scrollbar {
    height: 4px;
}
.rounds-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.rounds-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}
.rounds-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* --- apenas define largura de conteúdo e centraliza --- */
.rounds-inner {
    display: flex;
    width: max-content;
    margin: 0 auto;
}

/* --- seu carrossel, sem overflow nem width 100% --- */
.rounds-horizontal {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    padding: 0.5rem 0;


    /* REMOVIDO: overflow-x e width */
}


.match-card-horizontal {
    min-width: 180px;
    max-width: 180px;
    border: 1px solid #eaeaea;
    border-radius: var(--border-radius);
    margin-bottom: 0;
    background-color: white;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Estilo para o nome do estádio no card horizontal */
.stadium-name-horizontal {
    font-size: 0.7rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.match-teams-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.5rem;
}

.team-home-horizontal,
.team-away-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40%;
}

.team-home-horizontal span,
.team-away-horizontal span {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.25rem;
    text-align: center;
}

.match-score-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20%;
}

.score {
    font-size: 1rem;
    font-weight: 600;
}

.score-separator {
    margin: 0 0.25rem;
    color: #999;
    font-size: 0.8rem;
}

.match-info-horizontal {
    text-align: center;
    border-top: 1px solid #eaeaea;
    padding-top: 0.35rem;
    /*margin-top: 0.25rem;*/
}

.match-info-horizontal .match-datetime {
    font-size: 0.7rem;
    color: #666;
    margin: 0;
}

/* Banner (publicidade) — apenas o banner flutuante */
.banner-card-horizontal {
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: content-box;
}

.banner-card-horizontal img {
    width: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .checkbox-group {
        flex-direction: column;
    }

    .match-teams {
        gap: 0.5rem;
    }

    .team-home,
    .team-away {
        font-size: 0.875rem;
    }

    .standings-table th,
    .standings-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .team-logo {
        width: 20px;
        height: 20px;
    }

    .match-card-vertical {
        min-width: 160px;
        max-width: 160px;
    }

    .match-card-horizontal {
        min-width: 160px;
        max-width: 160px;
    }

    .stadium-name-horizontal {
        font-size: 0.65rem;
    }


}

@media (max-width: 480px) {
    .match-teams {
        grid-template-columns: 1fr auto 1fr;
        font-size: 0.75rem;
    }

    .team-logo {
        width: 16px;
        height: 16px;
    }

    .score {
        font-size: 1rem;
    }

    .standings-table th:not(:first-child),
    .standings-table td:not(:first-child) {
        padding: 0.5rem 0.25rem;
    }

    .match-card-vertical {
        min-width: 140px;
        max-width: 140px;
    }

    .match-card-vertical .stadium-name,
    .match-card-vertical .match-datetime {
        font-size: 0.7rem;
    }

    .match-card-horizontal {
        min-width: 140px;
        max-width: 140px;
    }

    .match-card-horizontal .match-datetime {
        font-size: 0.65rem;
    }

    .stadium-name-horizontal {
        font-size: 0.6rem;
    }

    .team-home-horizontal span,
    .team-away-horizontal span {
        font-size: 0.7rem;
    }


}
