:root {
  --panel:#1e293b;
  --panel-2:#111827;
  --border:#2d323a;
  --text:#e2e8f0;
  --muted:#94a3b8;
  --accent:#3b82f6;
  --success:#16a34a;
  --like:#e11d48;
}

.thread {
    overflow-y: scroll;
    max-height: calc(100vh - 4.5rem);
    height: 100%;
    scrollbar-width: none;
    display: flex
;
    flex-direction: column;
    gap: .5rem;
}





/* ----- escritorio ----- */

/* ----- movil ----- */
@media (max-width: 767px) {
.thread {
    max-height: calc(80vh - 6.4rem);
}
}






.comment-enc {
    display: grid
;
    gap: .5rem;
}



.thread-composer {
    display: flex
;
    gap: .5rem;
    align-items: center;
}
.thread-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.thread-avatar--sm {
    width: 25px;
    height: 25px;
}
.thread-composer-box { flex:1; }







.thread-actions {
    margin-top: .5rem;
    display: flex
;
    gap: .5rem;
    justify-content: flex-end;
}
.thread-btn {
    padding: 4px 10px;
    cursor: pointer;
    background: var(--primary-color);
    color: var(--color-background-1);
    font-weight: bold;
    font-size: .8rem;
}
@media (max-width: 767px) {
    .thread-btn {
        width: auto;
    }
}



.thread-btn--primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.thread-btn--success { background:var(--success); border-color:var(--success); color:#fff; }

.thread-comment-container {
    display: flex;
    gap: 1rem;
    padding-bottom: .5rem;
}

.thread-comment {
    display: flex;
}


.thread-comment-content {
    position: relative;
    background: var(--color-background-1);
    padding: 10px;
    border-radius: 0px 14px 14px 14px;
    margin-bottom: 10px;
  width: 100%;
}

/* La puntita del "globo de chat" */
/* Triángulo que apunta al avatar */
.thread-comment-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: -15px;
    width: 0;
    height: 0;
    border-top: 13px solid var(--color-background-1);
    border-left: 16px solid transparent;
}


.thread-left { display:flex; flex-direction:column; align-items:center; gap:.25rem; position:relative; }
.thread-body {
    width: 100%;
}


.thread-body-replies {
    background: var(--color-background-1);
    padding: 10px;
    border-radius: 0px 14px 14px 14px;
    width: 100%;
    position: relative;
}
.thread-body-replies::before {
    content: "";
    position: absolute;
    top: 0;
    left: -9px;
    width: 0;
    height: 0;
    border-top: 9px solid var(--color-background-1);
    border-left: 12px solid transparent;
}









.thread-header {
    display: flex
;
    gap: .5rem;
    font-size: .9rem;
    align-items: center;
}

.thread-author { font-weight:600; }
.thread-badge {
    font-size: .7rem;
    color: var(--color-text-7);
}
.profe {
}



.thread-text {
    margin-top: .25rem;
    color: var(--color-text-7);
        overflow: hidden;
}

.thread-footer {
    margin-top: .4rem;
    font-size: .8rem;
    display: flex
;
    gap: 1rem;
    color: var(--color-text-9);
    align-items: center;
}

.thread-time { font-size:.75rem; }
.reply-link {
    background: none;
    border: none;
    color: var(--color-text-9);
    cursor: pointer;
    padding: 0;
    display: flex
;
    align-items: center;
    gap: .2rem;
}

.reply-link:hover {
    color: var(--progress-color)
}


.thread-like-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-9);
    display: flex
;
    flex-direction: column;
    align-items: center;
    font-size: .85rem;
    display: flex
;
    flex-direction: row;
    gap: 5px;
}

.thread-like-btn:hover {
    color: var(--color-danger);
}

.thread-like-btn.is-active {
    color: var(--color-danger);
}




.thread-reply-form {
    padding-top: .7rem;
}
.thread-reply {
    display: flex
;
    gap: .5rem;
    width: 100%;
}

.thread-reply-wrapper {
    padding-bottom: 15px;
    display: flex
;
}



/*FILTRO*/
.thread-filters-container {
    display: flex
;
}
.thread-filters {
    display: flex
;
    align-items: center;
    gap: .375rem;
}

.btn-filter {
    background: transparent;
    color: var(--color-text-0);
    padding: 4px 10px;
    border: 1px solid var(--color-background-9);
    font-size: .75rem;
    width: auto;
}

.btn.is-active {
  background: var(--progress-color);
  font-weight: 600;
  color: var(--color-background-0);
  border: 1px solid var(--progress-color);
}



















.thread-reply-curva {
  position: relative;
}
.thread-reply-curva::after {
    content: "";
    position: absolute;
    top: -19px;
    left: -32px;
    width: 17px;
    height: 32px;
    display: flex
;
    border-bottom: 2.5px solid var(--color-background-4);
    border-left: 2.5px solid var(--color-background-4);
    border-radius: 0px 0px 0px 8px;
}




.thread-reply-line {
  position: relative;
}
.thread-reply-line::after {
    content: "";
    position: absolute;
    top: 0px;
    left: -32px;
    width: 2.5px;
    height: calc(100% - 0px);
    background: var(--color-background-4);
}
.thread-reply-wrapper:last-child .thread-reply-line {
  display: none;
}


.thread-comment-line {
  position: relative;
}

.thread-comment-line::after {
    content: "";
    position: absolute;
    top: 30px;
    left: -32px;
    width: 2.5px;
    height: calc(100% - 40px);
    background: var(--color-background-4);
}

.thread-see-more {
    position: relative;
    color: var(--color-text-3);
    font-weight: 700;
}

.thread-see-more:hover {
    color: var(--color-text-0);
}

.thread-see-more::after {
    content: "";
    position: absolute;
    top: -34px;
    left: -32px;
    width: 17px;
    height: 43px;
    display: flex
;
    border-bottom: 2.5px solid var(--color-background-4);
    border-left: 2.5px solid var(--color-background-4);
    border-radius: 0px 0px 0px 8px;
}




/*-------------------------------------------------------------
SCROLL AUTOMATICO - COMMENT NAV
---------------------------------------------------------------
*/
/* ----- escritorio ----- */
.comment-nav {
    overflow-y: scroll;
    max-height: calc(100vh - 9.5rem);
    height: 100%;
    margin-right: -10px;
    padding-right: .7rem;
    scrollbar-width: none;
    display: flex
;
    flex-direction: column;
    gap: .5rem;
}

/* ----- movil ----- */
@media (max-width: 767px) {
.comment-nav {
    max-height: calc(80vh - 6.4rem);
}
}


.comments-nav-header, .topic-item-header {
    align-items: center;
    height: 2.5rem;
    align-content: space-between;
}
@media (min-width: 768px) {
    .comments-nav-header {
        display: none;
    }
}



/*-------------------------------------------------------------
PRUEBA
---------------------------------------------------------------
*/


.thread-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.thread-input {
    width: 100%;
    background: var(--color-background-0);
    border: 1px solid var(--color-background-10);
    border-radius: 7px;
    padding: 9px 32px 7px 7px;
    resize: none;
    overflow: auto;
    min-height: 38px;
    max-height: 300px;
    color: var(--color-text-4);
}

.thread-input:focus {
    border: 1px solid var(--primary-color);
}
.thread-input:hover {
    border: 1px solid var(--primary-color);
}

.thread-input::placeholder {
  color: var(--mute);  /* gris suave */
  opacity: 1; /* asegura que no sea transparente */
  font-style: italic; /* opcional, da un look diferenciado */
}







.thread-send-btn {
    position: absolute;
    right: 7px;
    background: var(--color-background-7);
    cursor: pointer;
    color: var(--color-text-7);
    display: flex
;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.thread-send-btn:hover {
  color: var(--primary-color);
}

.send-icon {
  width: 20px;
  height: 20px;
}









/*-------------------------------------------------------------
oficial
---------------------------------------------------------------
*/


.read-more {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--primary-color);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}


/**MENSAJE DE ERROR*/
.thread-error {
    background: var(--color-danger-b);
    border: 1px solid var(--color-danger);
    padding: .4rem;
    border-radius: .4rem;
    margin-top: 9px;
    font-size: .8rem;
    text-align: center;
}

/**MENSAJE DE ERROR*/




