/* Aplicar Roboto como fuente predeterminada */
html, body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Ocultar el scroll horizontal */
}

/* Asegurar que #timeDisplay y otros elementos usen Roboto */
#timeDisplay,
#infoRegattaDisplay,
#sliderContainer button,
#bufferSizeDisplay,
#ConsoleDisplay,
#bufferContentDisplay {
    font-family: 'Roboto', sans-serif;
}

#map {
    width: 100%;
    height: 100vh;
    border-radius: 0px;
}

#bufferSizeDisplay {
    position: absolute;
    top: 50px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 5px;
    font-size: 14px;
}

#ConsoleDisplay {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 5px;
    font-size: 14px;
}

#LogoDisplay {
    position: absolute;
    bottom: 55px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    padding: 5px 5px;
    font-size: 14px;
}

#BurgeeDisplay {
    position: absolute;
    bottom: 55px;
    right: 10px;
    background-color: transparent;
    padding: 5px 5px;
    font-size: 14px;
}

#infoRegattaDisplay {
    color: white;
    background-color: rgba(40, 90, 100,0.4);
    font-size: 0.8em;
    color: white;
    padding: 10px;
}

#errorMessage {
    display: none; /* Se muestra solo en caso de error */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f8d7da;
    color: #721c24;
    padding: 20px 30px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: red;
    border-radius: 50%;
    margin-right: 6px;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

#raceInfo {
    position: fixed;
    top: 0;
    right: 0;
    max-width: 300px;
    background-color: rgba(40, 90, 100,0.4);
    margin: 5px;
    color: #000;
    display: block !important;
    overflow: visible; /* para que no corte el botón */
}

#raceInfoHeader {
    position: relative;
    /* Quitamos fondo para que el botón tenga fondo transparente debajo */
    background-color: transparent;
    padding: 5px 5px 5px 5px;
    font-weight: bold;
    font-size: 10px;
    display: flex;
    align-items: center;
    color: #000;
    min-height: 30px; /* Altura suficiente para que el botón quepa */
}

    #raceInfoHeader .minimizeButton {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(255, 255, 255, 0.8);
        border: 1px solid #ccc;
        border-radius: 1px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.3);
        color: #333;
        font-size: 18px;
        width: 26px;
        height: 26px;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
        transition: background-color 0.3s ease, border-color 0.3s ease;
        outline: none;
    }

        #raceInfoHeader .minimizeButton:hover {
            background-color: #fff;
            border-color: #999;
            box-shadow: 0 2px 6px rgba(0,0,0,0.4);
        }

        #raceInfoHeader .minimizeButton:active {
            background-color: #eee;
            border-color: #666;
            box-shadow: none;
        }

        #raceInfoHeader .minimizeButton i {
            pointer-events: none;
            line-height: 1;
        }

#boatInfoContainer {
    position: absolute;
    bottom: 100px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}

#boatInfoTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    padding: 0px;
    left: 10px;
    color: white;
    background-color: rgba(40, 90, 100,0.5);
}

    #boatInfoTable th, #boatInfoTable td {
        border: 0px solid #ccc;
        padding: 5px;
        text-align: left;
    }

    #boatInfoTable th {
        background-color: rgba(60, 100, 120, 0.6);
        font-weight: bold;
    }

    #boatInfoTable tr:nth-child(even) {
        background-color: rgba(60, 120, 140, 0.7); /* Color para filas pares */
    }

    #boatInfoTable tr:nth-child(odd) {
        background-color: rgba(40, 90, 100, 0.5); /* Color para filas impares (igual que el fondo base) */
    }

#progressContainer {
    position: fixed;
    top: 50%; /* Centrar verticalmente */
    left: 50%; /* Centrar horizontalmente */
    transform: translate(-50%, -50%); /* Ajustar el centro */
    width: 50%; /* Ajustar el ancho de la barra */
    height: 20px; /* Aumentar la altura de la barra */
    background-color: #f3f3f3;
    z-index: 1000;
    border-radius: 0px; /* Bordes redondeados */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Sombra para darle profundidad */
}

#progressBar {
    width: 0;
    height: 100%;
    background-color: rgb(23, 23, 23,0.8);
    transition: width 0.2s ease;
    border-radius: 0px; /* Bordes redondeados para el progreso */
}

#fullscreenButton {
    position: fixed;
    top: 80px;
    left: 10px;
    z-index: 1000;
    background-color: white;
    border: none;
    border-radius: 0px;
    padding: 3px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

    #fullscreenButton i {
        font-size: 16px;
        color: black;
    }

    #fullscreenButton:hover {
        background-color: #f0f0f0;
    }


#timeDisplay {
    position: relative;
    background-color: transparent;
    padding: 0;
    font-size: 14px;
    color: white;
    border: none;
    text-align: center;
    margin-left: 10px; /* Separar del slider */
    white-space: nowrap; /* Evitar que el texto se divida en varias líneas */
}


#sliderContainer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 99%;
    z-index: 9001;
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: rgb(23, 23, 23, 0.80);
    padding: 10px; /* Aumentar el espaciado interno */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5); /* Sombra para darle profundidad */
}

    #sliderContainer button {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(85, 85, 85, 0.2); /* Color más claro y semitransparente */
        color: white;
        border: none;
        padding: 3px; /* Reducir el tamaño de los botones */
        font-size: 12px; /* Texto más pequeño */
        cursor: pointer;
        transition: background-color 0.3s ease, opacity 0.3s ease;
        opacity: 0.9; /* Semitransparente */
    }

        #sliderContainer button i {
            font-size: 14px; /* Reducir el tamaño del ícono */
        }

        #sliderContainer button:hover {
            background-color: rgba(119, 119, 119, 0.9); /* Color más claro al pasar el cursor */
            opacity: 1; /* Totalmente opaco al pasar el cursor */
        }

        #sliderContainer button:active {
            background-color: rgba(153, 153, 153, 1); /* Color aún más claro al hacer clic */
        }

.ol_bw {
    filter: grayscale(100%);
}

#timeSlider {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    background: rgba(85, 85, 85, 0.8);
    outline: none;
    cursor: pointer;
    border: 2px solid rgba(119, 119, 119, 0.9);
    margin-top: 5px;
    border-radius: 0;
    opacity: 0.9;
}

    #timeSlider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid rgba(85, 85, 85, 0.8);
        border-radius: 5px;
        cursor: pointer;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    }

    #timeSlider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid rgba(85, 85, 85, 0.8);
        border-radius: 5px;
        cursor: pointer;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    }
/* Estilos para la tabla de barcos */
#boatInfoTable tbody tr {
    transition: all 0.2s ease;
}

    #boatInfoTable tbody tr:hover {
        transform: scale(1.02);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

/* Animación del botón follow */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(255,0,0,0.3);
    }

    50% {
        box-shadow: 0 2px 8px rgba(255,0,0,0.6);
    }
}

#followBoatButton {
    animation: pulse 2s infinite;
}

.compass-control {
    position: absolute;
    bottom: 200px;
    left: 10px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 100;
}

    .compass-control svg {
        width: 55px;
        height: 55px;
        pointer-events: none;
        opacity: 0.7;
    }

.compass-needle {
    transition: transform 0.3s ease-out;
}
