
.tutorial-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.tag-badge {
    background: #252525;
    color: #bbb;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #333;
    transition: all 0.2s ease;
}

.tag-badge:hover {
    background: #ff8025; /* Naranja corporativo */
    color: #fff;
    border-color: #ff8025;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 128, 37, 0.3);
}






/* Centrado absoluto */
.tutorial_instagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}


/* Contenedor del código */
.code-wrapper {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* Cuando está colapsado limitamos la altura y ponemos scroll */
.code-wrapper.collapsed {
    max-height: 400px; /* Altura máxima antes de esconderse */
}

/* Efecto difuminado en el fondo para avisar que hay más código */
.code-wrapper.collapsed .code-fade {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0) 0%, rgba(26, 26, 26, 0.9) 100%);
    pointer-events: none;
}

.code-wrapper .code-fade {
    display: none; /* Oculto cuando está expandido */
}

/* Botón de alternar */
.btn-toggle-code {
    background: #222;
    border: 1px solid #444;
    color: #ff8025;
    width: 100%;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    font-family: monospace;
    transition: background 0.2s;
    border-radius: 0 0 4px 4px;
    margin-top: -5px; /* Pega el botón al bloque <pre> */
}

.btn-toggle-code:hover {
    background: #333;
    color: #ffa15a;
}


/***************************************OVERLAY HOVER OVER TUTORIAL PICTURE************************************/
.tutorial_picture {
    position: relative;
    display: inline-block; /* Ajusta el contenedor al tamaño del contenido */
    width: 100%;           /* Ocupa el ancho del post */
    text-align: center;    /* Centra la imagen y el overlay */
    margin-bottom: 30px;
}

#tutorial_pic {
    display: block;
    margin: 0 auto;        /* Centra la imagen */
    border-radius: 8px;
    transition: filter 0.3s;	
}

.pic-overlay {
    position: absolute;
    /* Centramos el cuadro respecto al contenedor */
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(10px); 
    
    /* Estilo Electronoobs */
    background: rgba(0, 0, 0, 0.85);
    color: #ff9800;
    padding: 10px 20px;
    border-radius: 5px;
    border: 1px solid #444;
    width: 60%;            /* Un poco menos que el 80% de la imagen */
    pointer-events: none;  /* Para que no interfiera con el ratón */
    
    /* Estado inicial oculto */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0.8s; /* El retardo que querías */
}

/* Mostrar al hacer hover */
.tutorial_picture:hover .pic-overlay {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tutorial_picture:hover #tutorial_pic {
    filter: brightness(0.7);
}
/***************************************OVERLAY HOVER OVER TUTORIAL PICTURE************************************/




/***************************************MODAL PARA AÑADIR PART LIST************************************/
.parts-wrapper { background: #111; padding: 15px; border-radius: 8px; border: 1px solid #333; }
.part-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.part-name { flex: 2; padding: 8px; background: #222; color: #fff; border: 1px solid #444; border-radius: 4px; }
.part-link { flex: 3; padding: 8px; background: #222; color: #fff; border: 1px solid #444; border-radius: 4px; }

/* --- SOLUCIÓN PARA MÓVIL --- */
@media (max-width: 600px) {
    .part-row {
        flex-direction: column; /* Apila los elementos verticalmente */
        align-items: stretch;   /* Estira los inputs al 100% de ancho */
        background: #222;       /* Un fondo ligero para agrupar cada componente */
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #333;
    }

    .part-name, .part-link {
        width: 100%;           /* Ocupan todo el ancho disponible */
        margin-bottom: 5px;    /* Espacio entre nombre y link */
    }

    .btn-remove-part {
        align-self: flex-end;  /* Ponemos la X a la derecha abajo */
        width: 40px;
        height: 40px;
        margin-top: 5px;
    }
}


.btn-remove-part { background: #f44336; color: white; border: none; padding: 0 12px; cursor: pointer; border-radius: 4px; }
#btn-add-part-row { width: 100%; padding: 10px; margin-top: 10px; background: #222; color: #ff9800; border: 1px dashed #ff9800; cursor: pointer; border-radius: 4px; font-weight: bold; }
#btn-add-part-row:hover { background: #333; }

#add-part-btn:hover { background: #555; }

.parts-list {
    list-style: disc;
    margin-left: 20px;
    color: #eee;
}

.parts-list li {
    margin-bottom: 8px;
   
}

.part-link-tag {
    color: #ff9800; /* Naranja Electronoobs */
    text-decoration: none;
    font-weight: bold;
   
    border-bottom: 1px dashed #ff9800;
    transition: all 0.3s;
}

.part-link-tag:hover {
    color: #fff;
    border-bottom: 1px solid #fff;
    background: rgba(255, 152, 0, 0.1);
    padding: 0 4px;
    border-radius: 3px;
}
/***************************************MODAL PARA AÑADIR PART LIST************************************/





#alert-send-approval{
	font-size: 40px; 
	display: block !important; 
	margin: 15px 0; 
	position: relative;
}
@media (max-width: 768px) {
	#alert-send-approval{
		font-size: 20px !important; 		
	}
}


#tutorial_pic{
		border-radius: 12px;
    	box-shadow: 2px 2px 2px 2px rgba(0, 0, 0, 0.3);		
		object-fit: scale-down;
		height: auto;
	}
	.tutorial_title{
		text-align: left; 
		color: var(--noobs-code-blue);
		font-size: 40px;		
		width: 100%;
		float: left;
		border-bottom: 3px dashed #FFF;
		margin-bottom: 15px;
		margin-top: 25px;
		background-image: url("images/misc/digitalbg.png");    
		background-position: center;  /* Centra la imagen */
		background-size: auto 100%;   /* Ancho automático y Altura al 100% */
		overflow: hidden;
	}
	
	.tutorial_main_title{
		text-align: left;
		color: var(--noobs-code-blue);
		font-size: 50px;		
		width: 100%;
		float: left;
		border-bottom: 3px dashed #FFF;
		margin-bottom: 15px;		
		background-image: url("images/misc/digitalbg.png");    
		background-position: center;  /* Centra la imagen */
		background-size: auto 100%;   /* Ancho automático y Altura al 100% */
		overflow: hidden;
	}

	@media (max-width: 768px) {
		.tutorial_main_title{
			font-size: 20px !important;
		}
	}

	.tutorial_youtube{
		height: 650px;
		width: 100%;
	}
	
	@media (max-width: 768px) {
	.tutorial_youtube{
		height: 320px;
		width: 100%;
	}
}



	
pre { 
	position: relative; 
	background-color: var(--noobs-grey);	
	padding: 10px;
} 

.btn-copy {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;   
    color: #fff;
    background: var(--noobs-code-blue);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
	font-size: 30px;
}

	
@media (max-width: 768px) {
	.btn-copy {
		font-size: 16 !important;	
	}
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-copy.copied {
    background: #28a745;
    border-color: #28a745;
}
	
#tutorial-download-button{
		font-size: 30px ;
	}
	
@media (max-width: 768px) {
	#tutorial-download-button{
		font-size: 16 !important;
		margin-left: 5%;
		margin-right: 5%;
		width: 90%;
	}
}
	
	
	
	
.tutorial_chapter {
    height: auto !important; 
    overflow-y: auto !important;
    overflow-x: hidden;
}
	
.chapters{
		overflow: visible !important;
    	display: block; 
	}
	
.edit_button{
	position: absolute;
	top: 10px;
	right: 15px;
	padding: 5px 12px;	
	color: #fff;
	background: #FF0004;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s;
	font-size: 25px;
}	


@media (max-width: 768px) {
	.edit_button{		
		font-size: 16px;
	}	
}

.edit_button a{	
	color: #FFF;
}
	
	
.tutorial-navigation {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    gap: 20px;
}

.btn-nav {
    background-color: var(--noobs-grey);
    color: #fff;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    border: 2px solid transparent;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1; /* Los botones ocupan el mismo ancho */
    justify-content: center;
}

.btn-nav.prev:hover {
    border-color: var(--noobs-code-orange);
    color: var(--noobs-code-orange);
}

.btn-nav.next {
    background-color: var(--noobs-code-blue);
    color: #000;
}

.btn-nav.next:hover {
    background-color: #00aaff; /* Un azul un poco más claro */
    transform: translateX(5px);
}

@media (max-width: 600px) {
    .tutorial-navigation { flex-direction: column; }
}



.form-group-inline {
    display: flex;         /* Activa el modo línea */
    align-items: center;   /* Alinea el texto con el centro del textarea */
    gap: 15px;             /* Espacio de separación entre label y textarea */
    margin-bottom: 15px;   /* Separación con el siguiente bloque */
}

.form-group-inline .form-label {
    margin: 0;             /* Quitamos el margen que pusimos antes para que no se descuadre */
    white-space: nowrap;   /* Evita que el texto "Title:" se rompa en dos líneas */
    flex-shrink: 0;        /* Evita que el label se encoja si el modal es estrecho */
    min-width: 80px;       /* Opcional: Da un ancho fijo al label para que todos los campos alineen igual */
}

.form-group-inline .modal-input {
    margin: 0;             /* Quitamos el margin-top de 10px que tenían los inputs */
    flex-grow: 1;          /* Hace que el textarea ocupe todo el espacio restante */
}

	
.input-wrapper {
    position: relative;
    width: 100%;
}

.char-counter {
    position: absolute;
    right: 10px;
    bottom: 8px; /* Ajustado para estar dentro del input/textarea */
    font-size: 11px;
    color: #888;
    pointer-events: none; /* Para que el ratón "atraviese" el contador y puedas clicar el input */
    background: rgba(255, 255, 255, 0.7); /* Fondo semi-transparente por si el texto llega debajo */
    padding: 2px 4px;
    border-radius: 4px;
    z-index: 5;
}

/* Ajuste específico para que el contador del textarea no tape la última línea */
textarea.modal-input {
    padding-bottom: 30px !important;
}
	
	
.link-container {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 100%; /* O el ancho que prefieras */
}

.truncate-link {
    white-space: nowrap;     /* Evita que salte de línea */
    overflow: hidden;        /* Esconde lo que sobra */
    text-overflow: ellipsis; /* Añade los "..." */
    display: inline-block;
    max-width: 60%;        /* Ajusta este ancho a tu gusto */
    vertical-align: middle;
}

	
.tutorial-edit-addchapters{
	max-width: 60%; margin-top: 50px; margin-left: auto; margin-right: auto; margin-bottom: 50px;
	background: var(--noobs-grey);
	padding: 30px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.btn-addchapters {
background:  var(--noobs-code-blue);
color: #000;
border: 2px solid #FFF;
padding: 15px 30px;
border-radius: 10px;
font-weight: bold;
cursor: pointer;
transition: 0.3s;
width: 100%;
font-size: 25px;
}
.btn-addchapters:hover {
	background: #FFF;
	color: var(--noobs-code-blue);
	scale: 1.1;
}

@media (max-width: 768px) {
	.btn-addchapters {
		padding: 8px 15px !important;
		font-size: 14px !important;
	}	
}
	
.btn-delete {
	float: left; 
	margin: 5px;
    background: #222;
    color: #ff4d4d;
    border: 2px solid #ff4d4d;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    width: auto;
    font-size: 20px;
	height: auto;
}
.btn-delete:hover {
    background: #ff4d4d;
    color: #fff;
}
	
.btn-send {
	float: left; 
	margin: 5px;
    background: #222;
    color: #53B743;
    border: 2px solid #1E6812 ;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    width: auto;
    font-size: 20px;
	height: auto;
}
.btn-send:hover {
    background: #1E6812;
    color: #fff;
}


.btn-delete-full {   
    width: 100% !important;    
}
	
.btn-send-full {
	margin-top: 15px;
	width: 100% !important; 
}



	
.grid-tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.btn-tipo { 
    padding: 20px; border: 2px solid #444; background: #333; color: white; 
    border-radius: 10px; cursor: pointer; transition: 0.3s; font-size: 16px;
}
.btn-tipo:hover { border-color: var(--noobs-code-blue); background: #444; transform: translateY(-3px); }
.btn-tipo i { display: block; font-size: 24px; margin-bottom: 5px; color: var(--noobs-code-blue); }

	

	#tutorial_pic{
		width: 100%;       /* La imagen se expande al ancho del div */
		height: auto;      /* La altura se calcula sola para no deformar la foto */
		display: block;    /* Quita un pequeño espacio en blanco que los navegadores ponen debajo de las imágenes */
		object-fit: contain; /* Asegura que se vea toda la imagen */
	}
	.tutorial_picture{		
		margin: 0 auto 30px;  /* El "auto" en los lados lo centra horizontalmente */
		text-align: center;   /* Asegura que el contenido interno se alinee al centro */
	}
	.tutorial_title{
		text-align: left;
		color: var(--noobs-code-blue);
		font-size: 40px;		
		width: 100%;
		float: left;
		border-bottom: 3px dashed #FFF;
		margin-bottom: 15px;
		margin-top: 25px;
		background-image: url("images/misc/digitalbg.png");    
		background-position: center;  /* Centra la imagen */
		background-size: auto 100%;   /* Ancho automático y Altura al 100% */
		overflow: hidden;
	}

	@media (max-width: 768px) {
		.tutorial_title{
			font-size: 28px !important;
		}
	}
	

	.tutorial_youtube{
		position: relative;
		padding-bottom: 56.25%; /* Relación de aspecto 16:9 (9 / 16 = 0.5625) */
		height: 0;
		overflow: hidden;
		max-width: 100%;
		background: #000;
		border-radius: 8px; /* Opcional: para que pegue con tus imágenes */
		margin-bottom: 20px;
	}

	.tutorial_youtube iframe {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		border: 0;
	}

	@media (max-width: 768px) {
	h1{
		font-size: 30px !important;
	}
	.tutorial_youtube{
		height: 320px;
		width: 100%;
	}
}

	
pre { 
	position: relative; 
	background-color: var(--noobs-grey);	
	padding: 10px;	
} 

@media (max-width: 768px) {
	pre { 
		font-size: 10px !important;
	} 
}

	
#tutorial-download-button{
	font-size: 30px;
	margin: 15px;
}
	
	

	
.tutorial_chapter {
    width: 100%;       /* El contenedor ocupa todo el ancho disponible */
    height: auto;      /* El contenedor crece según la altura de la imagen */
    margin-bottom: 20px;
    overflow: hidden;  /* Evita que nada sobresalga */
    border-radius: 8px; /* Opcional: queda muy bien en tutoriales */
}
	
.chapters{
		overflow: visible !important;
    	display: block; 
	}
	
.sortable-ghost {
    opacity: 0.4;
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
}		

.handle {
    cursor: grab !important;
    display: inline-block;    	
    color: #FF0004;
    font-size: 30px;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    position: relative;    
	
}

.handle:active {
    cursor: grabbing !important;
}
	
	
.chapter-actions{
	position: absolute;
    right: 10px;
    float: left;   
    color: #000;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
	z-index: 10;
	margin-right: 10px;
    
}	
	
.chapter-actions button{	
	color: #000;	
	font-size: 20px;
}



	
.tuorial-description{
	width: 100%;
	border-bottom: 10px dashed #333;
}




.tuorial-thumbnail {
    position: relative; /* Base para el posicionamiento del hijo */
    width: 100%;
    margin-bottom: 20px;
}

.edit-mode-block {
    position: absolute;  /* Flota sobre la imagen */
    top: 50%;            /* Centrado vertical */
    left: 50%;           /* Centrado horizontal */
    transform: translate(-50%, -50%); /* Ajuste exacto al centro */
    z-index: 10;         /* Asegura que esté por encima de la imagen */
    pointer-events: none; /* Opcional: permite clicar la imagen a través del texto */
	text-align: center;
	opacity: 0.8;
	font-size: 40px;
	color: #FFF;
	-webkit-text-stroke: 2px black; /* Grosor y color del borde */
	background: var(--noobs-code-orange);
}

.edit-mode-status {    
    padding: 10px 20px;
    border-radius: 5px;  
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap; /* Evita que el texto salte de línea */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
	text-align: center;
	font-size: 40px;
	opacity: 0.95;
	color: #FFF;
	-webkit-text-stroke: 2px black; /* Grosor y color del borde */
	background: var(--noobs-code-blue);
}


	



.form-label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}


@media (max-width: 768px) {
	.edit-mode-block {		
		font-size: 12px !important;		
	}
	
	.edit-mode-status { 
		font-size: 12px !important;		
	}
}

	

/* Contenedor del formulario con scroll propio */
#editForm {
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Solo el formulario scrollea si es muy largo */
    padding-right: 10px; /* Espacio para la barra de scroll */
}
	

	
	
/* Definimos la animación */
@keyframes highlight-fade {
    0% { background-color: rgba(255, 193, 7, 0.4); box-shadow: inset 0 0 50px rgba(255, 193, 7, 0.5); }
    100% { background-color: rgba(255, 193, 7, 0); box-shadow: inset 0 0 0px rgba(255, 193, 7, 0); }
}

.chapter-highlight {
    position: relative;
}

/* El overlay que se pone encima de todo (fotos, iframes, etc) */
.chapter-highlight::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 99; /* Por encima de fotos y botones */
    pointer-events: none; /* Permite hacer clic a través de él */
    animation: highlight-fade 2s ease-out forwards;
    border: 2px solid #ffc107;
    border-radius: inherit; /* Mantiene las esquinas si tu div es redondeado */
}

	
	
	
	
	
/* Altura mínima para que el editor sea visible */
.ql-container {
    height: 250px;
    font-size: 16px;
}

/* Forzar que el toolbar sea visible y tenga bordes */
.ql-toolbar.ql-snow {
    border: 1px solid #ddd !important;
    background: #f8f9fa;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.ql-container.ql-snow {
    border: 1px solid #ddd !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
