/* =======================================================
   ESTILOS GLOBALES Y CONTENEDORES (Fijo 300px / Móvil 100%)
   ======================================================= */
body {
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

div#contenedor {
    width: 300px;
    max-width: 768px !important;
    margin: 0 auto;
    font-family: Sans-Serif;
    padding: 0px;
}

/* Publicidad Responsiva Inteligente */
.contenedor-publicidad {
    width: 100%;
    margin: 4px auto 4px auto;
    text-align: center;
}
.contenedor-publicidad img {
    width: 99.67% !important;
    height: auto !important;
    display: block;
    border: 1px solid #cccccc;
    border-radius: 4px;
    margin-bottom: 4px !important;
}

/* =======================================================
   FILAS DE EJERCICIOS (¡Corrección Flexbox para Shortgame!)
   ======================================================= */
#m5 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 43px !important;
    background-color: #ffffff !important;
    margin-bottom: 6px !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
}

#izqda {
    display: flex !important;
    align-items: center !important;
    font-family: Sans-Serif !important;
    font-size: 20px !important;
    color: #000000 !important;
}

#izqda img {
    margin-right: 8px !important;
    display: inline-block;
    vertical-align: middle;
}

/* Archivo de configuración.php*/
#izqda15 {
    float:left;
    width: 80px;
    display: inline-block;
    margin: 0px 10px 0px 10px;
    font-family: Sans-Serif;
    font-size:15px;
    text-align: left;
    color: black;
    border-style: none;
}

/* Input de fecha especial */
#date {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-family: Sans-Serif !important;
    font-size: 20px !important;
    border: none !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}

#izqda input[type="date"] {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-family: Sans-Serif !important;
    font-size: 20px !important;
    color: #000000 !important;
    cursor: pointer;
}

/* =======================================================
   DESPLEGABLES ESTILO RUEDA LIMPIA
   ======================================================= */
.contenedor-select-app {
    position: relative !important;
    width: 74px !important;
    height: 28px !important;
    background-color: #ffffff !important;
    border: 1px solid #ffffff !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
}

.contenedor-select-app::after {
    content: "▼" !important;
    font-size: 10px !important;
    position: absolute !important;
    right: 8px !important;
    top: 8px !important;
    color: #000000 !important;
    pointer-events: none !important;
}

.select-rueda-limpia {
    width: 100% !important;
    height: 100% !important;
    font-family: Sans-Serif !important;
    font-size: 20px !important;
    font-weight: bold !important;
    color: #000000 !important;
    background: #ffffff !important;
    border: none !important;
    padding-left: 10px !important;
    padding-right: 22px !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    display: block !important;
    cursor: pointer !important;
}

/* =======================================================
   BOTONES ACCIÓN (Siguiente / Cancelar)
   ======================================================= */
.boton-submit-estilo {
    display: block !important;
    width: 100% !important;
    height: 45px !important;
    line-height: 45px !important;
    background-color: #0d4a7c !important;
    color: #ffffff !important;
    font-family: Sans-Serif !important;
    font-size: 24px !important;
    text-align: center !important;
    margin: 4px auto !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.boton-cancelar-estilo {
    display: block !important;
    width: 100% !important;
    height: 45px !important;
    line-height: 45px !important;
    background-color: #d9534f !important;
    color: #ffffff !important;
    font-family: Sans-Serif !important;
    font-size: 24px !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    margin-bottom: 4px !important;
    box-sizing: border-box !important;
}

.boton-volver-estilo {
    display: block !important;
    width: 100% !important;
    height: 45px !important;
    line-height: 45px !important;
    background-color: #ffffff !important;
    border: 1px solid #0d4a7c;
    color: #0d4a7c !important;
    font-family: Sans-Serif !important;
    font-size: 24px !important;
    text-align: center !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    margin-top: 4px !important;
    box-sizing: border-box !important;
}

/* =======================================================
   RESPONSIVE (Móviles de cualquier tamaño)
   ======================================================= */
@media only screen and (max-width: 768px) {
    div#contenedor {
        width: 100% !important;
        padding: 0 px !important;
    }
}

/* Bloques base del formulario */
.campo-bloque {
    display: block;
    width: 100%;
    height: 45px;
    padding: 5px 12px;
    box-sizing: border-box;
    font-family: Sans-Serif;
    font-size: 20px;
    color: #444444;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background: #ffffff;
    margin-bottom: 4px;
}

.bloque-boton-blanco {
    display: block;
    width: 100%;
    height: 45px;
    line-height: 43px;
    background: #ffffff;
    color: #000000;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: Sans-Serif;
    font-size: 22px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    margin-bottom: 4px;
}

.bloque-boton-color {
    display: block;
    width: 100%;
    height: 45px;
    line-height: 43px;
    background: #0d4a7c;
    color: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: Sans-Serif;
    font-size: 22px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    margin-bottom: 4px;
}

.bloque-vacio-separador {
    display: block;
    width: 100%;
    height: 45px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    margin-bottom: 4px;
    box-sizing: border-box;
}

/* Div unificado para Recordar y Restaurar */
.bloque-links-doble {
    display: flex;
    width: 100%;
    height: 45px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    margin-bottom: 4px;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-around;
    font-family: Sans-Serif;
    font-size: 14px;
}
.bloque-links-doble a {
    color: #000000;
    text-decoration: none;
    text-align: center;
    flex: 1;
}
.bloque-links-doble a:first-child {
    border-right: 1px solid #eeeeee;
}

/* Nuevo div de Idioma con el mismo diseño exacto que bloque-boton-blanco */
.bloque-select-idioma {
    display: block;
    width: 100%;
    height: 45px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 4px;
}
.bloque-select-idioma select {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    font-family: Sans-Serif;
    font-size: 22px;
    color: #000000;
    text-align: center;
    text-align-last: center;
    cursor: pointer;
    outline: none;
    padding: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* NUEVA UNIFICACIÓN: Bloque adaptativo para textos libres o errores */
.bloque-texto {
    display: block;
    width: 100%;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
    font-family: Sans-Serif;
    font-size: 20px;
    color: #000000;
    margin-top: 4px;
    margin-bottom: 4px;
}
.bloque-texto a {
    color: #005000;
    text-decoration: underline;
}
.bloque-texto-pequeño {
    display: block;
    width: 100%;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
    font-family: Sans-Serif;
    font-size: 14px;
    text-align: justify;
    color: #000000;
    margin-bottom: 4px;
}

/* =======================================================
   FILAS DE PRÁCTICA LIBRE (Corrección para ipractice.php)
   ======================================================= */
#m3 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 43px !important;
    background-color: #ffffff !important;
    border: 1px solid #cccccc !important;
    border-radius: 4px !important;
    margin-bottom: 4px !important;
    box-sizing: border-box !important;
    padding: 0 12px !important;
}

#m3 a {
    order: 1 !important;
    color: #000000 !important;
    text-decoration: none !important;
    font-family: Sans-Serif !important;
    font-size: 16px !important;
    font-weight: bold !important;
    flex-grow: 1 !important;
    text-align: left !important;
}

#dcha3 {
    order: 2 !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
}

/* =======================================================
   BOTONES DE EJERCICIO CON PUNTO DE COLOR INTEGRADO
   ======================================================= */
.bloque-boton-ejercicio {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    height: 45px !important;
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    border-radius: 4px !important;
    font-family: Sans-Serif !important;
    font-size: 22px !important;
    color: #000000 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    margin-bottom: 4px !important;
    padding: 10px !important;
}

.bloque-boton-ejercicio .texto-ejercicio {
    text-align: left !important;
}

.texto-hcp {
    color: #bbbbbb;
    font-size: 12px;
}

.bloque-boton-ejercicio .punto-color {
    font-size: 26px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: right !important;
    justify-content: right !important;
    vertical-align: middle;
}

/* =======================================================
   REGLAS DE ADAPTABILIDAD PARA GRÁFICAS (pChart)
   ======================================================= */
#graph {
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 12px !important;
    box-sizing: border-box !important;
}

#graph img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 4px !important;
}

.apexcharts-gridline {
  stroke-width: 0.5px !important;
}

#cambioregistro {
    margin: 0px;
    width: 100%;
    border: 0px;
    display: block;
}

#cambioregistro #izqda15 {
    float: left;
    width: 80px;
    margin: 0px 10px 0px 10px;
    font-family: Sans-Serif;
    font-size: 15px;
    text-align: left;
    color: black;
    line-height: 28px;
}

#cambioregistro input[type="text"],
#cambioregistro input[type="date"],
#cambioregistro select {
    display: inline-block !important;
    width: calc(100% - 110px) !important;
    max-width: 170px !important;
    height: 28px !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: Sans-Serif;
    font-size: 15px;
    color: #444444;
    padding: 0px !important;
    margin: 0px 0px 0px 0px !important;
    vertical-align: middle;
    box-sizing: border-box !important;
}

#cambioregistro select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat left center !important;
    background-size: 10px !important;
    padding-left: 15px !important;
    cursor: pointer;
}

#cambioregistro input[type="date"] {
    cursor: pointer;
}

/* =======================================================
   ESTILOS ESPECÍFICOS PARA LA PANTALLA DE SETUP (play.php)
   ======================================================= */

/* Buscador de campos y resultados */
.dropdown-resultados {
    position: absolute;
    top: 42px; /* Justo debajo del input de altura 45px */
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dropdown-resultados.oculto {
    display: none;
}

.item-busqueda {
    padding: 12px;
    border-bottom: 1px solid #eeeeee;
    cursor: pointer;
    font-family: Sans-Serif;
    font-size: 16px;
    color: #444444;
}

.item-busqueda:hover {
    background-color: #f4f4f4;
}

.item-busqueda b {
    color: #0d4a7c;
}

/* Contenedor de campos cercanos */
.grid-cercanos {
    display: grid;
    grid-template-columns: 1fr;
/*     gap: 4px; */
    margin-top: 4px;
}

.btn-cercano {
    text-align: left !important;
    padding-left: 12px !important;
    font-size: 16px !important;
}

.distancia-gris {
    font-size: 12px;
    color: #888888;
    float: right;
    margin-right: 12px;
}

/* Cuadrícula para la bolsa de palos */
.cuadricula-bolsa {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.btn-palo {
    height: 45px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: Sans-Serif;
    font-size: 16px;
    color: #444444;
    cursor: pointer;
    box-sizing: border-box; /* Asegura que el borde no sume tamaño extra */
}

.btn-palo.activo {
    background: #0d4a7c;
    color: #ffffff;
    border-color: #0d4a7c;
}

/* =======================================================
   NUEVA SECCIÓN DE CONFIGURACIÓN DE PARTIDA (4 Columnas)
   ======================================================= */
.grid-configuracion {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.caja-config {
    background: #0d4a7c;
    border-radius: 4px;
    padding: 6px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.caja-config label {
    color: #ffffff;
    font-size: 11px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.caja-config input, 
.caja-config select {
    width: 100%;
    height: 30px;
    border: none;
    border-radius: 2px;
    text-align: center;
    font-family: Sans-Serif;
    font-size: 14px;
    box-sizing: border-box;
    background: #ffffff;
    color: #000000;
}

/* Quitamos la flecha nativa del select para ganar espacio en las 4 columnas */
.caja-config select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0;
    text-align-last: center;
    cursor: pointer;
}

/* Botón 100% ancho para la bolsa */
.btn-modificar-bolsa {
    display: block;
    width: 100%;
    background: #0d4a7c;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 0;
    border-radius: 4px;
    font-weight: bold;
    margin-bottom: 4px;
    box-sizing: border-box;
}