/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

.site-footer {
    display:none;
}
.inside-header {    
    display: none;
}

.logo-en-pagina {
    width: 50px;
    height: auto;
}
.wp-block-navigation ul {
    gap: 15px;
}
.wp-block-navigation .current-menu-item {
	color: var(--naranja);
}
.enlace-creador {
    background-color: var(--naranja);
}

/* Scroll Vertical */

::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px grey;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--texto);
    border-radius: 10px;
}

/* PROYECTO VIDEOS Y TRANSCRIPCIONES */

body {
    min-height: 100vh;
    font-family: Arial, sans-serif;
	background-color: var(--fondo);
}

/* Guardar Clip */

.video-controls {		
    margin: 0;
    display: flex;
	flex-direction: column;    
    align-items: center;    
}
.video-controls label {
    color: var(--texto);
    margin: auto;
}
.video-controls input {
    outline: none;
    padding: 3px;
    margin: 0;
    width: 40px;
    text-align: center;
    border-radius: 3px;
    border: 2px solid var(--borde);
    background-color: var(--encabezado);
    color: var(--texto);
    transition: border-color 0.3s ease;
}
.video-controls input:focus {
    border: 2px solid var(--naranja);
    background-color: var(--encabezado);
    color: var(--texto);
}
.video-controls button {
    padding: 3px 10px;
    background-color: var(--naranja);
    color: white;
    border: 2px solid var(--naranja);
    cursor: pointer;
    border-radius: 5px;
}
.video-controls button:focus {
    border: 2px solid var(--texto);
}
.video-controls label {
    margin-right: 10px;
}
.video-controls input[type="number"]::-webkit-outer-spin-button,
.video-controls input[type="number"]::-webkit-inner-spin-button,
.video-controls-red input[type="number"]::-webkit-outer-spin-button,
.video-controls-red input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.clip-controles-agrupados {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
		gap: 30px;
		flex-wrap: wrap;		
}

/* Bloque Alertas */


.alertas-clip {		
    background-color: var(--fondo);
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;		
    color: white;
    transition: all 0.3s ease;
		padding: 0 10px;
}    
.alertas-clip.error {
    background-color: #501818;	
		margin: 10px 0 0 0;
		height: 25px;
}
.alertas-clip.success {
    background-color: #18502e;
		margin: 10px 0 0 0;
		height: 25px;
}

/* Capa Bloqueo */

.clip-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.clip-overlay-message {
    font-size: 1.1em;
    padding: 20px;
}
.clip-overlay .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg);
	}
}
.clip-overlay {
    flex-direction: column;
}

/* Contenedor principal */

.contenedor-principal {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1800px;
    margin: auto;
	height: auto;
}	

/* Barra lateral izquierda */

.sidebar {
    flex: 5 1 0;
		min-width: 280px;
    background-color: var(--fondo);
    padding: 0 10px;
		height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;	
}
.sidebar h3 {
    padding: 7px 0px;
    font-size: 20px;
    text-align: center;
    border-radius: 5px;
}
.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin-left: 0;
}
.sidebar ul li {
    margin: 0;
}
.sidebar ul li a {
    text-decoration: none;
    color: var(--texto);
    cursor: pointer;
    font-size: 14px;
}
.video-list-header {
		flex-shrink: 0;    
    z-index: 10;
		background-color: var(--fondo);
	display: none;
}
.video-list-header h3 {
    color: var(--texto);
    padding: 10px;
    border: solid 2px var(--naranja);
    border-radius: 10px;
    background-color: var(--encabezado);
    margin: 0;
		text-align: center;
		font-size: 20px;
}
.video-number {
    font-weight: bold;
    color: white;
    margin-right: 5px;
    font-size: 14px;
}
#videoList {
    max-height: none;
    height: 31.5vh;    
    overflow-y: auto;    
		list-style: none;
		padding: 0 15px;
		margin: 10px 0;
	display: none;
}

/* Bloque favoritos */

.favoritos-list-header {
	flex-shrink: 0;		
	z-index: 9;
	background-color: var(--fondo);	
}
#favoritosList {
    max-height: none;
    height: 100vh;    /*antes era 45vh*/
    overflow-y: auto;    
		list-style: none;		
		margin: 10px 0;
}
.favoritos-list-header h3 {		
    color: var(--texto);
    padding: 10px;
    border: solid 2px var(--naranja);
    border-radius: 10px;
    background-color: var(--encabezado);
    margin: 0;		
		text-align: center;
		font-size: 20px;
}
.favorito-video-header {
    font-size: 14px;
    background: var(--borde);
    color: var(--texto);
    border-radius: 5px;
    padding: 5px 15px;
    text-align: center;
    margin: 10px;
}
.favorito-texto {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    padding: 0 15px;
}    
.favorito-enlace {
    text-decoration: none;
    display: flex;
    font-size: 1em;
    flex-grow: 1;
    padding-right: 5px;
    cursor: pointer;
}
.borrar-favorito, .editar-favorito {
    cursor: pointer;
    margin-left: 5px;
    font-size: 10px;
}

/* Contenido Central */

.main-content {
		flex: 8 1 0;
		min-width: 320px;
		padding: 0;
    background-color: var(--fondo);
		display: flex;
		flex-direction: column;
		height: 100%;
		overflow: hidden;
}
.video-container {
		width: 100%;
		display: flex;
    flex-direction: column;
    align-items: center;
		flex-shrink: 0;		
}
#videoPlayer {
    width: 95%;
		max-width: 780px;
		display: block;
		aspect-ratio: 16 / 9;
    border: solid 2px var(--borde);
    border-radius: 10px;
}
.video-title-container {
    margin: 15px auto 20px auto;
    text-align: left;
    height: 20px;
}
#nombreVideo {
    font-size: 16px;
    color: var(--texto);	
}

.search-bar {
    display: flex;
    gap: 10px;
    margin: auto;
    width: 95%;
    margin-bottom: 10px;
	flex-shrink: 0;
}
.search-input {
    flex: 20;
}

/*input[type=text] {
    border-radius: 10px;
    border: 2px solid var(--borde);
    background-color: var(--encabezado);
    color: var(--texto);
    transition: border-color 0.3s ease;
}
input[type=text]:focus {
    border: 2px solid var(--amarillo);
    background-color: var(--encabezado);
    color: var(--texto);
}*/

.search-icon, .clear-icon {
    cursor: pointer;
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
    margin: auto;
    color: var(--texto);
}
.search-icon:hover, .clear-icon:hover {
    transform: scale(1.1);
}
#searchResults {
		width: 98%;
		max-height: none;
		overflow-y: auto;
		height: 45vh;
		list-style: none;
}
.search-results h3 {		
		margin: 0 auto 15px auto;
		width: 80%;
    font-size: 16px;
    font-style: italic;
    color: white;
    text-align: center;
    /*background-color: #18502e;*/		
    padding: 5px;
}
.resultados {
    padding: 0 5px;
    background-color: var(--fondo);
    color: var(--amarillo);
}
.video-result {
    margin-top: 10px;
}
.video-header {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
		padding-left: 20px;
}
.video-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    padding: 3px 10px;
    color: var(--texto);
    background-color: var(--encabezado);
    border: solid 2px var(--borde);
    border-radius: 5px;
    margin-bottom: 5px;
}
.resultados-container {
    display: none;
}
.search-item {
    padding: 10px 12px;
    margin: 5px 20px;
    color: var(--texto);
    background-color: var(--borde);
    text-align: justify;
    border-radius: 5px;
}
.search-item p {
    margin-bottom: 5px;
}
.search-item a:hover {
    text-decoration: none;
}
.highlight {
    color: var(--amarillo);
}
.guardar-icono {
    padding-left: 20px;
    cursor: pointer;
    font-size: 16px;
}

/* Barra Lateral Derecha */

.transcription-container {
		flex: 5 1 0;
		min-width: 280px;
    background-color: var(--fondo);
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}
.transcription-fijo {
    position: sticky;
    top: 0;
    z-index: 10;
		flex-shrink: 0;
}
.transcription-fijo h3 {
    background-color: var(--encabezado);
    font-size: 20px;
    text-align: center;
    padding: 10px;
    color: var(--texto);
    border: solid 2px var(--naranja);
    border-radius: 10px;
    margin-bottom: 5px;
}
.transcription-variable {
    margin: 15px 0 0 0;
		flex-shrink: 0;
}
#tituloTranscripcion:empty {
    display: none;
}
#tituloTranscripcion {
    font-size: 16px;
    text-align: center;
    padding: 10px;
    line-height: 1.3;
    background-color: var(--borde);
    color: var(--texto);
    border-radius: 5px;
    margin-bottom: 10px;		
}
.transcription-content {
    height: 78vh;
    overflow-y: auto;
    padding: 10px 10px 10px 0;    
		max-height: none;
		list-style: none;
}
.transcription-content p {
    color: var(--texto);
    text-align: justify;
    line-height: 1.25;
    padding: 0 10px 0 5px;
    font-weight: normal;
		margin-bottom: 15px;
}
#contenidoTranscripcion {
	font-size: 16px;
}

/* Minutos resaltados */

.minute-link, .search-item a {
    color: var(--texto);
    background-color: var(--borde);
    padding: 1px 5px;
    border: solid 1px var(--texto);
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;outline: none;
}
.highlighted-minute {
    background-color: var(--amarillo);
    outline: none;
    color: var(--fondo);
    font-weight: bold;
    border: solid 1px var(--encabezado);
}

.primera-linea-transcripcion {
  display: block;  
}
span.primera-linea-transcripcion {
	margin-bottom: 6px;
}

/* Mensajes de Carga y Error */

.loading-message {
    font-size: 14px;
    font-style: italic;
    color: var(--texto);
    text-align: center;
}

/* Otras configuraciones */

@keyframes aparecer {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

input:-webkit-autofill {
 -webkit-box-shadow: 0 0 0px 1000px var(--encabezado) inset !important;
  -webkit-text-fill-color: var(--texto) !important;
  font-size: 17px !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* MEDIA QUERY */
@media (max-width: 1200px) {
	html, body {
			height: auto;
			overflow-y: auto;
			overflow-x: hidden;
    	}
   		.contenedor-principal {
					flex-direction: column;
					height: auto;
					max-width: 100%;
    	}
	.logo-en-pagina {
    width: 40px;
    height: auto;
}
	.bloque-cabecera-pagina {
		flex-direction: column-reverse;
	}
	.bloque-cabecera-nombre, .bloque-cabecera-menu {
			margin-right: auto;
			margin-left: auto;
			justify-content: center;
	}
	.bloque-cabecera-menu {
			margin-bottom: 15px;
	}
		.video-controls {
			display: none;
	}
    .sidebar, .transcription-container {
		flex: 1 1 auto;
		width: 95%;
		max-width: 800px;
		margin-left: auto;
		margin-right: auto;
		min-width: unset;
		height: auto;
		padding: 15px;		
		overflow: visible;
		display: block;	
	}
	.contenedor-principal > *:last-child {
        margin-bottom: 0;
    }
	.main-content {
        display: block;
        height: auto;
        overflow: visible;
    }
    .video-container {
		width: 90%;		
		margin: auto;
    }	
    .search-bar {
        width: 80%;
    }
    #searchResults {
        overflow-y: auto;
        max-height: 50vh;
        height: auto;        
        margin-top: 20px;
    }
     #videoList, #favoritosList, .search-results, .transcription-content {
        max-height: 30vh;
        overflow-y: auto;
        height: auto;
        min-height: unset;
        border: none;
    }
    #videoList { max-height: 30vh; }
    #favoritosList { max-height: 30vh; }
    .search-results { max-height: 50vh; }
    .transcription-container {
        display: block;
        height: auto;
        overflow: visible;
    }
    .transcription-content {
        flex-grow: 0;
        min-height: unset;
        overflow-y: auto;
        max-height: 60vh;
        height: auto;
    }#videoPlayer {
        width: 100%;
        max-width: none;
    }
    .search-bar {
        width: 85%;
    }
    .video-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    .video-controls > div {
        text-align: center;
    }
    .video-controls label {
			 margin-right: 5px;
			}
    .video-controls input {
        width: 35px;
    }
    .clip-controles-agrupados {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        width: 90%;
        max-width: 400px;
    }
}