/* BODY */
body {
    background-image: url('bg-pattern.svg'),
    -webkit-radial-gradient(10% 0, farthest-side ellipse, orange 20%, #ff770d);
    font-family: Roboto, sans-serif;
    font-size: 14px;
    margin: 0;
}

table {
    width: 100%;
}

a {
    color: black;
    font-weight: bold;
    text-decoration: none;
}

hr {
    border: 2px solid orange;
}

h2, h3 {
    text-align: center;
}


/* HEADER */
header {
    background: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.head-logo {
    display: flex;
    align-items: center;
}

.head-logo img {
    width: 150px;
    margin-right: 15px;
}

.head-info {
    float: right;
    text-align: right;
}

.head1, .head2 {
    color:black;
    font-style: italic;
    letter-spacing: 5px;
    font-weight: 700;
}

.head1 {
    font-size: 18pt;
}

.head2 {
    text-transform: uppercase;
    font-style: italic;
}

.sub1 {
    color: #333;
    margin-bottom: 0;
}

.no-oficial, .privado {
    color: red;
    font-size: 1.5em;
    border: 1px solid red;
    text-transform: uppercase;
}

.logo {
    width: 30%;
}


/* FOOTER */
footer {
    text-align: center;
}

.firma {
    vertical-align: top;
    font-size: 20px;
}

.sponsors  {
    display: flex;
    place-content: center;
    align-items: center;
    flex-wrap: wrap;
    background: white;
    padding: 10px;
}

.sponsors img {
    width: 100px;
    margin-left: 15px;
    margin-right: 15px;
}


/* CONTENIDO */
.container {
    overflow: scroll;
}

#contenedor_loading {
    display: none;
    background: white;
    text-align: center;
    padding: 50px;
}

#contenedor_resultados {
    display: none;
    overflow-x: auto;
}

.texto-resultados {
    text-align: center;
    background: white;
    padding: 10px;
    margin: 15px;
    border-radius: 5px;
    font-size: large;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

/* TABLAS */
#contenedor_resultados .tabla_interna {
    border-radius: 5px;
    width: 96%;
    padding: 10px;
    margin: 2%;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}

.tabla_interna {
    border: 1px solid orange;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    border-radius: 5px;
    width: 98%;
    padding: 5px;
    margin: 1%;
}

.tabla_chica,
.tabla_chica th,
.tabla_chica td {
    width: auto;
}

.tabla_interna tbody tr:nth-child(even) td {
    background: rgb(255, 255, 255, 0.8);
    border-radius: 5px;
}

.tabla_interna tbody tr:nth-child(odd) td {
    background: rgb(255, 255, 255, 0.9);
    border-radius: 5px;
}

.tabla_interna thead {
    /*background: rgba(20, 20, 20, 0.9);*/
    color: white;
}

.tabla_interna tbody tr:hover td, .tabla_interna tbody tr.odd td {
    background-color: orange;
    color: #ffffff;
}


/* INFORMES */
@media all {
   div.saltopagina {
      display: none;
   }
}
@media print {
   div.saltopagina {
      display:block;
      page-break-before:always;
   }
}
.chart {
    width: 100%;
    padding-bottom: 30px;
    text-align: center;
}

.numero {
    font-weight: bold;
}

/* TICKETS */
.contenedor_ticket {
    font-size: 2em;
}

.ticket_logo {
    text-align: center;
    margin: 20px;
}

.ticket_content, .ticket_etapas, .ticket_pcs, .ticket_videos {
    text-align: center;
    background: rgb(255, 255, 255, 0.9);
    border-radius: 1em;
    padding: 20px;
    width: 80%;
    text-align: center;
}

.ticket_consulta, .ticket_buscar {
    margin: 15px 0;
}

.ticket_consulta input, .ticket_buscar input {
    margin: 8px 5px;
    padding: 10px;
    border-radius: 8px;
}

.ticket_consulta p, .ticket_buscar p {
    margin: 10px 0 5px 0;
    font-weight: bold;
}

#informe_ticket iframe {
    width: 90%;
}

#informe_ticket .numero, #informe_ticket .nombre {
    font-style: italic;
    letter-spacing: 5px;
    font-size: 2em;
    line-height: 1.4em;
    text-transform: uppercase;
}

#informe_ticket .nombre {
    width: 6em;
}

#informe_ticket .localidad,
#informe_ticket .categoria,
#informe_ticket .nombre_etapa,
#informe_ticket .nombre_pc,
#informe_ticket .nombre_video {
    letter-spacing: 2px;
    line-height: 2em;
}

#informe_ticket .tiempo,
#informe_ticket .pos_general,
#informe_ticket .pos_sexo,
#informe_ticket .pos_categoria {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.5em;
    line-height: 2em;
}

#informe_ticket .estado_carrera,
#informe_ticket .tiempo_nro,
#informe_ticket .pos_general_nro,
#informe_ticket .pos_sexo_nro,
#informe_ticket .pos_categoria_nro,
#informe_ticket .pena_nro {
    color: orange;
    letter-spacing: 3px;
    font-size: 1.5em;
    font-weight: 700;
}

#informe_ticket .ticket_pcs,
#informe_ticket .nombre_parcial,
#informe_ticket .nombre_horas_pc,
#informe_ticket .nombre_minutos_pc,
#informe_ticket .nombre_segundos_pc,
#informe_ticket .nombre_milisegundos_pc {
    display: none;
}

#informe_ticket .hora_pc,
#informe_ticket .horas_pc,
#informe_ticket .minutos_pc,
#informe_ticket .segundos_pc,
#informe_ticket .milisegundos_pc {
    color: orange;
    letter-spacing: 3px;
    font-size: 1.5em;
    font-weight: 700;
}



/* FILTROS */
.contenedor_filtros {
    margin-top: 15px;
}

.filtros .filtros_tipos, .filtros .filtros_carreras,
.filtros .filtros_categorias, .filtros .filtros_categorias div,
.filtros .filtros_etapas, .filtros .filtros_etapas div {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 8px;
}

.selectores {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.selectores .filtros_tipos, .selectores .filtros_carreras,
.selectores .filtros_categorias, .selectores .filtros_categorias div,
.selectores .filtros_etapas, .selectores .filtros_etapas div {
    margin: 8px;
}

.contenedor_filtros .selectores select {
    border: 0;
    border-radius: 8px;
    padding: 8px 15px;
    background-color: #ff770d !important;
    color: white !important;
    font-weight: bold;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.contenedor_filtros .filtros a {
    border-radius: 8px;
    padding: 8px 15px;
    margin: 5px;
    background-color: white;
    color: #ff770d;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.filtro_seleccionado {
    background-color: #ff770d !important;
    color: white !important;
    font-weight: bold;
}

.filtros_categorias, .filtros_categorias div, .filtros_etapas, .filtros_etapas div {
    display: none;
}


/* COLUMNAS */
.pos_general, .pos_sexo, .pos_categoria, .pos_etapa, .puntos, .puntos_anterior, .puntos_total, .numero, .total,
.penas, .velocidad_promedio, .sexo, .estado, .estado_carrera, .tag, .diff_ideal,
.diff_primero, .diff_anterior, .diff_regularidad,
.nacionalidad, .marca_logo {
    text-align: center;
}
.marca_logo img { height: 28px; }

.total, .diff_regularidad {
    font-weight: bold;
}

.sin_medalla, .nacionalidad_nombre, .marca_nombre, #informe_generales .sexo, #informe_categorias .sexo, #informe_etapas .sexo {
    display: none;
}

.medalla {
    font-size: x-large;
}

.estado_dns, .estado_dnf, .estado_dsq, .estado_lap, .estado_hooked, .estado_otro {
    background-color: rgba(200, 100, 100, 0.4);
}

/* ============================================
   ESTILOS PARA PODIOS
   ============================================ */

.podio-buttons {
    white-space: nowrap;
}

.podio-buttons a {
    cursor: pointer;
    color: white;
    text-decoration: none;
    padding: 2px 8px;
    margin: 0 3px;
    border-radius: 3px;
    transition: opacity 0.3s;
}

.btn-entregar-podio,
.btn-recuperar-podio {
    background-color: rgba(0, 150, 0, 0.7);
}

.btn-entregar-podio:hover,
.btn-recuperar-podio:hover {
    opacity: 0.8;
}

.btn-pantalla-completa {
    background-color: rgba(0, 100, 200, 0.7);
}

.btn-pantalla-completa:hover {
    opacity: 0.8;
}

/* ============================================
   ESTILOS PARA MODAL PANTALLA COMPLETA
   ============================================ */

.modal-pantalla-completa {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1;
}

.modal-container {
    position: relative;
    width: 95%;
    height: 95%;
    max-width: 1800px;
    background: white;
    border-radius: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6600 100%);
    border-radius: 10px 10px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
}

/* Estilos para las tablas dentro del modal */
.modal-content .tabla_interna {
    font-size: 1.3em;
    margin: 0 auto;
    max-width: 100%;
}

.modal-content .tabla_interna th {
    padding: 12px 8px;
    font-size: 1.1em;
}

.modal-content .tabla_interna td {
    padding: 10px 8px;
}

.modal-content .medalla {
    font-size: 2em;
}

.modal-content .tabla_interna_titulo {
    font-size: 1.4em;
    padding: 15px;
}

/* Botones de navegación */
.btn-nav-categoria,
.btn-cerrar-modal {
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #ff6600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.btn-nav-categoria:hover,
.btn-cerrar-modal:hover {
    background: #ff6600;
    color: white;
    transform: scale(1.1);
}

.btn-nav-categoria:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.btn-nav-categoria:disabled:hover {
    background: white;
    color: #ff6600;
}

.arrow-up,
.arrow-down,
.close-icon {
    display: block;
    line-height: 1;
}

/* Scrollbar personalizado para el modal */
.modal-content::-webkit-scrollbar {
    width: 12px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 102, 0, 0.5);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 102, 0, 0.8);
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .modal-container {
        width: 98%;
        height: 98%;
    }

    .modal-content .tabla_interna {
        font-size: 1em;
    }

    .btn-nav-categoria,
    .btn-cerrar-modal {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}