/**
 * Estilos para Comentarios
 * 
 * Diseño elegante y moderno para el sistema de comentarios de WordPress
 * 
 * @package NUBEDevelopment
 */

/* ========================================
   CONTENEDOR PRINCIPAL DE COMENTARIOS
   ======================================== */
#comments {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    margin-top: 50px;
    border: 1px solid #e1e8ed;
}

.comments-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e8ed;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comments-title::before {
    content: '\f4ad';
    font-family: 'bootstrap-icons';
    font-size: 24px;
    color: #667eea;
}

/* ========================================
   LISTA DE COMENTARIOS
   ======================================== */
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comment-list .comment {
    position: relative;
    padding: 0;
    margin-bottom: 30px;
}

/* Línea de jerarquía para respuestas */
.comment-list .children {
    list-style: none;
    margin: 20px 0 0 40px;
    padding-left: 30px;
    border-left: 3px solid #f5f7fa;
}

/* ========================================
   ARTÍCULO DEL COMENTARIO
   ======================================== */
.comment-body {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.comment-body:hover {
    background: #eef1f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* ========================================
   INFORMACIÓN DEL AUTOR
   ======================================== */
.comment-author {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.comment-author .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #667eea;
    flex-shrink: 0;
}

.comment-author-info {
    flex: 1;
}

.comment-author .fn {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    font-style: normal;
    display: block;
    margin-bottom: 4px;
}

.comment-author .fn a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-author .fn a:hover {
    color: #667eea;
}

/* Badge de autor del post */
.bypostauthor .comment-author .fn::after {
    content: 'Autor';
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.says {
    display: none;
}

/* ========================================
   METADATA DEL COMENTARIO
   ======================================== */
.comment-metadata {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #7f8c8d;
}

.comment-metadata a {
    color: #7f8c8d;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

.comment-metadata a:hover {
    color: #667eea;
}

.comment-metadata time::before {
    content: '\f1ec';
    font-family: 'bootstrap-icons';
    margin-right: 4px;
}

/* Enlace de editar */
.comment-metadata .edit-link {
    margin-left: auto;
}

.comment-metadata .edit-link a::before {
    content: '\f4cb';
    font-family: 'bootstrap-icons';
    margin-right: 4px;
}

/* ========================================
   CONTENIDO DEL COMENTARIO
   ======================================== */
.comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 16px;
}

.comment-content p {
    margin-bottom: 12px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-content a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.comment-content a:hover {
    color: #764ba2;
}

/* ========================================
   COMENTARIO EN MODERACIÓN
   ======================================== */
.comment-awaiting-moderation {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid #ffeaa7;
}

.comment-awaiting-moderation::before {
    content: '\f33a';
    font-family: 'bootstrap-icons';
    margin-right: 6px;
}

/* ========================================
   BOTÓN DE RESPONDER
   ======================================== */
.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #667eea;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border: 2px solid #667eea;
    transition: all 0.3s ease;
}

.comment-reply-link::before {
    content: '\f4b5';
    font-family: 'bootstrap-icons';
}

.comment-reply-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ========================================
   FORMULARIO DE COMENTARIOS
   ======================================== */
#respond {
    background: #f5f7fa;
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
}

.comment-reply-title {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-reply-title::before {
    content: '\f4a4';
    font-family: 'bootstrap-icons';
    color: #667eea;
    margin-right: 10px;
}

/* Botón de cancelar respuesta */
#cancel-comment-reply-link {
    font-size: 13px;
    font-weight: 600;
    color: #e74c3c;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#cancel-comment-reply-link:hover {
    background: #e74c3c;
    color: white;
}

/* ========================================
   CAMPOS DEL FORMULARIO
   ======================================== */
.comment-form-comment,
.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.required {
    color: #e74c3c;
    margin-left: 2px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 15px;
    color: #2c3e50;
    background: white;
    transition: all 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
   CHECKBOXES Y COOKIES
   ======================================== */
.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.comment-form-cookies-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #667eea;
}

.comment-form-cookies-consent label {
    font-size: 14px;
    font-weight: 400;
    color: #5a6c7d;
    margin-bottom: 0;
    cursor: pointer;
    line-height: 1.5;
}

/* ========================================
   BOTÓN DE ENVIAR
   ======================================== */
.form-submit {
    margin-bottom: 0;
}

.submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.submit::after {
    content: '\f138';
    font-family: 'bootstrap-icons';
    transition: transform 0.3s ease;
}

.submit:hover::after {
    transform: translateX(4px);
}

/* ========================================
   NOTAS DEL FORMULARIO
   ======================================== */
.comment-notes,
.form-allowed-tags {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
}

.comment-notes::before {
    content: '\f431';
    font-family: 'bootstrap-icons';
    color: #667eea;
    margin-right: 6px;
}

/* ========================================
   PAGINACIÓN DE COMENTARIOS
   ======================================== */
.comment-navigation {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid #e1e8ed;
}

.comment-navigation .nav-previous,
.comment-navigation .nav-next {
    flex: 1;
}

.comment-navigation a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    background: #f5f7fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.comment-navigation a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.comment-navigation .nav-previous a::before {
    content: '\f12f';
    font-family: 'bootstrap-icons';
}

.comment-navigation .nav-next {
    text-align: right;
}

.comment-navigation .nav-next a::after {
    content: '\f138';
    font-family: 'bootstrap-icons';
}

/* ========================================
   MENSAJE DE NO COMENTARIOS
   ======================================== */
.no-comments {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-size: 16px;
    background: #f5f7fa;
    border-radius: 12px;
}

.no-comments::before {
    content: '\f4ad';
    font-family: 'bootstrap-icons';
    font-size: 48px;
    color: #cbd5e0;
    display: block;
    margin-bottom: 16px;
}

/* ========================================
   COMENTARIOS CERRADOS
   ======================================== */
.comments-closed {
    text-align: center;
    padding: 40px 20px;
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 12px;
    color: #856404;
    font-size: 15px;
    font-weight: 600;
}

.comments-closed::before {
    content: '\f3e4';
    font-family: 'bootstrap-icons';
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    #comments {
        padding: 30px;
    }
    
    .comments-title {
        font-size: 24px;
    }
    
    #respond {
        padding: 24px;
    }
}

@media (max-width: 767px) {
    #comments {
        padding: 24px;
    }
    
    .comments-title {
        font-size: 22px;
    }
    
    .comment-list .children {
        margin-left: 20px;
        padding-left: 15px;
    }
    
    .comment-body {
        padding: 20px;
    }
    
    .comment-author .avatar {
        width: 40px;
        height: 40px;
    }
    
    #respond {
        padding: 20px;
    }
    
    .comment-reply-title {
        font-size: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 576px) {
    #comments {
        padding: 20px;
        border-radius: 12px;
    }
    
    .comment-list .children {
        margin-left: 10px;
        padding-left: 10px;
    }
    
    .comment-author {
        gap: 12px;
    }
    
    .comment-metadata {
        flex-wrap: wrap;
    }
    
    .submit {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .comment-body,
    .comment-reply-link,
    .submit,
    .comment-navigation a,
    .comment-form input,
    .comment-form textarea {
        transition: none;
    }
    
    .comment-body:hover,
    .comment-reply-link:hover,
    .submit:hover,
    .comment-navigation a:hover {
        transform: none;
    }
}

/* ========================================
   ESTADO DE CARGA
   ======================================== */
.form-submit .submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.form-submit .submit:disabled:hover {
    box-shadow: none;
}