/* Estilos para el contenedor de apuntes */
.learndash-notes-container {
    max-width: 100%;
    margin: 20px 0;
}

.learndash-notes-container h3 {
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Mensaje cuando no hay apuntes */
.no-notes-message {
    text-align: center;
    border-radius: 5px;
    margin: 20px 0;
}

.no-notes-message p {
    margin: 10px 0;
    color: #FFFFFF
}

.no-notes-message p:first-child {
    font-weight: bold;
    color: #FFFFFF
}

small {
    font-size: 100% !important;
}

/* ==========================================================================
   ESTILOS PARA FILTRO DE BÚSQUEDA
   ========================================================================== */

.notes-search-filter {
    position: relative;
    margin: 20px 0;
    max-width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: row;
    align-items: center;
    gap: 30px;
}

.notes-search-filter input[type="text"] {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border-radius: 15px;
    font-size: 16px;
    box-sizing: border-box;
    background: #141717;
    transition: all 0.3s ease;
    border: none;
    color: #FFFFFF;
}

.notes-search-filter input[type="text"]:focus {
    outline: none;
    border-color: #FFFFFF !important;
    /* box-shadow: 0 0 0 3px rgba(255, 125, 50, 0.1); */
}

.notes-search-filter input[type="text"]::placeholder {
    color: #FFFFFF;
}

.back-button a {
    padding: 11px 16px !important;
    border: 1px solid #52D5F2 !important;
    border-radius: 5px !important;
    display: flex !important;
    gap: 15px !important;
    color: #FFFFFF !important;
}

.back-button a:hover {
    background-color: #52D5F226 !important;
    color: #FFFFFF !important;
}

.search-input {
    width: 70% !important;
}

.trash-button a {
    padding: 11px 16px !important;
    border: 1px solid #52D5F2 !important;
    border-radius: 5px !important;
    display: flex !important;
    gap: 15px !important;
    color: #FFFFFF !important;
}

.trash-button:hover {
    background-color: #52D5F226 !important;
    color: #FFFFFF !important;
}

@media (max-width: 767px) {
    .notes-search-filter {
        position: relative;
        margin: 20px 0;
        max-width: 100%;
        display: flex;
        justify-content: center;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .trash-button a {
        padding: 11px 16px !important;
        border: 1px solid #52D5F2 !important;
        border-radius: 5px !important;
        display: flex !important;
        gap: 15px !important;
        color: #FFFFFF !important;
    }

    .trash-button a .trash-icon img {
        max-width: 20px !important;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .trash-button a .trash-icon img {
        max-width: 30px !important;
    }
}

#clear-search {
    position: absolute;
    right: 18%;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #FFFFFF;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#clear-search:hover {
    background: rgba(255, 125, 50, 0.1);
    color: #FF7D32;
}

.no-search-results {
    text-align: center;
    border-radius: 5px;
    margin: 20px 0;
    background: transparent;
}

.no-search-results p {
    margin: 0;
    color: #FFFFFF;
    font-style: italic;
}

/* ==========================================================================
   ESTILOS PARA TODOS LOS APUNTES [learndash_notes_all] - CON SCROLL
   ========================================================================== */

/* Contenedor principal para todos los apuntes */
.learndash-notes-all-wrapper h3 {
    color: #030408;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.learndash-notes-container.learndash-notes-all {
    margin-top: 3%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    grid-auto-rows: min-content;
    align-items: start;
    /* NUEVO: Scroll para el contenedor */
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar personalizada para todos los apuntes */
.learndash-notes-container.learndash-notes-all::-webkit-scrollbar {
    width: 4px;
}

.learndash-notes-container.learndash-notes-all::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.learndash-notes-container.learndash-notes-all::-webkit-scrollbar-thumb {
    background: #FFFFFF;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.learndash-notes-all .learndash-note-item-all {
    background: #141717;
    /* border: 2px solid #FF7D32; */
    border-radius: 14px;
    padding: 15px;
    min-height: 150px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    align-self: start;
    transition: transform 0.3s ease;
}

/* Breadcrumb para todos los apuntes */
.breadcrumbs-title .course-name.bdb_hp {
	color: #F45171;
}

.breadcrumbs-title .course-name.bdb_m {   
	color: #FFFA4A;
}

.breadcrumbs-title .course-name.bdb_hd {
	color: #53F279;
}

.breadcrumbs-title .course-name.bdb_p {
	color: #54EFBB;
}

.breadcrumbs-title .course-name.bdb_he {
	color: #AD83FF;
}

.breadcrumbs-title .course-name.bdb_v {
	color: #FF791B;
}

.breadcrumbs-title .course-name.bdb_e {
	color: #FF0600;
}

.breadcrumbs-title .course-name.bdb_mk {
	color: #B6ED56;
}

.breadcrumbs-title .course-name.bdb_l {
	color: #5467EF;
}

.breadcrumbs-title .tema-leccion,
.breadcrumbs-title .course-name {
    display: inline-block;
    max-width: 300px; /* Ajusta según necesites */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
    transition: max-width 0.3s ease;
}

/* Mejorar el contenedor de breadcrumbs para mejor control */
.breadcrumbs-title {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    overflow: hidden;
}

/* Separadores entre elementos de breadcrumb */
.breadcrumbs-title .separator {
    flex-shrink: 0;
    margin: 10 10px;
}

.learndash-notes-all .note-breadcrumb {
    font-size: 16px;
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.learndash-notes-all .breadcrumbs-and-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    height: 25px;
}

.learndash-notes-all .breadcrumbs-title{
    color: #F6F6F6B2;
    /* margin-bottom: 10px; */
}

.learndash-notes-all .tema-leccion, .course-name {
    font-size: 0.8vw;
}

.learndash-notes-all .note-breadcrumb a {
    color: #F6F6F6B2;
    text-decoration: none;
}

.learndash-notes-all .note-breadcrumb a:hover {
    text-decoration: underline;
}

.learndash-notes-all .note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 25px;
    margin-top: 5px;
}

.learndash-notes-all .note-header h4 {
    margin: 0;
    color: #FFFFFF;
    font-size: 18px;
}

/* Título del apunte */
.learndash-notes-all .note-title {
    margin: 0;
    color: #FF7D32;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.learndash-notes-all .note-actions {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: center;
}

.learndash-notes-all .edit-note-btn,
.learndash-notes-all .delete-note-btn {
    background: transparent;
    border: none;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.learndash-notes-all .edit-note-btn:hover,
.learndash-notes-all .delete-note-btn:hover {
    opacity: 0.7;
}

/* Wrapper para contenido colapsable */
.learndash-notes-all .note-content-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.learndash-notes-all .note-content {
    margin: 10px 0;
    line-height: 1.6;
    color: #FFFFFF;
    max-height: 25px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    width: 100%;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5);
    padding: 0px 0px 0px 0px;
    margin: 0px 0px 0px 0px;
    border-radius: 0px 0px 0px 0px;
}

.learndash-notes-all .note-content.expanded {
    /* Se controla vía JavaScript para animación suave */
}

.learndash-notes-all .note-content p {
    padding: 0;
    margin: 0 0 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    width: 100%;
}

.learndash-notes-all .note-content p:last-child {
    margin-bottom: 0;
}

/* Botón de expansión con SVG personalizado */
.learndash-notes-all .note-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 21px;
    height: 21px;
    padding: 0;
    margin: 10px auto 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learndash-notes-all .note-toggle:hover {
    opacity: 0.8;
}

/* SVG para expandir */
.learndash-notes-all .note-toggle .expand-svg {
    display: block;
}

.learndash-notes-all .note-toggle .collapse-svg {
    display: none;
}

/* Cuando está expandido, intercambiar SVGs */
.learndash-notes-all .note-toggle.expanded .expand-svg {
    display: none;
}

.learndash-notes-all .note-toggle.expanded .collapse-svg {
    display: block;
}

.learndash-notes-all .note-meta {
    color: #666;
    font-size: 17px;
}

@media (max-width: 768px) {
    .learndash-note-item-all .breadcrumbs-and-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        height: auto;
        gap: 20px;
    }

	.breadcrumbs-title{
		flex-direction: column;
        font-size: 3.5vw;
	}

    .learndash-note-item-all .breadcrumbs-title .tema-leccion {
		font-size: 3.5vw;
	}

    .breadcrumbs-title .separator {
        display: none;
    }

    .breadcrumbs-and-actions .note-actions {
        align-items: center;

    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .breadcrumbs-title{
        font-size: 2.2vw;
	}

    .learndash-note-item-all .tema-leccion, .course-name {
		font-size: 2.2vw;
	}
}

/* ==========================================================================
   ESTILOS PARA APUNTES RECIENTES [learndash_notes_recent] - NUEVO
   ========================================================================== */
.learndash-notes-recent-wrapper{
    display: flex;
    justify-content: center;
    padding: 0;
}

/* Contenedor principal para apuntes recientes */
.learndash-notes-recent-wrapper h3 {
    color: #FFFFFF;
    font-size: 24px;
}

.learndash-notes-container.learndash-notes-recent {
    margin: 0;
    padding: 0;
    min-width: 90%;
    border-bottom: 1px solid #FFFFFF4D;
}

.learndash-notes-recent .recent-general {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.learndash-notes-recent .learndash-note-item-recent {
    background: transparent;
    min-height: auto;
}

.recent-note-content {
    width: 90%;
}

/* Breadcrumb para apuntes recientes */
.learndash-notes-recent .note-breadcrumb {
    font-size: 0.7vw;
    display: flex;
    flex-direction: column;
}

.learndash-notes-recent .breadcrumbs-and-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
}

.learndash-notes-recent .breadcrumbs-title, .tema-leccion {
    color: #F6F6F6B2;
}

.learndash-notes-recent .note-breadcrumb a {
    color: #F6F6F6B2;
    text-decoration: none;
    font-weight: 300;
}

.learndash-notes-recent .note-breadcrumb a:hover {
	text-decoration: none;
}

.learndash-notes-recent .course-name.bdb_hp:hover{
	color: #F45171;
}

.learndash-notes-recent .course-name.bdb_m:hover{
	color: #FFFA4A;
}

.learndash-notes-recent .course-name.bdb_hd:hover{
	color: #53F279;
}

.learndash-notes-recent.course-name.bdb_p:hover {
	color: #54EFBB;
}

.learndash-notes-recent.course-name.bdb_he:hover {
	color: #AD83FF;
}

.learndash-notes-recent.course-name.bdb_v:hover {
	color: #FF791B;
}

.learndash-notes-recent.course-name.bdb_e:hover {
	color: #FF0600;
}

.learndash-notes-recent.course-name.bdb_mk:hover {
	color: #B6ED56;
}

.learndash-notes-recent.course-name.bdb_l:hover {
	color: #5467EF;
}

.learndash-notes-recent .note-meta {
    color: #999;
    font-size: 14px;
}

.learndash-notes-recent .note-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

/* Título del apunte para recientes */
.learndash-notes-recent .note-title {
    margin: 0;
    color: #FFFFFF;
    font-size: 0.9vw;
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
}

.learndash-notes-recent .note-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .learndash-notes-container.learndash-notes-recent {
		padding-bottom: 5px;
	}

    .learndash-notes-recent .note-breadcrumb {
        font-size: 3.5vw;
    }

    .learndash-notes-recent .note-title {
        font-size: 2.9vw;
    }

    .learndash-notes-recent .recent-general{
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 0;
	}

	.recent-note-link {
		display: flex;		
		justify-content: right;	
	}

	.recent-note-content {
		width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
	}

    .recent-general {
		padding-right: 10px;
		padding-left: 10px;
	}

}

@media only screen and (min-width: 768px) and (max-width: 1024px) { 
    .learndash-notes-recent .note-title {
        font-size: 2vw;
    }

    .learndash-notes-recent .breadcrumbs-title, .tema-leccion {
        font-size: 1.8vw;
        line-height: 1.4;
    }

	.recent-note-link {
		display: flex;		
		justify-content: right;	
	}

    .learndash-notes-recent .recent-general {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
		gap: 0;
    }
}

/* ==========================================================================
   ESTILOS PARA APUNTES DE LECCIÓN [learndash_notes_lesson]
   ========================================================================== */

.learndash-notes-lesson .learndash-note-item-lesson {
    background: #000000;
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 10px;
    min-height: 120px;
    position: relative;
}

.learndash-notes-lesson .note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Título del apunte para lecciones */
.learndash-notes-lesson .note-title {
    margin: 0;
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.learndash-notes-lesson .note-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.learndash-notes-lesson .edit-note-btn,
.learndash-notes-lesson .delete-note-btn {
    background: transparent;
    border: none;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.learndash-notes-lesson .edit-note-btn:hover,
.learndash-notes-lesson .delete-note-btn:hover {
    opacity: 0.7;
}

/* Wrapper para contenido colapsable en lecciones */
.learndash-notes-lesson .note-content-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.learndash-notes-lesson .note-content {
    line-height: 1.6;
    color: #FFFFFF;
    max-height: 24px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    width: 100%;
}

.learndash-notes-lesson .note-content.expanded {
    /* Se controla vía JavaScript para animación suave */
}

.learndash-notes-lesson .note-content p {
    padding: 0;
    margin: 0 0 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    width: 100%;
}

.learndash-notes-lesson .note-content p:last-child {
    margin-bottom: 0;
}

/* Botón de expansión para lecciones con SVG personalizado */
.learndash-notes-lesson .note-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 21px;
    height: 21px;
    padding: 0;
    margin: 10px auto 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learndash-notes-lesson .note-toggle:hover {
    opacity: 0.8;
}

/* SVG para expandir */
.learndash-notes-lesson .note-toggle .expand-svg {
    display: block;
}

.learndash-notes-lesson .note-toggle .collapse-svg {
    display: none;
}

/* Cuando está expandido, intercambiar SVGs */
.learndash-notes-lesson .note-toggle.expanded .expand-svg {
    display: none;
}

.learndash-notes-lesson .note-toggle.expanded .collapse-svg {
    display: block;
}

@media (max-width: 768px) {
    .learndash-notes-lesson .learndash-note-item-lesson {
        background: #000000;
        border-radius: 14px;
        padding: 15px;
        margin-bottom: 10px;
        min-height: 120px;
        position: relative;
    }

    .learndash-notes-lesson .note-header {
        display: flex;
        flex-direction: row ;
        justify-content: space-between;
        align-items: flex-start;
    }

    /* Título del apunte para lecciones */
    .learndash-notes-lesson .note-title {
        margin: 0;
        color: #FFFFFF;
        font-size: 20px;
        font-weight: 700;
        text-transform: capitalize;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ==========================================================================
   ESTILOS PARA EL BOTÓN DE CREAR APUNTE
   ========================================================================== */

.learndash-note-button {
    background: transparent !important;
    color: white !important;
    border: 2px solid #52D5F2 !important;
    padding: 10px 20px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 0.885vw !important; 
    font-weight: 400 !important;
    transition: background-color 0.3s !important;
}

.learndash-note-button:hover {
    background: #52D5F226 !important;
	border: 2px solid #52D5F2 !important;
    color: #030408 !important;
}

.learndash-note-button.evento_pyp {
    border: 1px solid #52d5f2 !important;
    &:hover{ 
        background-color: #52d5f2 !important;
    }
}

.learndash-note-button.evento_presencial {
    border: 1px solid #ffffff !important;
    &:hover{ 
        background-color: #ffffff !important;
    }
}

.learndash-note-button.bdb_hp {
    border: 1px solid #F45171 !important;
    &:hover{ 
        background-color: #F45171 !important;
    }
}

.learndash-note-button.bdb_m {
    border: 1px solid #FFFA4A !important;
    &:hover{
        background-color: #FFFA4A !important;
    }
}

.learndash-note-button.bdb_hd {
    border: 1px solid #53F279 !important;
    &:hover{
        background-color: #53F279 !important;
    }
}

.learndash-note-button.bdb_p {
    border: 1px solid #54EFBB !important;
    &:hover{
        background-color: #54EFBB !important;
    }
}

.learndash-note-button.bdb_he {
    border: 1px solid #AD83FF !important;
    &:hover{
        background-color: #AD83FF !important;
    }
}

.learndash-note-button.bdb_v {
    border: 1px solid #FF791B !important;
    &:hover{
        background-color: #FF791B !important;
    }
}

.learndash-note-button.bdb_e {
    border: 1px solid #FF0600 !important;
    &:hover{
        background-color: #FF0600 !important;
    }
}

.learndash-note-button.bdb_mk {
    border: 1px solid #B6ED56 !important;
    &:hover{
        background-color: #B6ED56 !important;
    }
}

.learndash-note-button.bdb_l {
    border: 1px solid #5467EF !important;
    &:hover{
        background-color: #5467EF !important;
    }
}

/* MOVILES */
@media (max-width: 768px) {
    .learndash-note-button {
        font-size: 4.3vw !important; 
    }
}

/* TABLET */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .learndash-note-button {
        font-size: 1.4vw !important; 
    }
}

/* PORTATILES */
@media only screen and (min-device-width: 1200px) and (max-device-width: 1600px) {
    .learndash-note-button {
        font-size: 1.2vw !important; 
    }  
}

/* ==========================================================================
   ESTILOS PARA EL POPUP
   ========================================================================== */

.learndash-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.learndash-popup-content {
    background: #141717;
    border-radius: 15px;
    max-width: 700px;
    width: 100%;
    max-height: 80%;
    overflow-y: auto;
}

/* Barra de desplazamiento */
.learndash-popup-content::-webkit-scrollbar{
    width: 5px;
}

.learndash-popup-content::-webkit-scrollbar-track {
    background-color: transparent;
    border: 1px;
    border-radius: 4px;
}

.learndash-popup-content::-webkit-scrollbar-thumb  {
    background-color: #FFFFFF !important;
    border-radius: 4px;
}

.learndash-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #141717;
    border-radius: 15px 15px 0 0;
}

.learndash-popup-header h3 {
    margin: 0;
    color: #FFFFFF;
    font-size: 1.2vw;
}

.learndash-popup-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #FFFFFF;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learndash-popup-close:hover {
    opacity: 0.5;
}

.learndash-popup-close [type=button]:focus,[type=button]:hover,[type=submit]:focus,[type=submit]:hover,button:focus,button:hover {
    background-color: transparent !important;
}

.learndash-popup-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #F6F6F6B2;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #222427;
    color: #FFFFFF;
    border: none;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: 1px #52D5F2 !important;
}

.form-group input[readonly] {
    background-color: #222427;
    color: #FFFFFF;
}

.form-group input:active {
    background-color: #222427;
    border-color: #52D5F2;
}

/* NUEVO: Textarea con altura fija y contador de caracteres */
.form-group textarea {
    resize: none;
    font-family: inherit;
    height: 150px;
    overflow-y: auto;
    line-height: 1.5;
}

textarea::-webkit-scrollbar{
    width: 5px;
}

textarea::-webkit-scrollbar-track {
    background-color: transparent;
    border: 1px;
    border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb  {
    background-color: #52D5F2 !important;
    border-radius: 4px;
}

/* NUEVO: Estilos para el contador de caracteres */
.character-counter {
    font-size: 12px;
    color: #FFFFFF;
    text-align: right;
    margin-top: 5px;
    padding: 0 5px;
    transition: color 0.3s ease;
}

.character-counter .current {
    font-weight: bold;
}

/* CORREGIDO: Estados del contador según proximidad al límite */
.character-counter.limit-warning {
    color: #f59e0b; /* Amarillo de advertencia a partir de 450 caracteres */
}

.character-counter.limit-warning .current {
    color: #f59e0b;
}

.character-counter.limit-reached {
    color: #ef4444; /* Rojo cuando se alcanzan exactamente 500 caracteres */
}

.character-counter.limit-reached .current {
    color: #ef4444;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.button {
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    line-height: 1.5;
    border: 2px solid #FF7D32 !important;
}

.button-primary {
    background-color: transparent !important;
    color: white !important;
    border-color: #52D5F2 !important;
}

.button-primary:hover {
    background-color: #52D5F226 !important;
    border-color: #52D5F2 !important;
}

.button-secondary {
    background: #f7f7f7;
    color: #555;
    border-color: #ccc;
}

.button-secondary:hover {
    background: #fafafa;
    border-color: #999;
}

.button-link-delete {
    color: #a00;
    background: none;
    border: none;
    text-decoration: underline;
}

.button-link-delete:hover {
    color: #dc3232;
}

@media (max-width: 768px){
    .learndash-popup-header h3 {
        font-size: 4.5vw;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .learndash-popup-header h3 {
        font-size: 2vw;
    }

}



/* ==========================================================================
   ESTILOS PARA ALERTAS PERSONALIZADAS
   ========================================================================== */

.custom-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    max-width: 400px;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px #52D5F226;
    animation: slideInRight 0.3s ease;
    color: #FFFFFF;
}

.custom-alert-content {
    display: flex;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid;
}

.custom-alert-success .custom-alert-content {
    border-left-color: #52D5F2;
    background: #222427;
}

.custom-alert-error .custom-alert-content {
    border-left-color: #52D5F2;
    background: #222427;
}

.custom-alert-warning .custom-alert-content {
    border-left-color: #52D5F2;
    background: #222427;
}

.custom-alert-info .custom-alert-content {
    border-left-color: #52D5F2;
    background: #222427;
}

.custom-alert-icon {
    margin-right: 12px;
    flex-shrink: 0;
}

.custom-alert-success .custom-alert-icon {
    color: #52D5F2;
}

.custom-alert-error .custom-alert-icon {
    color: #52D5F2;
}

.custom-alert-warning .custom-alert-icon {
    color: #52D5F2;
}

.custom-alert-info .custom-alert-icon {
    color: #52D5F2;
}

.custom-alert-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #FFFFFF;
}

.custom-alert-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #FFFFFF;
    margin-left: 12px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.custom-alert-close:hover {
    opacity: 0.5;
}

/* Animación de entrada */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================================================
   ESTILOS PARA CONFIRMACIÓN PERSONALIZADA
   ========================================================================== */

.custom-confirm {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-confirm-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.custom-confirm-dialog {
    position: relative;
    background: #141717;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px #52D5F226;
    animation: scaleIn 0.3s ease;
}

.custom-confirm-content {
    padding: 24px;
    text-align: center;
}

.custom-confirm-icon {
    margin-bottom: 16px;
}

.custom-confirm-message {
    font-size: 16px;
    line-height: 1.5;
    color: #FFFFFF;
    margin-bottom: 24px;
}

.custom-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-confirm-buttons button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.custom-confirm-cancel {
    background: transparent !important;
    color: #FFFFFF !important;
    border: 1px solid #52D5F2 !important;
}

.custom-confirm-cancel:hover {
    background: #52D5F226 !important;
}

.custom-confirm-ok {
    background: #52D5F2 !important;
    color: #141717 !important;
    border: 1px solid #52D5F2 !important;
}

.custom-confirm-ok:hover {
    background: transparent !important;
    color: #FFFFFF !important;
    border: 1px solid #52D5F2 !important;
}

/* Animaciones para confirmación */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .learndash-popup-content {
        width: 95%;
        margin: 10px;
    }
    
    /* RESPONSIVE MEJORADO: Desactivar masonry en móvil */
    .learndash-notes-container.learndash-notes-all {
        display: block !important; /* Desactivar grid en móvil */
        position: static !important;
        height: auto !important;
        max-height: 500px !important; /* Altura más pequeña en móvil */
    }
    
    .learndash-notes-all .learndash-note-item-all {
        position: static !important; /* Desactivar posicionamiento absoluto en móvil */
        width: 100% !important;
        left: auto !important;
        top: auto !important;
        margin-bottom: 20px !important;
    }
    
    /* RESPONSIVE para apuntes recientes */
    .learndash-notes-container.learndash-notes-recent {
        max-height: 350px; /* Altura más pequeña en móvil */
    }
    
    .learndash-notes-all .note-header,
    .learndash-notes-lesson .note-header,
    .learndash-notes-recent .note-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .learndash-notes-all .note-actions,
    .learndash-notes-lesson .note-actions,
    .learndash-notes-recent .note-actions {
        align-self: flex-end;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .button {
        text-align: center;
    }
    
    /* Responsive para alertas */
    .custom-alert {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    /* Responsive para filtro */
    .notes-search-filter {
        max-width: none;
    }
}



/* ==========================================================================
   ESTILOS PARA BOTÓN DE DESCARGA PDF
   ========================================================================== */

/* Botón de descarga PDF */
.descargar-apuntes-pdf,
.download-note-pdf {
    background: transparent;
    border: none;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #FF7D32;
}

.descargar-apuntes-pdf:hover,
.download-note-pdf:hover {
    opacity: 0.7;
    text-decoration: none;
}

/* Ajustar espaciado de los botones de acción */
/* .learndash-notes-all .note-actions {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
} */

/* Orden de los botones: PDF, Editar, Eliminar */
.learndash-notes-all .note-actions .descargar-apuntes-pdf,
.learndash-notes-all .note-actions .download-note-pdf {
    order: 1;
}

.learndash-notes-all .note-actions .edit-note-btn {
    order: 2;
}

.learndash-notes-all .note-actions .delete-note-btn {
    order: 3;
}

/* Responsive para botones de acción */
@media (max-width: 768px) {
    .learndash-notes-all .note-actions {
        gap: 2px;
    }
    
    .learndash-notes-all .edit-note-btn,
    .learndash-notes-all .delete-note-btn,
    .learndash-notes-all .descargar-apuntes-pdf,
    .learndash-notes-all .download-note-pdf {
        padding: 4px 6px;
    }
    
    .learndash-notes-all .edit-note-btn svg,
    .learndash-notes-all .delete-note-btn svg,
    .learndash-notes-all .descargar-apuntes-pdf svg,
    .learndash-notes-all .download-note-pdf svg {
        width: 12px;
        height: 12px;
    }
}


/* ==========================================================================
   ESTILOS PARA PAPELERA DE APUNTES [learndash_notes_trash]
   Añadir al final de frontend-styles.css
   ========================================================================== */

/* Header de la papelera */
.learndash-notes-trash-wrapper .trash-header {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dc3545;
}

.learndash-notes-trash-wrapper .trash-header h3 {
    color: #dc3545;
    font-size: 24px;
    margin: 0 0 10px 0;
}

.learndash-notes-trash-wrapper .trash-description {
    color: #666;
    margin: 0;
    font-style: italic;
}

/* Contenedor principal de la papelera */
.learndash-notes-container.learndash-notes-trash {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    grid-auto-rows: min-content;
    align-items: start;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
}

.learndash-notes-trash-wrapper .learndash-notes-container.learndash-notes-trash-items{
	top: 0;
	margin: 0;
	padding: 0;
}

/* Scrollbar para papelera */
.learndash-notes-container.learndash-notes-trash::-webkit-scrollbar {
    width: 4px;
}

.learndash-notes-container.learndash-notes-trash::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.learndash-notes-container.learndash-notes-trash::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 4px;
    transition: background 0.3s ease;
}

/* Items de la papelera - Estilo similar pero más apagado */
.learndash-notes-trash .learndash-note-item-trash {
    background: #141717;
    border-radius: 14px;
    padding: 15px;
    min-height: 150px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
    align-self: start;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.learndash-notes-trash .learndash-note-item-trash:hover {
    opacity: 1;
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Breadcrumb para papelera */
.learndash-notes-trash .note-breadcrumb {
    font-size: 0.8vw;
    padding-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.learndash-notes-trash .breadcrumbs-and-actions {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    height: 25px;
}

.learndash-notes-trash .breadcrumbs-title {
    color: #6c757d;
    margin-bottom: 10px;
    font-size: 18px;
}

.learndash-notes-trash .note-breadcrumb a {
    color: #6c757d;
    text-decoration: none;
}

.learndash-notes-trash .note-breadcrumb a:hover {
    text-decoration: underline;
    color: #495057;
}

/* Header específico para items de papelera */
.learndash-notes-trash .note-header-trash {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.learndash-notes-trash .note-title-section {
    flex: 1;
    min-width: 0;
}

/* Título del apunte en papelera */
.learndash-notes-trash .note-title {
    margin: 0 0 5px 0;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta info de eliminación */
.learndash-notes-trash .trash-meta {
    margin-top: 5px;
}

.learndash-notes-trash .trash-meta small {
    color: #52D5F2;
    font-size: 13px;
    font-weight: 500;
}

/* BOTÓN RECTANGULAR DE RECUPERAR */
.learndash-notes-trash .trash-actions {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
}

.note-actions .restore-note-btn {
    border: 1px solid #52D5F2 ;
    background-color: transparent;
    font-family: Be Vietnam Pro;
    font-weight: 300;
    font-size: 0.8vw;
    color: #F6F6F6;
    padding: 8px 12px;
    border-radius: 5px;
}

.note-actions .restore-note-btn:hover {
    background: #52D5F226 !important;
    border: 1px solid #52D5F2 !important;
}

.note-actions .restore-note-btn:active {
    background: #52D5F226 !important;
    border: 1px solid #52D5F2 !important;
}

/* Contenido en papelera - colores más apagados */
.learndash-notes-trash .note-content {
    margin: 10px 0;
    line-height: 1.6;
    color: #6c757d;
    max-height: 25px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    width: 100%;
    padding: 0px 0px 0px 0px;
    margin: 0px 0px 0px 0px;
}

.learndash-notes-trash .note-content p {
    padding: 0;
    margin: 0 0 10px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    width: 100%;
}

/* Botón de expansión en papelera con colores más apagados */
.learndash-notes-trash .note-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 21px;
    height: 21px;
    padding: 0;
    margin: 10px auto 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learndash-notes-trash .note-toggle:hover {
    opacity: 0.8;
}

/* SVGs en papelera - gris */
.learndash-notes-trash .note-toggle svg circle,
.learndash-notes-trash .note-toggle svg path {
    stroke: #6c757d !important;
}

.learndash-notes-trash .note-toggle svg circle {
    fill: transparent !important;
}

/* Filtro de búsqueda específico para papelera */
#notes-search-input-trash {
    width: 70%;
    padding: 12px 40px 12px 16px;
    border-radius: 15px;
    font-size: 16px;
    box-sizing: border-box;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    color: #495057;
}

#notes-search-input-trash:focus {
    outline: none;
    border-color: #dc3545 !important;
    background: white;
}

#notes-search-input-trash::placeholder {
    color: #6c757d;
}

#clear-search-trash {
    position: absolute;
    right: 17%;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

#clear-search-trash:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Mensaje sin resultados en papelera */
.no-search-results-trash {
    text-align: center;
    padding: 30px 20px;
    border-radius: 5px;
    margin: 20px 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.no-search-results-trash p {
    margin: 0;
    color: #6c757d;
    font-style: italic;
}

@media (max-width: 768px) {
    .learndash-note-item-trash .breadcrumbs-and-actions {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .learndash-note-item-trash .tema-leccion, .course-name {
        font-size: 3.5vw;
    }

	.learndash-note-item-trash .breadcrumbs-and-actions .note-actions {
		align-self: center; 
	}

    .note-actions .restore-note-btn {
		font-size: 3.5vw;
	}
}

@media only screen and (min-width: 768px) and (max-width: 1024px)  {
    .learndash-note-item-trash .breadcrumbs-and-actions {
        /* display: flex;
        flex-direction: column;
        justify-content: center; */
    }

    .learndash-note-item-trash .tema-leccion, .course-name {
        font-size: 2.2vw;
    }

    .note-actions .restore-note-btn {
		font-size: 1.5vw;
	}
}



.recovering {
    border: 1px solid #52D5F2 !important;
    background-color: transparent !important;
    font-family: Be Vietnam Pro !important;
    font-weight: 300 !important;
    font-size: 0.8vw !important;
    color: #F6F6F6 !important;
    padding: 8px 12px !important;
    border-radius: 5px !important;
}

.deleting {
    border: 1px solid #52D5F2 !important;
    background-color: transparent !important;
    font-family: Be Vietnam Pro !important;
    font-weight: 300 !important;
    font-size: 0.8vw !important;
    color: #F6F6F6 !important;
    padding: 8px 12px !important;
    border-radius: 5px !important;
}