/* 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: #030408;
}

.no-notes-message p:first-child {
    font-weight: bold;
    color: #030408;
}

small {
    font-size: 100% !important;
}

/* ==========================================================================
   ESTILOS PARA FILTRO DE BÚSQUEDA
   ========================================================================== */

.notes-search-filter {
    position: relative;
    padding-top: 2%;
    padding-left: 2%;
    padding-right: 2%;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    border-bottom: 1px solid #7B7B7B33;
}

.notes-search-filter input[type="text"] {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border-radius: 10px;
    font-size: 0.9vw;
    box-sizing: border-box;
    background: #E1E1E1;
    transition: all 0.3s ease;
    border: none;
    color: #9D9D9D;
}

.notes-search-filter input[type="text"]:focus {
    outline: none;
}

.notes-search-filter input[type="text"]::placeholder {
    color: #9D9D9D;
}

.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: 40%;
}

.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;
        max-width: 100%;
        display: flex;
        flex-direction: row;
        padding: 0;
        padding: 15px
    }

    .notes-search-filter h2 {
        font-size: 5vw;
        margin: 0 !important;
    }

    .search-input {
        width: 55%;
    }

    .notes-search-filter input[type="text"] {
        font-size: 3.5vw;
    }

    .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 {
    font-family: "Wix";
    color: #030408;
    font-style: italic;
    font-size: 0.9vw;
    margin: 0;
}

/* ==========================================================================
   ESTILOS PARA TODOS LOS APUNTES [learndash_notes_all] - CON SCROLL
   ========================================================================== */

/* Contenedor principal para todos los apuntes */
.learndash-notes-all-wrapper {
    background-color: #E8E8E8;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.10196078431372549);
    padding-left: 3%;
    padding-right: 3%;
}

.learndash-notes-all-wrapper .notes-search-filter h2 {
    color: #030408;
    padding: 2% 3% 2% 3%;
    font-family: "Mersad";
    font-size: 1.5vw;
    font-weight: 900;
}

.learndash-notes-container.learndash-notes-all {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 20px;
    align-items: start;
}

/* 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: transparent;
    padding: 0px 15px 10px 15px;
    /* min-height: 150px; */
    position: relative;
    width: 100%;
    box-sizing: border-box;
    align-self: start;
    transition: transform 0.3s ease;
}

.breadcrumbs-title .tema-leccion,
.breadcrumbs-title .course-name {
    display: inline-block;
    max-width: 500px; /* 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: 10px;
    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: 0.9vw;
    /* padding-bottom: 8px; */
    display: flex;
    flex-direction: column;
}

.learndash-notes-all .breadcrumbs-and-actions {
    display: flex;
    flex-direction: row;
    justify-content: left;
    height: 25px;
}

.learndash-notes-all .breadcrumbs-title{
    color: #030408;
    font-weight: 700;
}

.learndash-notes-all .tema-leccion, .course-name {
    font-size: 0.9vw;
}

.learndash-notes-all .note-breadcrumb a {
    color: #030408;
    font-weight: 700;
    text-decoration: underline;
    font-family: "Wix";
}

.learndash-notes-all .note-breadcrumb a:hover {
    text-decoration: none;
}

.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: #030408;
    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: 30px;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: flex-end;
    border-bottom: 1px solid #03040885;
    padding: 0% 2% 0% 2%;
}

.learndash-notes-all .edit-note-btn,
.learndash-notes-all .delete-note-btn {
    background: transparent;
    border: none;
    padding: 5px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
    font-size: 0.8vw;
    color: #030408;
    font-weight: 600;
    display: flex;
    flex-direction: row;
    gap: 5px;
}

.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 {
    line-height: 1.6;
    color: #030408;
    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-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%;
    color: #030408;
}

.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-notes-all-wrapper{
        padding-left: 0px;
        padding-right: 0px;
    }

    .learndash-notes-all-wrapper .notes-search-filter h2 {
        font-size: 5vw;
    }

    .learndash-note-item-all .breadcrumbs-and-actions {
        flex-direction: row;
        /* justify-content: center; */
        flex-wrap: wrap;
        height: auto;
        gap: 20px;
    }

    .learndash-notes-all .note-breadcrumb {
        padding-bottom: 0px;
    }

	.breadcrumbs-title{
		flex-direction: column;
        font-size: 3.5vw;
        gap: 0px;
        align-items: flex-start;
	}

    .learndash-note-item-all .breadcrumbs-title .tema-leccion, .course-name {
		font-size: 3.5vw;
        width: -webkit-fill-available;
	}

    .learndash-note-item-all .course-name::after {
        content: '>';
    }

    .all-create-date::before {
        content: '|'
    }

    .learndash-note-item-all .tema-note-breadcrumb {
        width: fit-content;
    }

    .breadcrumbs-title .separator {
        display: none;
    }

    .learndash-note-item-all .breadcrumbs-and-actions .note-actions {
        font-size: 3vw;
    }

    .learndash-notes-all .edit-note-btn,
    .learndash-notes-all .delete-note-btn {
        font-size: 4vw;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .breadcrumbs-title, .all-create-date {
        font-size: 1.5vw;
	}

    .learndash-notes-all-wrapper .notes-search-filter h2 {
        font-size: 2.5vw;
    }

    .notes-search-filter input[type="text"] {
       font-size: 1.8vw; 
    }

    .learndash-note-item-all .tema-leccion, .course-name {
		font-size: 1.5vw;
	}

    .learndash-notes-all .edit-note-btn,
    .learndash-notes-all .delete-note-btn {
        font-size: 1.8vw;
    }
}

/* ==========================================================================
   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: #F0F0F0;
    font-size: 24px;
}

.learndash-notes-container.learndash-notes-recent {
    margin: 0;
    padding: 0px 15px 0px 15px;
    max-width: 100%;
    background-color: #3B3C3F;
    border-radius: 10px;
}

.learndash-notes-recent .recent-general {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 10px;
}

.recent-note-content p {
    margin: 0;
}

.learndash-notes-recent .learndash-note-item-recent {
    background: transparent;
    min-height: auto;
}

.recent-note-content {
    width: 100%;
}

/* 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 {   
    color: #F0F0F0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
}

.learndash-notes-recent .note-breadcrumb a {
    color: #F0F0F0;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.7vw;
}

.learndash-notes-recent .note-breadcrumb a:hover {
	text-decoration: none;
}

.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;
}

/* Título del apunte para recientes */
.learndash-notes-recent .note-title {
    margin: 0;
    color: #F0F0F0;
    font-size: 0.7vw;
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
}

.recent-create-date{
    font-weight: 600;
    margin: 0;
    padding: 0;
}

.recent-note-link{
    transform: rotate(315deg);
}

.recent-note-link .recent-button-content-wrapper {
    cursor: pointer; 
    display: inline-block; 
    transition: transform 0.3s ease;
}

.recent-note-link .recent-button-content-wrapper:hover {
    transform: scale(1.05);
}

.learndash-notes-recent .note-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .learndash-notes-container.learndash-notes-recent {
        padding-left: 2px;
        padding-right: 2px;
    }

    .learndash-notes-recent .note-breadcrumb .course-name {
        font-size: 4vw;
    }

    .learndash-notes-recent .note-breadcrumb .recent-create-date {
        font-size: 3vw;
    }

    .learndash-notes-recent .note-title {
        font-size: 3vw;
    }

    .learndash-notes-recent .recent-general{
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 0;
        padding-bottom: 0;
	}

	.recent-note-link {
		display: flex;		
		justify-content: right;	
	}

    .recent-general {
		padding-right: 10px;
		padding-left: 10px;
	}

}

@media only screen and (min-width: 768px) and (max-width: 1024px) { 
    .learndash-notes-container.learndash-notes-recent {
        padding-left: 10px;
        padding-right: 10px;
    }

    .learndash-notes-recent .note-title {
        font-size: 1.3vw;
    }

    .learndash-notes-recent .breadcrumbs-title .course-name {
        font-size: 1.5vw;
        line-height: 1.4;
    }

    .learndash-notes-recent .note-breadcrumb .recent-create-date {
        font-size: 1.3vw;
    }

	.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;
        padding-bottom: 5px;
        padding-top: 5px;
    }
}

/* ==========================================================================
   ESTILOS PARA APUNTES DE LECCIÓN [learndash_notes_lesson]
   ========================================================================== */

.learndash-notes-lesson .learndash-note-item-lesson {
    background: #030408;
    border-radius: 14px;
    padding: 15px;
    margin-bottom: 10px;
    min-height: 100px;
    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: #F0F0F0;
    font-size: 0.8vw;
    font-weight: 600;
    text-transform: uppercase;
    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: 0.8vw;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.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: #F0F0F0;
    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;
        align-items: flex-start;
        gap: 10px;
    }

    /* 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 .edit-note-btn,
    .learndash-notes-lesson .delete-note-btn {
        font-size: 4vw;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .learndash-notes-lesson .note-title{
        font-size: 2vw;
    }

    .learndash-notes-lesson .edit-note-btn,
    .learndash-notes-lesson .delete-note-btn {
        font-size: 1.8vw;
    }
}

/* ==========================================================================
   ESTILOS PARA EL BOTÓN DE CREAR APUNTE
   ========================================================================== */

.learndash-note-button {
    background: #F0F0F0 !important;
    color: #0A6C8A !important;
    border: 1px solid #0A6C8A !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
    font-size: 0.8vw !important; 
    font-weight: 700 !important;
    transition: background-color 0.3s !important;
    text-transform: uppercase !important;
    font-family: "Wix" !important;
    display: flex !important;
    gap: 10px !important;
}

.learndash-note-button:hover {
    background: #C3F3FF !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: #030408;
    border-radius: 5px;
    max-width: 55%;
    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: #F0F0F0 !important;
    border-radius: 4px;
}

.learndash-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #030408;
    border-radius: 15px 15px 0 0;
}

.learndash-popup-header h3 {
    margin: 0;
    color: #F0F0F0;
    font-size: 2vw !important;
    font-family: "Mersad";
    font-weight: 800;
}

.learndash-popup-header h3 span {
    color: #E4F227 !important;
}

.learndash-popup-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #F0F0F0;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.learndash-popup-close:hover {
    opacity: 0.5;
}

.learndash-popup-close:focus,
.learndash-popup-close: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: 400;
    color: #5A5A5A;
}

.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: #282828;
    color: #F0F0F0;
    border: none;
    font-family: "Wix";
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    background-color: #282828;
    /* border-color: 1px #52D5F2 !important; */
}

.form-group input[readonly] {
    background-color: #282828;
    color: #F0F0F0;
}

/* .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: "Wix";
    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: 13px;
    color: #F0F0F0;
    text-align: right;
    /* padding: 0 5px;  */
    transition: color 0.3s ease;
    font-family: "Wix";
}

.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;
    justify-content: center;
}

.button {
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 700;
}

.button-primary {
    background-color: #C3F3FF !important;
    color: #030408 !important;
    border: 1px solid #C3F3FF !important;
    border-radius: 4px !important;
    text-transform: uppercase;
    font-weight: 700 !important;
}

.button-primary:hover {
    border-color: #C3F3FF !important;
    color: #F0F0F0 !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;
}



/* ==========================================================================
   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 #E4F22726;
    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: #E4F227;
    background: #030408;
}

.custom-alert-error .custom-alert-content {
    border-left-color: #E4F227;
    background: #030408;
}

.custom-alert-warning .custom-alert-content {
    border-left-color: #E4F227;
    background: #030408;
}

.custom-alert-info .custom-alert-content {
    border-left-color: #E4F227;
    background: #030408;
}

.custom-alert-icon {
    margin-right: 12px;
    flex-shrink: 0;
}

.custom-alert-success .custom-alert-icon {
    color: #E4F227;
}

.custom-alert-error .custom-alert-icon {
    color: #E4F227;
}

.custom-alert-warning .custom-alert-icon {
    color: #E4F227;
}

.custom-alert-info .custom-alert-icon {
    color: #E4F227;
}

.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: #03040880;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(10px);
}

.custom-confirm-dialog {
    position: relative;
    background: #030408;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px #0A6C8A26;
    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: #F6F6F6;
    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: #F6F6F6 !important;
    border: 1px solid #E4F227 !important;
}

.custom-confirm-cancel:hover {
    background: #E4F22726 !important;
}

.custom-confirm-ok {
    background: #E4F227 !important;
    color: #030408 !important;
    border: 1px solid #E4F227 !important;
}

.custom-confirm-ok:hover {
    background: transparent !important;
    color: #F6F6F6 !important;
    border: 1px solid #E4F227 !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: fit-content !important; /* Altura más pequeña en móvil */
    }
    
    .learndash-notes-all .learndash-note-item-all {
        /* position: static !important;
        width: 100% !important;
        left: auto !important;
        top: auto !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-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;
    }

    .learndash-popup-content .learndash-popup-header h3 {
        font-size: 4.5vw;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px)  {
    .learndash-notes-container.learndash-notes-all {
        max-height: fit-content !important; /* Altura más pequeña en móvil */
    }
}



/* ==========================================================================
   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 .edit-note-btn:focus {
    box-shadow: none;
}

.learndash-notes-all .note-actions .delete-note-btn {
    order: 3;
}

.learndash-notes-all .note-actions .delete-note-btn:focus {
    box-shadow: none;
}

/* Responsive para botones de acción */
@media (max-width: 768px) {
    .learndash-notes-all .note-actions {
        gap: 15px;
    }
    
    .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: 15px;
        height: 15px;
    }
}


/* ==========================================================================
   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;
}





/* ==========================================================================
   SIDEBAR LATERAL PARA APUNTES EN LESSON
   ========================================================================== */

/* Contenedor del video con sidebar */
.learndash_content_wrap.with-sidebar {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    max-width: 100% !important;
}

/* Sidebar dentro del contenedor */
.notes-sidebar {
    display: none;
    width: 400px;
    min-width: 400px;
    background: #030408;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    flex-direction: column;
    overflow: hidden;
    max-height: 80vh;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #E4F227;
    background: #030408;
    flex-shrink: 0;
}

.sidebar-header h3 {
    margin: 0;
    color: #FFFFFF;
    font-size: 1.3vw;
    font-family: "Mersad";
    font-weight: 800;
}

.sidebar-header h3 span.sidebar-header-span  {
    color: #E4F227;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #FFFFFF;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.sidebar-close:hover {
    opacity: 0.5;
}

/* Pestañas */
.sidebar-tabs {
    display: flex;
    background: #141717;
    flex-shrink: 0;
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

.tab-button:hover {
    color: #F0F0F0;
    background: #1a1a1a;
    border-bottom-color: #E4F227;
}

.tab-button.active {
    color: #E4F227;
    border-bottom-color: #E4F227;
    background: #030408;
}

/* Contenido de pestañas */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #E4F227;
    border-radius: 3px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Formulario dentro del sidebar */
.notes-sidebar .form-group {

}

.notes-sidebar .form-group label {
    display: block;
    font-weight: 400;
    color: #999;
    font-size: 15px;
}

.notes-sidebar .form-group input[type="text"],
.notes-sidebar .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 13px;
    box-sizing: border-box;
    background-color: #1a1a1a;
    color: #FFFFFF;
    font-family: "Wix", sans-serif;
    transition: border-color 0.3s ease;
    border: 1px solid transparent;
}

.notes-sidebar .form-group input[type="text"]:focus,
.notes-sidebar .form-group textarea:focus {
    outline: none;
    border-color: #E4F227;
}

.notes-sidebar .form-group textarea {
    resize: none;
    height: 150px;
    overflow-y: auto;
    line-height: 1.5;
}

.notes-sidebar .form-actions {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.notes-sidebar .button-primary {
    padding: 10px 25px;
}

/* Lista de apuntes en sidebar */
.sidebar-notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-note-item {
    background: #030408;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #2a2a2a;
    transition: all 0.3s;
}

.sidebar-note-item:hover {
    border-color: #E4F227;
    box-shadow: 0 2px 8px rgba(82, 213, 242, 0.15);
}

.sidebar-note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.sidebar-note-header h4 {
    margin: 0;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    flex: 1;
    line-height: 1.3;
}

.sidebar-note-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sidebar-edit-btn,
.sidebar-delete-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
}

.sidebar-edit-btn:hover,
.sidebar-delete-btn:hover {
    opacity: 1;
}

.sidebar-note-content {
    color: #999;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.sidebar-note-date {
    color: #666;
    font-size: 11px;
    font-style: italic;
}

/* Wrapper para contenido colapsable en sidebar */
.sidebar-note-content-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.sidebar-note-content.collapsible {
    line-height: 1.5;
    color: #FFFFFF;
    font-size: 12px;
    max-height: 20px;
    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-word;
    white-space: normal;
    width: 100%;
    margin-bottom: 6px;
}

.sidebar-note-content.collapsible.expanded {
    /* Se controla vía JavaScript */
}

/* Botón de toggle para sidebar */
.sidebar-note-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 21px;
    height: 21px;
    padding: 0;
    margin: 8px auto 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-note-toggle:hover {
    opacity: 0.8;
}

/* SVG para expandir en sidebar */
.sidebar-note-toggle .expand-svg {
    display: block;
}

.sidebar-note-toggle .collapse-svg {
    display: none;
}

/* Cuando está expandido en sidebar */
.sidebar-note-toggle.expanded .expand-svg {
    display: none;
}

.sidebar-note-toggle.expanded .collapse-svg {
    display: block;
}

/* Remover el estilo anterior de sidebar-note-content si existe */
.sidebar-note-content:not(.collapsible) {
    color: #999;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 6px;
}

/* Lista de apuntes en sidebar CON SCROLL */
.sidebar-notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px; /* Altura aproximada para 3 items */
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar personalizada para lista de apuntes */
.sidebar-notes-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar-notes-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-notes-list::-webkit-scrollbar-thumb {
    background: #E4F227;
    border-radius: 3px;
}

.sidebar-notes-list::-webkit-scrollbar-thumb:hover {
    background: #e4f227ab;
}

/* Responsive */
@media (max-width: 1200px) {
    .notes-sidebar {
        width: 350px;
        min-width: 350px;
    }
    
    .sidebar-header h3 {
        font-size: 16px;
    }
}

@media (max-width: 968px) {
    .learndash_content_wrap.with-sidebar {
        flex-direction: column;
        gap: 0;
    }
    
    .notes-sidebar {
        width: 100%;
        min-width: 100%;
        max-height: fit-content;
    }
    
    .sidebar-header h3 {
        font-size: 25px;
    }
}

@media (max-width: 768px) {
    .learndash_content_wrap.with-sidebar {
        gap: 0;
    }

    .notes-sidebar {
        max-height: fit-content;
    }
    
    .sidebar-content {
        padding: 15px;
    }
    
    .sidebar-header {
        padding: 15px 20px;
    }
}


/* ==========================================================================
   ESTILOS PARA EDITOR TINYMCE
   ========================================================================== */

/* Contenedor del editor */
.mce-tinymce {
    border: 1px solid #2a2a2a !important;
    border-radius: 5px !important;
    background: #282828 !important;
}

/* Barra de herramientas */
.mce-toolbar-grp {
    background: #1a1a1a !important;
    border-bottom: 1px solid #2a2a2a !important;
}

/* Botones de la barra */
.mce-btn {
    background: #282828 !important;
    border: 1px solid #2a2a2a !important;
    color: #F0F0F0 !important;
}

.mce-btn:hover {
    background: #333 !important;
    border-color: #E4F227 !important;
}

.mce-btn.mce-active {
    background: #E4F227 !important;
    color: #030408 !important;
}

/* Iconos */
.mce-ico {
    color: #F0F0F0 !important;
}

.mce-btn.mce-active .mce-ico {
    color: #030408 !important;
}

/* Área de contenido */
.mce-edit-area,
.mce-content-body {
    background: #282828 !important;
    color: #F0F0F0 !important;
}

/* Scrollbar para el editor */
.mce-content-body::-webkit-scrollbar {
    width: 5px;
}

.mce-content-body::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius: 4px;
}

.mce-content-body::-webkit-scrollbar-thumb {
    background-color: #52D5F2 !important;
    border-radius: 4px;
}

/* Ajustar espaciado del contador debajo del editor */
.form-group .character-counter {
    margin-top: 8px;
}

/* Estilos para listas dentro del editor */
.mce-content-body ul,
.mce-content-body ol {
    margin: 10px 0;
    padding-left: 30px;
}

.mce-content-body li {
    margin-bottom: 5px;
}

/* Responsive para el editor */
@media (max-width: 768px) {
    .mce-tinymce {
        width: 100% !important;
    }
    
    .mce-toolbar-grp {
        flex-wrap: wrap;
    }
}


/* ==========================================================================
   ESTILOS PARA CONTENIDO HTML DE APUNTES
   ========================================================================== */

/* Estilos para contenido HTML en todos los apuntes */
.learndash-notes-all .note-content p,
.learndash-notes-lesson .note-content p,
.learndash-notes-recent .note-content p,
.sidebar-note-content p {
    margin: 0 0 10px 0;
}

.learndash-notes-all .note-content p:last-child,
.learndash-notes-lesson .note-content p:last-child,
.learndash-notes-recent .note-content p:last-child,
.sidebar-note-content p:last-child {
    margin-bottom: 0;
}

/* Negrita */
.learndash-notes-all .note-content strong,
.learndash-notes-all .note-content b,
.learndash-notes-lesson .note-content strong,
.learndash-notes-lesson .note-content b,
.learndash-notes-recent .note-content strong,
.learndash-notes-recent .note-content b,
.sidebar-note-content strong,
.sidebar-note-content b {
    font-weight: 700;
}

/* Cursiva */
.learndash-notes-all .note-content em,
.learndash-notes-all .note-content i,
.learndash-notes-lesson .note-content em,
.learndash-notes-lesson .note-content i,
.learndash-notes-recent .note-content em,
.learndash-notes-recent .note-content i,
.sidebar-note-content em,
.sidebar-note-content i {
    font-style: italic;
}

/* Subrayado */
.learndash-notes-all .note-content u,
.learndash-notes-lesson .note-content u,
.learndash-notes-recent .note-content u,
.sidebar-note-content u {
    text-decoration: underline;
}

/* Listas */
.learndash-notes-all .note-content ul,
.learndash-notes-all .note-content ol,
.learndash-notes-lesson .note-content ul,
.learndash-notes-lesson .note-content ol,
.learndash-notes-recent .note-content ul,
.learndash-notes-recent .note-content ol,
.sidebar-note-content ul,
.sidebar-note-content ol {
    margin: 10px 0;
    padding-left: 25px;
}

.learndash-notes-all .note-content li,
.learndash-notes-lesson .note-content li,
.learndash-notes-recent .note-content li,
.sidebar-note-content li {
    margin-bottom: 5px;
}

/* Lista con viñetas */
.learndash-notes-all .note-content ul,
.learndash-notes-lesson .note-content ul,
.learndash-notes-recent .note-content ul,
.sidebar-note-content ul {
    list-style-type: disc;
}

/* Lista numerada */
.learndash-notes-all .note-content ol,
.learndash-notes-lesson .note-content ol,
.learndash-notes-recent .note-content ol,
.sidebar-note-content ol {
    list-style-type: decimal;
}

/* Asegurar que el HTML no rompa el layout */
.learndash-notes-all .note-content,
.learndash-notes-lesson .note-content,
.learndash-notes-recent .note-content,
.sidebar-note-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

/* Espaciado entre elementos HTML */
.learndash-notes-all .note-content > *:first-child,
.learndash-notes-lesson .note-content > *:first-child,
.learndash-notes-recent .note-content > *:first-child,
.sidebar-note-content > *:first-child {
    margin-top: 0;
}

.learndash-notes-all .note-content > *:last-child,
.learndash-notes-lesson .note-content > *:last-child,
.learndash-notes-recent .note-content > *:last-child,
.sidebar-note-content > *:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   ESTILOS PARA MODO EDICIÓN EN SIDEBAR
   ========================================================================== */

/* Título del formulario en modo edición */
#tab-create .form-title {
    color: #E4F227;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Animación suave al cambiar texto de pestaña */
.tab-button {
    transition: all 0.3s ease;
}

/* Resaltar pestaña cuando está en modo edición */
.tab-button[data-tab="create"].active {
    position: relative;
}

/* Opcional: Indicador visual cuando está editando */
/* .tab-button[data-tab="create"].editing::after {
    content: "✏️";
    margin-left: 5px;
} */