/* ==============================================================================
   KOKANISA.PT // SISTEMA DE COMENTÁRIOS DO BLOG
   Design System: Alto contraste, Dark Theme, Acentos Verde Lima (#32CD32)
   Arquitetura: Mobile-First Nativa
   ============================================================================== */

.kokanisa-comments-wrapper {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: rgba(26, 13, 40, 0.92);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
}

@media (max-width: 576px) {
    .kokanisa-comments-wrapper {
        padding: 1.25rem;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
}

/* Cabeçalho da Secção */
.k-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(147, 112, 219, 0.25);
    padding-bottom: 1rem;
    margin-bottom: 1.75rem;
}

.k-comments-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.k-comments-title i {
    color: #32CD32;
}

.k-comments-badge {
    background: rgba(50, 205, 50, 0.15);
    color: #32CD32;
    border: 1px solid rgba(50, 205, 50, 0.4);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* Formulário de Novo Comentário */
.k-comment-form-card {
    background: rgba(18, 7, 29, 0.85);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.k-comment-form-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.k-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .k-form-row {
        grid-template-columns: 1fr;
    }
}

.k-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.k-form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e4ddf2;
}

.k-form-control {
    background: rgba(26, 13, 40, 0.95);
    border: 1px solid rgba(147, 112, 219, 0.35);
    border-radius: 8px;
    color: #ffffff !important;
    padding: 0.7rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    outline: none;
    width: 100%;
}

.k-form-control:focus {
    border-color: #32CD32;
    box-shadow: 0 0 0 3px rgba(50, 205, 50, 0.25);
    background: rgba(38, 19, 58, 0.98);
}

.k-form-control::placeholder {
    color: rgba(228, 221, 242, 0.5);
}

textarea.k-form-control {
    min-height: 110px;
    resize: vertical;
}

.k-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.k-char-counter {
    font-size: 0.78rem;
    color: #e4ddf2;
    opacity: 0.75;
}

.k-btn-submit {
    background: #32CD32;
    color: #12071d;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    border: none;
    border-radius: 25px;
    padding: 0.65rem 1.6rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.35);
    transition: all 0.25s ease;
}

.k-btn-submit:hover:not(:disabled) {
    background: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 205, 50, 0.5);
    color: #ffffff;
}

.k-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alertas e Notificações */
.k-alert {
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.k-alert-success {
    background: rgba(50, 205, 50, 0.15);
    border: 1px solid rgba(50, 205, 50, 0.4);
    color: #eaffea;
}

.k-alert-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ffdce0;
}

/* Lista de Comentários */
.k-comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.k-comment-item {
    background: rgba(20, 9, 32, 0.85);
    border: 1px solid rgba(147, 112, 219, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    transition: border-color 0.2s ease;
}

.k-comment-item:hover {
    border-color: rgba(147, 112, 219, 0.45);
}

/* Destaque para Comentário do Autor (Hugo Sá) */
.k-comment-item.k-comment-author {
    background: linear-gradient(135deg, rgba(26, 13, 40, 0.95), rgba(30, 45, 30, 0.7));
    border: 1px solid rgba(50, 205, 50, 0.45);
    box-shadow: 0 4px 20px rgba(50, 205, 50, 0.1);
}

.k-comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.k-author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.k-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9370DB, #32CD32);
    color: #12071d;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    flex-shrink: 0;
}

.k-comment-item.k-comment-author .k-avatar {
    background: #32CD32;
    color: #12071d;
    box-shadow: 0 0 10px rgba(50, 205, 50, 0.5);
}

.k-author-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
}

.k-author-tag {
    background: #32CD32;
    color: #12071d;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.k-comment-date {
    font-size: 0.78rem;
    color: #e4ddf2;
    opacity: 0.7;
}

.k-comment-body {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #ffffff;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* Respostas Encadeadas (Replies) */
.k-replies-list {
    margin-top: 1rem;
    padding-left: 1.5rem;
    border-left: 2px solid rgba(50, 205, 50, 0.35);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 576px) {
    .k-replies-list {
        padding-left: 0.85rem;
    }
}

/* Estado Vazio (Sem comentários) */
.k-empty-comments {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #e4ddf2;
}

.k-empty-comments i {
    font-size: 2.5rem;
    color: rgba(147, 112, 219, 0.5);
    margin-bottom: 0.75rem;
    display: block;
}

.k-empty-comments p {
    margin: 0;
    font-size: 0.95rem;
}

/* Efeito de Carregamento (Skeleton) */
.k-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: k-skeleton-loading 1.5s infinite;
    border-radius: 6px;
    height: 18px;
    margin-bottom: 0.6rem;
}

@keyframes k-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Campo invisível anti-spam */
.k-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none !important;
}
