.gkaladders-tabs-container {
    width: 100%;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.gkaladders-tabs-swiper {
    width: 100%;
    border-bottom: 2px solid #ddd;
}

.gkaladders-tabs-list {
    display: flex;
}

.gkaladders-tab {
    padding: 10px 15px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px; /* Aumentado para acomodar más texto */
    max-width: 150px; /* Aumentado el ancho máximo */
    margin-right: 5px;
    height: auto; /* Permite que la altura se ajuste al contenido */
}

.gkaladders-tab:last-child {
    margin-right: 20px;
}

.gkaladders-tab:hover {
    background-color: #e0e0e0;
}

.gkaladders-tab.gkaladders-active {
    background-color: #fff;
    border-bottom-color: #fff;
}

.gkaladders-tab-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-align: center;
    word-wrap: break-word; /* Permite que las palabras largas se rompan */
    hyphens: auto; /* Habilita la separación silábica automática */
    width: 100%;
}

.gkaladders-tab-gender {
    font-size: 0.75em;
    color: #666;
    text-align: center;
    width: 100%;
}

.gkaladders-tab-panel {
    display: none;
    padding: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    padding: 4px;
}

.gkaladders-tab-panel.gkaladders-active {
    display: block;
}

.gkaladders-last-tab-btn {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.9em;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    cursor: pointer;
    margin-top: 10px;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    .gkaladders-tab {
        min-width: 80px; /* Ligeramente aumentado para móviles */
        max-width: 120px;
        padding: 8px 10px;
    }

    .gkaladders-tab-name {
        font-size: 0.8em;
    }

    .gkaladders-tab-gender {
        font-size: 0.7em;
    }

    .gkaladders-heat-header {
        flex-direction: row; /* Cambiado de column a row */
        align-items: center; /* Centrado verticalmente */
    }

    .gkaladders-global-heat {
        float: none;
        margin-top: 0; /* Eliminado el margen superior */
    }
}

/* Estilos para los rounds */
.gkaladders-rounds {
    margin-top: 20px;
}

.gkaladders-round {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

.gkaladders-round h4 {
    margin-top: 0;
    color: #333;
}

.gkaladders-round p {
    margin: 5px 0;
    color: #666;
}

/* Estilos para las flechas de desplazamiento */
.gkaladders-tabs-swiper-container {
    position: relative;
    width: 100%;
}

.gkaladders-swipe-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    font-size: 20px;
    transition: background-color 0.3s;
}

.gkaladders-swipe-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.gkaladders-swipe-prev {
    left: 5px;
}

.gkaladders-swipe-next {
    right: 5px;
}

.gkaladders-swipe-button::after {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.gkaladders-swipe-prev::after {
    transform: rotate(-135deg);
}

.gkaladders-swipe-next::after {
    transform: rotate(45deg);
}

/* Estilos para los heats */
.gkaladders-heats {
    margin-top: 10px;
    padding-left: 0;
    /* Mantén otros paddings si es necesario */
    /* padding-top: 10px;
    padding-right: 10px;
    padding-bottom: 10px; */
}

.gkaladders-heat {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

.gkaladders-heat h5 {
    margin-top: 0;
    color: #333;
}

.gkaladders-heat p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

/* Estilos para los riders */
.gkaladders-heat-riders {
    margin-top: 10px;
}

.gkaladders-rider {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gkaladders-rider p {
    display: flex;
    align-items: center;
}

.gkaladders-rider p:first-child {
    font-weight: bold;
}

.gkaladders-rider p:last-child {
    font-weight: bold;
    color: #333;
}

/* Estilos para la información de depuración */
.gkaladders-debug {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 10px 0;
    font-size: 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.gkaladders-debug h6 {
    margin-top: 0;
    color: #333;
}

/* Estilos para el Global Heat */
.gkaladders-heat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gkaladders-heat-header h5 {
    margin: 0;
    flex-grow: 1;
}

.gkaladders-global-heat {
    font-weight: normal;
    color: #666;
    float: right;
}

.gkaladders-flag {
    width: 20px; /* Ajusta este valor según tus preferencias */
    height: auto;
    vertical-align: middle;
    margin-right: 5px;
}

/* Estilos para el botón "Details" */
.gkaladders-details-button {
    display: block;
    margin: 10px auto;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gkaladders-details-button:hover {
    background-color: #0056b3;
}

/* Estilos para el modal */
.gkaladders-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.gkaladders-modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 95%;
    max-width: 1400px;
}

.gkaladders-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.gkaladders-modal-close:hover,
.gkaladders-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Estilos para la tabla de detalles de riders */
.gkaladders-heat-details {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Esto asegura que todas las columnas tengan el mismo ancho */
}

.gkaladders-heat-details td,
.gkaladders-heat-details th {
    width: 25%; /* Ajusta este valor según el número de riders que quieras mostrar por fila */
    padding: 10px;
    vertical-align: top;
    text-align: center;
}

.gkaladders-rider-image-container {
    width: 80px; /* Reducido de 100px */
    height: 80px; /* Reducido de 100px */
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
}

.gkaladders-rider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gkaladders-rider-details {
    text-align: center;
}

.gkaladders-rider-flag {
    margin-bottom: 5px;
}

.gkaladders-flag {
    width: 30px;
    height: auto;
}

.gkaladders-rider-name,
.gkaladders-rider-lastname {
    font-weight: bold;
    word-wrap: break-word; /* Permite que los nombres largos se ajusten */
}

.gkaladders-rider-id {
    font-size: 0.8em;
    color: #666;
}

.gkaladders-tricks-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.gkaladders-trick-item {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 4px;
}

.gkaladders-trick-points {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 2px;
    text-align: center; /* Añadido para asegurar el centrado */
}

.gkaladders-trick-name {
    font-size: 0.9em;
    text-align: center; /* Añadido para asegurar el centrado */
}

@media (max-width: 768px) {
    .gkaladders-heat-details td,
    .gkaladders-heat-details th {
        width: 50%; /* En móviles, muestra 2 riders por fila */
    }
    
    .gkaladders-flag {
        width: 25px;
    }
    
    .gkaladders-trick-item {
        font-size: 0.8em;
    }
    
    .gkaladders-trick-points {
        font-size: 1.1em;
    }
    
    .gkaladders-trick-name {
        font-size: 0.8em;
    }
}

.gkaladders-debug-info {
    margin-top: 20px;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    font-size: 12px;
}

.gkaladders-debug-info pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.gkaladders-rider-total-points {
    font-weight: bold;
    color: #007bff; /* O cualquier color que prefieras */
    margin-top: 5px;
    font-size: 1.2em; /* Aumentado el tamaño */
}
