/* ============================================================
   PRISM COMMENTS
   ============================================================ */

.prism-comments {
    margin-top: 40px;
    padding: 28px;
    border: 1px solid rgba(15, 76, 58, 0.12);
    border-radius: 18px;
    background: #ffffff;
}

.prism-comments-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(15, 76, 58, 0.10);
}

.prism-comments-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #082D24;
}

.prism-comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    background: #0F4C3A;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}


/* ============================================================
   COMMENTS LIST
   ============================================================ */

.prism-comments-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.prism-comment {
    padding: 20px;
    border: 1px solid rgba(15, 76, 58, 0.10);
    border-radius: 14px;
    background: #F8F6F1;
}

.prism-comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.prism-comment-author {
    color: #082D24;
    font-size: 15px;
    font-weight: 700;
}

.prism-comment-date {
    color: #777;
    font-size: 12px;
    white-space: nowrap;
}

.prism-comment-body {
    color: #333;
    font-size: 14px;
    line-height: 2;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.prism-comment-reply-button {
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0F4C3A;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.prism-comment-reply-button:hover {
    color: #D4AF37;
}


/* ============================================================
   REPLIES
   ============================================================ */

.prism-comment-replies {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
    margin-right: 28px;
    padding-right: 18px;
    border-right: 2px solid rgba(15, 76, 58, 0.12);
}

.prism-comment-reply {
    background: #ffffff;
    border-radius: 12px;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.prism-comments-empty {
    padding: 24px;
    border: 1px dashed rgba(15, 76, 58, 0.18);
    border-radius: 14px;
    background: #F8F6F1;
    color: #777;
    text-align: center;
    font-size: 14px;
}


/* ============================================================
   SUCCESS MESSAGE
   ============================================================ */

.prism-comments-message {
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.8;
}

.prism-comments-message-success {
    border: 1px solid rgba(15, 76, 58, 0.15);
    background: rgba(15, 76, 58, 0.06);
    color: #0F4C3A;
}


/* ============================================================
   COMMENT FORM
   ============================================================ */

.prism-comments-form-wrapper {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid rgba(15, 76, 58, 0.10);
}

.prism-comments-form-title {
    margin: 0 0 20px;
    color: #082D24;
    font-size: 18px;
    font-weight: 700;
}

.prism-comments-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.prism-comment-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.prism-comment-field label {
    color: #082D24;
    font-size: 14px;
    font-weight: 600;
}

.prism-comment-field textarea {
    width: 100%;
    min-height: 150px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 76, 58, 0.15);
    border-radius: 12px;
    outline: none;
    resize: vertical;
    background: #ffffff;
    color: #333;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.9;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.prism-comment-field textarea:focus {
    border-color: #0F4C3A;
    box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.08);
}

.prism-comment-field textarea::placeholder {
    color: #999;
}


/* ============================================================
   REPLY MODE
   ============================================================ */

.prism-comment-replying {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.10);
    color: #6f5a13;
    font-size: 13px;
}

.prism-comment-replying button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #0F4C3A;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.prism-comment-replying button:hover {
    color: #D4AF37;
}


/* ============================================================
   FORM ERROR
   ============================================================ */

.prism-comment-error {
    margin-top: 5px;
    color: #b42318;
    font-size: 12px;
}


/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

.prism-comments-submit {
    align-self: flex-start;
    min-width: 150px;
    padding: 11px 22px;
    border: 0;
    border-radius: 10px;
    background: #0F4C3A;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.prism-comments-submit:hover {
    background: #082D24;
    transform: translateY(-1px);
}




/* ============================================================
   COMMENT ACTIONS
   ============================================================ */

.prism-comments-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prism-comments-guide-button {
    min-width: 150px;
    padding: 10px 20px;
    border: 1px solid #C9A52E;
    border-radius: 10px;
    background: #D4AF37;
    color: #082D24;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.prism-comments-guide-button:hover {
    background: #E8C76A;
    border-color: #D4AF37;
    color: #082D24;
    box-shadow: 0 5px 14px rgba(212, 175, 55, 0.22);
    transform: translateY(-1px);
}


/* ============================================================
   COMMENT GUIDE MODAL
   ============================================================ */

.prism-comments-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.prism-comments-guide-modal[hidden] {
    display: none;
}

.prism-comments-guide-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 45, 36, 0.48);
    backdrop-filter: blur(4px);
}

.prism-comments-guide-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(680px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid rgba(15, 76, 58, 0.12);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(8, 45, 36, 0.20);
}

.prism-comments-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(15, 76, 58, 0.10);
}

.prism-comments-guide-header h3 {
    margin: 0;
    color: #082D24;
    font-size: 18px;
    font-weight: 700;
}

.prism-comments-guide-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: #F8F6F1;
    color: #0F4C3A;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 24px;
    line-height: 1;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.prism-comments-guide-close:hover {
    background: #0F4C3A;
    color: #ffffff;
}

.prism-comments-guide-content {
    padding: 20px;
}

.prism-comments-guide-content p {
    margin: 0 0 16px;
    color: #555;
    font-size: 14px;
    line-height: 1.9;
}

.prism-comments-guide-content ol {
    margin: 0;
    padding-right: 22px;
    color: #333;
}

.prism-comments-guide-content li {
    margin-bottom: 11px;
    padding-right: 4px;
    font-size: 14px;
    line-height: 1.9;
}

.prism-comments-guide-content li:last-child {
    margin-bottom: 0;
}

body.comment-guide-open {
    overflow: hidden;
}

/* ============================================================
   LOGIN MESSAGE
   ============================================================ */

.prism-comments-login {
    margin-top: 30px;
    padding: 18px;
    border-radius: 12px;
    background: #F8F6F1;
    color: #666;
    text-align: center;
    font-size: 14px;
}

.prism-comments-login a {
    margin-right: 6px;
    color: #0F4C3A;
    font-weight: 700;
    text-decoration: none;
}

.prism-comments-login a:hover {
    color: #D4AF37;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {

    .prism-comments {
        margin-top: 28px;
        padding: 20px 16px;
        border-radius: 14px;
    }

    .prism-comments-title {
        font-size: 19px;
    }

    .prism-comment {
        padding: 16px;
    }

    .prism-comment-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .prism-comment-date {
        font-size: 11px;
    }

    .prism-comment-replies {
        margin-right: 10px;
        padding-right: 12px;
    }

    .prism-comments-submit {
        width: 100%;
    }

    .prism-comment-replying {
        align-items: flex-start;
        flex-direction: column;
    }

}