﻿/* Contenedor principal */
/* Solo en Mensajes: la entrevista usa .ri-msg con el ícono al lado (styles.css). */
.ri-msgs .ri-msg {
    max-width: 75%;
    align-items: flex-start;
}

.ri-msgs .ri-msg--me {
    align-items: flex-end;
}

.ri-msg__bubble {
    max-width: 100%;
}

.ri-msgs {
    --msgs-h: min(72vh, 640px);
    display: grid;
    grid-template-columns: 340px 1fr;
    height: var(--msgs-h);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    overflow: hidden;
}

/* ---------- Columna izquierda ---------- */
.ri-convos {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid var(--line);
}

.ri-convos__search {
    padding: 1rem;
    flex: 0 0 auto;
}

.ri-convos__list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.ri-convos__none {
    padding: 1.5rem 1rem;
    text-align: center;
}

.ri-convo {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    width: 100%;
    padding: .85rem 1rem;
    border: 0;
    border-left: 3px solid transparent;
    border-bottom: 1px solid var(--line-soft);
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: background .15s ease;
}

    .ri-convo:hover {
        background: var(--canvas);
    }

    .ri-convo.is-active {
        background: var(--brand-50);
        border-left-color: var(--brand-600);
    }

.ri-convo__avatar {
    margin-top: 2px;
}

.ri-convo__body {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    flex: 1;
    min-width: 0;
}

.ri-convo__top {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.ri-convo__name {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ri-convo__time {
    margin-left: auto;
    flex: 0 0 auto;
    font-size: .72rem;
    color: var(--faint);
}

.ri-convo__job {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    color: var(--brand-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ri-convo__foot {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.ri-convo__last {
    font-size: .8rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.ri-convo__badge {
    flex: 0 0 auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--r-pill);
    background: var(--brand-600);
    color: #fff;
    font-family: var(--font-data);
    font-size: .66rem;
    font-weight: 600;
    display: grid;
    place-items: center;
}

/* ---------- Columna derecha ---------- */
.ri-thread {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--surface);
}

.ri-thread--empty {
    display: grid;
    place-items: center;
}

.ri-thread__head {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem 1.15rem;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}

.ri-thread__back {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: .25rem;
    cursor: pointer;
    flex: 0 0 auto;
}

.ri-thread__id {
    flex: 1;
    min-width: 0;
}

.ri-thread__name {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink);
}

.ri-thread__job {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
}

.ri-thread__acts {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex: 0 0 auto;
    color: var(--muted);
}

/* Cinta con la vacante */
.ri-thread__strip {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .75rem 1.15rem;
    background: var(--brand-50);
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}

.ri-thread__strip-ico {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--brand-600);
}

.ri-thread__strip-body {
    flex: 1;
    min-width: 0;
}

.ri-thread__strip-title {
    font-size: .82rem;
    color: var(--ink-2);
}

    .ri-thread__strip-title strong {
        color: var(--ink);
        font-weight: 600;
    }

.ri-thread__strip-meta {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
    font-size: .75rem;
    margin-top: .1rem;
}

.ri-thread__strip-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
    margin-inline: .25rem;
}

.ri-thread__strip-link {
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Separador de día dentro del log */
.ri-chat__day {
    align-self: center;
    margin: .25rem 0;
}

    .ri-chat__day span {
        font-size: .7rem;
        color: var(--muted);
        background: var(--line-soft);
        padding: .2rem .7rem;
        border-radius: var(--r-pill);
    }

 
/* Hora bajo la burbuja */
.ri-msgs .ri-msg {
    flex-direction: column;
    gap: .2rem;
}

.ri-msg__time {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .7rem;
    color: var(--faint);
}

.ri-msg--me .ri-msg__time {
    justify-content: flex-end;
}

/* Compositor */
.ri-thread__clip {
    flex: 0 0 auto;
    border-color: transparent;
}

.ri-thread__input {
    border-radius: var(--r-pill);
    resize: none;
    max-height: 120px;
}

.ri-thread__send {
    flex: 0 0 auto;
    border-radius: 50%;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .ri-msgs {
        grid-template-columns: 1fr;
    }

        .ri-msgs .ri-thread {
            display: none;
        }

        .ri-msgs.is-open .ri-convos {
            display: none;
        }

        .ri-msgs.is-open .ri-thread {
            display: flex;
        }

    .ri-convos {
        border-right: 0;
    }
}

.ri-msg__bubble {
    word-break: break-word;
    overflow-wrap: break-word;
}