﻿/* Contenedor de botones de escudería */
.botones_Escuderia {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    height: 70px;
}
/* Tarjeta de coche */
.coche-card {
    width: 40%;
    background-color: #1f1f1f;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .coche-card:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

.coche-nombre {
    font-size: 22px;
    font-weight: bold;
    color: #38B000;
}

.coche-info {
    font-size: 15px;
    color: #28A745;
    margin-bottom: 5px;
}

/* Bloques con fondo gris para agrupar info + botón */
.bloque-coche {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f5f5;
    padding: 8px 12px;
    border-radius: 5px;
}

/* Contenedor principal del listado de coches */
.coches-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 15px;
}

.coches-container-wrapper {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    height: 59vh;
}

    .coches-container-wrapper::-webkit-scrollbar {
        width: 12px;
    }

    .coches-container-wrapper::-webkit-scrollbar-track {
        border-radius: 8px;
        background: #808080;
    }

    .coches-container-wrapper::-webkit-scrollbar-thumb {
        background: #9EF01A;
        border-radius: 10px;
    }

        .coches-container-wrapper::-webkit-scrollbar-thumb:hover {
            background: #8fd31a;
        }

/* Botones principales de gestión */
.botones_Coche {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    height: 70px;
}

.insertarCoche_boton,
.eliminarCoche_boton,
.misCoches_boton,
.cochesF1_boton {
    font-family: Arial;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    background-color: #9EF01A;
    padding: 10px 16px;
    border: none;
    font-weight:bold;
}

.insertarCoche_boton {
    color: white;
    background-color: #9EF01A;
}

.eliminarCoche_boton {
    color: #ff0000;
    font-weight:bold;
    background-color: #1f1f1f;
}

.misCoches_boton,
.cochesF1_boton {
    color: white;
}

    .insertarCoche_boton:hover,
    .eliminarCoche_boton:hover,
    .misCoches_boton:hover,
    .cochesF1_boton:hover {
        cursor: pointer;
    }

    .insertarCoche_boton.disabled,
    .eliminarCoche_boton.disabled,
    .misCoches_boton.disabled,
    .cochesF1_boton.disabled {
        color: #a9a9a9;
        background-color: #004B23;
        box-shadow: none;
        cursor: not-allowed;
    }

/*.insertarCoche_boton,
.eliminarCoche_boton,
.misCoches_boton,
.cochesF1_boton {
    font-family: Arial;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 10px;
}

.insertarCoche_boton {
    color: #38B000;
}

.eliminarCoche_boton {
    color: #C71F37;
}

.misCoches_boton,
.cochesF1_boton {
    color: #38B000;
}

    .insertarCoche_boton:hover,
    .eliminarCoche_boton:hover,
    .misCoches_boton:hover,
    .cochesF1_boton:hover {
        cursor: pointer;
    }

    .eliminarCoche_boton.disabled,
    .misCoches_boton.disabled,
    .cochesF1_boton.disabled {
        color: #a9a9a9;
        background-color: rgba(0, 0, 0, 0.05);
        cursor: not-allowed;
        box-shadow: none;
    }*/

/* Contenedor principal que envuelve todas las escuderías */
.coches-container-wrapper {
    padding-top: 20px;
    padding-bottom: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 59vh;
    overflow-y: auto;
}

    /* Scrollbar personalizado */
    .coches-container-wrapper::-webkit-scrollbar {
        width: 12px;
    }

    .coches-container-wrapper::-webkit-scrollbar-button {
        display: none;
    }

    .coches-container-wrapper::-webkit-scrollbar-track {
        border-radius: 8px;
        background: #808080;
    }

    .coches-container-wrapper::-webkit-scrollbar-thumb {
        background: #9EF01A;
        border-radius: 10px;
    }

        .coches-container-wrapper::-webkit-scrollbar-thumb:hover {
            background: #9EF01A;
        }

/* Contenedor de tarjetas de escuderías */
.coches-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 10px;
}

/* Tarjeta de escudería */
.coches-card {
    width: 40%;
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    position: relative;
    font-family: Arial;
}

    .coches-card:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

.coches-nombre {
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}
/* Información de escudería */
.coches-info {
    font-size: 15px;
    margin-bottom: 5px;
    color: #555;
}

.piloto-info-box, .coche-info-box {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #f5f5f5;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* Botón de estadísticas */
.stats-button {
    width: 150px;
    margin-left: 450px;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #2E8B57;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    right: 20px;
    bottom: 20px;
}

    .stats-button:hover {
        background-color: #004B23;
    }

.estadisticas-dialogo {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    padding: 20px;
    width: 420px;
    background: #1f1f1f;
    font-family: Arial, sans-serif;
    font-size: 18px;
    max-height: 80vh;
    overflow-y: auto;
}

    .estadisticas-dialogo::backdrop {
        background: rgba(0, 0, 0, 0.4);
    }

.estadisticas-content {
    border: none;
    font-family: Arial;
    font-size: 18px;
    font-weight: bold;
    padding: 10px;
}

    .estadisticas-content::backdrop {
        background: rgba(0, 0, 0, 0.4);
    }

    /* Reemplaza los <p> actuales del diálogo por este formato mejorado */
    .estadisticas-content p {
        display: flex;
        justify-content: space-between; /* Título a la izquierda, valor a la derecha */
        align-items: center;
        margin-top: 25px;
        border: 2.5px solid #555;
        padding: 5px 10px;
        border-radius: 4px;
        margin-bottom: 15px;
        background-color: #f9f9f9;
        color: #333;
        font-weight: bold;
    }

    .estadisticas-content span {
        font-weight: bold;
    }


.cerrar-estadisticas {
    border: none;
    color: #9EF01A;
    background-color: transparent;
    margin-left: 350px;
    display: flex;
    justify-content: center;
    align-content: center;
    font-size: 25px;
    cursor: pointer;
}


/* Valor destacado de la estadística alineado a la derecha */
.valor-estadistica {
    font-weight: bold;
    padding-left: 10px;
}

/* Colores según calidad */
.valor-alta {
    color: #2e8b57;
}

.valor-media {
    color: #f39c12;
}

.valor-baja {
    color: #c0392b;
}

/* Colores por fabricante de motor */
.motor-honda {
    color: #800080;
}

.motor-ferrari {
    color: #C00000;
}

.motor-mercedes {
    color: #555555;
}

.motor-renault {
    color: #FFD700;
}

.disabled {
    color: #a9a9a9;
    background-color: rgba(0, 0, 0, 0.05);
    cursor: not-allowed;
    box-shadow: none;
}

/* Estilo para el diálogo insertar coche */
#insertarCocheDialog {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    padding: 20px;
    width: 400px;
    background: #1f1f1f;
    color:white;
    font-family: Arial, sans-serif;
    font-size: 18px;
}

    #insertarCocheDialog::backdrop {
        background: rgba(0, 0, 0, 0.4);
    }
#motorCoche{
    margin-bottom: 15px;
    color:#38B000;
    height:25px
}
.insertarCoche-content {
    display: flex;
    flex-direction: column;
}

#cocheForm label {
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

#cocheForm input {
    width: 100%;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 18px;
    padding: 5px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

#cocheForm .form-buttons {
    display: flex;
    justify-content: space-between;
}

    #cocheForm .form-buttons button {
        padding: 10px 20px;
        font-weight: bold;
        border-radius: 4px;
        border: none;
        cursor: pointer;
    }

        #cocheForm .form-buttons button:first-child {
            background-color: #007200;
            color: white;
        }

            #cocheForm .form-buttons button:first-child:hover {
                background-color: #004B23;
            }

        #cocheForm .form-buttons button:last-child {
            background-color: #28a745;
            color: white;
        }

            #cocheForm .form-buttons button:last-child:hover {
                background-color: #218838;
            }


#eliminarCocheDialog {
    font-family: Arial;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    width: 400px;
}

    #eliminarCocheDialog::backdrop {
        background: rgba(0, 0, 0, 0.4);
    }

.eliminarCoche-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
    .eliminarCoche-content .form-buttons button:last-child {
        background-color: #6c757d;
        color: white;
    }
.eliminarCoche-content .form-buttons button {
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

    #cochesListEliminar label {
    font-weight: normal;
    color: #007200;
    font-size: 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#cochesListEliminar input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border 0.3s, background-color 0.3s;
}

    #cochesListEliminar input[type="radio"]:hover {
        border-color: #28a745;
    }

    #cochesListEliminar input[type="radio"]:checked {
        background-color: #28a745;
        border: 2px solid black;
        transform: scale(1.1);
    }

.cochesEscuderia-content .form-buttons {
    display: flex;
    justify-content: space-between;
}

    .cochesEscuderia-content .form-buttons button {
        padding: 10px 20px;
        font-weight: bold;
        border-radius: 8px;
        border: none;
        cursor: pointer;
    }

        .cochesEscuderia-content .form-buttons button:first-child {
            background-color: #C71F37;
            color: white;
        }

            .cochesEscuderia-content .form-buttons button:first-child:hover {
                background-color: #a00027;
            }

        .cochesEscuderia-content .form-buttons button:last-child {
            background-color: #6c757d;
            color: white;
        }

            .cochesEscuderia-content .form-buttons button:last-child:hover {
                background-color: #5a6268;
            }
