/* ========== ESTILOS PERSONALIZADOS BBPRESS ========== */

/* ========== BUSCADOR ========== */
#bbpress-forums #bbp-search-form,
.bbp-search-form {
    margin-bottom: 25px !important;
}

#bbpress-forums #bbp-search-form form,
#bbp-search-form form,
.bbp-search-form form {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #ccc !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
    width: 100% !important;
}

#bbp-search-form input[type="text"],
#bbp-search-form input[name="bbp_search"],
.bbp-search-form input[type="text"] {
    flex: 1 !important;
    border: none !important;
    padding: 12px 15px !important;
    font-size: 14px !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    height: auto !important;
}

#bbp-search-form input[type="submit"],
#bbp-search-form button,
.bbp-search-form input[type="submit"] {
    background: transparent !important;
    border: none !important;
    border-left: 1px solid #ccc !important;
    padding: 12px 18px !important;
    cursor: pointer !important;
    color: #666 !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

/* ========== RESET GENERAL ========== */
#bbpress-forums {
    background: #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#bbpress-forums ul.bbp-forums {
    border: none !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ========== HEADER (Foros | Temas | Mensajes | Actividad) ========== */
#bbpress-forums li.bbp-header {
    background: #4EAED9 !important;
    color: white !important;
    padding: 0 !important;
    border: none !important;
    margin: 0 !important;
}

#bbpress-forums li.bbp-header ul.forum-titles {
    display: grid !important;
    grid-template-columns: 1fr 100px 100px 200px !important;
    gap: 0 !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 12px 20px !important;
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#bbpress-forums li.bbp-header ul.forum-titles li,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-forum-info,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-forum-topic-count,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-forum-reply-count,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-forum-freshness,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-topic-title,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-topic-voice-count,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-topic-reply-count,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-topic-freshness {
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 13px !important;
    letter-spacing: 0.5px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    display: block !important;
    float: none !important;
    width: auto !important;
    color: inherit !important;
    background: none !important;
    text-align: center !important;
}

#bbpress-forums li.bbp-header ul.forum-titles li.bbp-forum-info,
#bbpress-forums li.bbp-header ul.forum-titles li.bbp-topic-title {
    text-align: left !important;
}

#bbpress-forums li.bbp-header ul.forum-titles li:before,
#bbpress-forums li.bbp-header ul.forum-titles li:after {
    display: none !important;
    content: none !important;
}

/* ========== BODY / FILAS ========== */
#bbpress-forums li.bbp-body {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#bbpress-forums li.bbp-body > ul {
    display: grid !important;
    grid-template-columns: 1fr 100px 100px 200px !important;
    gap: 0 !important;
    align-items: center !important;
    padding: 20px !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: 1px solid #e5e5e5 !important;
    list-style: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#bbpress-forums li.bbp-body > ul > li,
#bbpress-forums li.bbp-body ul li.bbp-forum-info,
#bbpress-forums li.bbp-body ul li.bbp-forum-topic-count,
#bbpress-forums li.bbp-body ul li.bbp-forum-reply-count,
#bbpress-forums li.bbp-body ul li.bbp-forum-freshness,
#bbpress-forums li.bbp-body ul li.bbp-topic-title,
#bbpress-forums li.bbp-body ul li.bbp-topic-voice-count,
#bbpress-forums li.bbp-body ul li.bbp-topic-reply-count,
#bbpress-forums li.bbp-body ul li.bbp-topic-freshness {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    display: block !important;
    float: none !important;
    width: auto !important;
}

#bbpress-forums li.bbp-body > ul > li:before,
#bbpress-forums li.bbp-body > ul > li:after {
    display: none !important;
    content: none !important;
}

/* ========== TÍTULO DEL FORO ========== */
#bbpress-forums .bbp-forum-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #4EAED9 !important;
    text-decoration: none !important;
    display: block !important;
    margin: 0 !important;
}

#bbpress-forums .bbp-forum-title:hover {
    color: #3a8eb5 !important;
}

/* Ocultar descripción */
#bbpress-forums .bbp-forum-content {
    display: none !important;
}

/* ========== CONTADORES ========== */
#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-forum-reply-count {
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

/* ========== ACTIVIDAD: avatar + nombre + tiempo ========== */
/* Layout: avatar a la izquierda, nombre+tiempo apilados a la derecha */
#bbpress-forums .bbp-forum-freshness {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

#bbpress-forums .bbp-forum-freshness .bbp-topic-meta {
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
}

#bbpress-forums .bbp-forum-freshness .bbp-topic-freshness-author {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    order: 1 !important;
}

/* Avatar */
#bbpress-forums .bbp-forum-freshness img.avatar {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    border: 2px solid #4EAED9 !important;
    flex-shrink: 0 !important;
}

#bbpress-forums .bbp-forum-freshness .bbp-author-avatar {
    display: inline-block !important;
    line-height: 0 !important;
    flex-shrink: 0 !important;
}

/* Nombre del autor */
#bbpress-forums .bbp-forum-freshness .bbp-author-name {
    color: #4EAED9 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    display: block !important;
}

#bbpress-forums .bbp-forum-freshness .bbp-author-name:hover {
    text-decoration: underline !important;
}

/* Tiempo de actividad: debajo del nombre */
#bbpress-forums .bbp-forum-freshness .erd-freshness-time {
    font-size: 12px !important;
    color: #888 !important;
    display: block !important;
}

/* ========== QUITAR SOLO EL MARCO DE RANGO EN BBPRESS (mantener avatar) ========== */
#bbpress-forums .erd-bbp-rank-frame-overlay {
    display: none !important;
}
/* Resetear el contenedor para que el avatar se muestre normal sin posicionamiento absoluto */
#bbpress-forums .erd-bbp-avatar-with-rank {
    width: 45px !important;
    height: 45px !important;
    position: relative !important;
}
#bbpress-forums .erd-bbp-avatar-with-rank img.avatar {
    position: static !important;
    transform: none !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    border: 2px solid #4EAED9 !important;
}

/* ========== BREADCRUMB ========== */
.bbp-breadcrumb {
    margin-bottom: 20px !important;
    padding: 12px 0 !important;
    background: transparent !important;
    border: none !important;
    font-size: 14px !important;
}

.bbp-breadcrumb a {
    color: #4EAED9 !important;
    text-decoration: none !important;
}

.bbp-breadcrumb a:hover {
    text-decoration: underline !important;
}

/* ========== EXTRACTO DEL PRIMER MENSAJE EN LISTADO DE TEMAS ========== */
.erd-topic-excerpt {
    margin: 6px 0 0 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #666 !important;
    font-weight: normal !important;
}

/* ========== BLOQUES DE AUTOR (inicio y actividad) ========== */
.erd-topic-author-block,
.erd-freshness-block {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.erd-topic-author-block .erd-author-avatar,
.erd-freshness-block .erd-author-avatar {
    flex-shrink: 0 !important;
}

.erd-topic-author-block .erd-author-avatar img,
.erd-freshness-block .erd-author-avatar img {
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
}

.erd-author-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
}

.erd-author-name,
.erd-author-name a {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #333 !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
}

.bbp-topic-started-date,
.erd-freshness-time,
.erd-freshness-time a {
    display: block !important;
    font-size: 12px !important;
    color: #999 !important;
    font-weight: normal !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
}

/* ========== FOOTER ========== */
#bbpress-forums li.bbp-footer {
    display: none !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    #bbpress-forums li.bbp-header ul.forum-titles,
    #bbpress-forums li.bbp-body > ul {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    #bbpress-forums .bbp-forum-topic-count,
    #bbpress-forums .bbp-forum-reply-count {
        text-align: left !important;
    }
    
    #bbpress-forums .bbp-forum-topic-count::before {
        content: "Temas: " !important;
        font-weight: normal !important;
    }
    
    #bbpress-forums .bbp-forum-reply-count::before {
        content: "Mensajes: " !important;
        font-weight: normal !important;
    }
}
