
/* TOONLOKA COMMUNITY UI */

.cm-community {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
    color: #171717;
}

.cm-heading {
    font-size: 23px;
    letter-spacing: -.5px;
    margin: 0 0 20px;
}

.cm-muted {
    font-size: 12px;
    line-height: 1.7;
    color: #777;
}

.cm-rating-summary {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 25px;
    padding: 25px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.cm-rating-score {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.cm-rating-score strong {
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
}

.cm-rating-score small {
    font-size: 13px;
    color: #777;
}

.cm-summary-stars {
    color: #e5a000;
    font-size: 20px;
    letter-spacing: 2px;
}

.cm-distribution {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cm-distribution-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 35px;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.cm-track {
    background: #edf0ee;
    height: 7px;
    border-radius: 20px;
    overflow: hidden;
}

.cm-fill {
    height: 100%;
    background: #00c853;
    transition: width .2s;
}

.cm-rate-box {
    padding: 25px 15px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.cm-rate-box h3 {
    font-size: 16px;
    margin: 0 0 15px;
}

.cm-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.cm-star {
    background: none;
    border: 0;
    color: #bbb;
    font-size: 34px;
    padding: 3px;
    cursor: pointer;
    transition: color .15s;
}

.cm-star.active {
    color: #e5a000;
}

.cm-star:disabled {
    cursor: wait;
    opacity: .65;
}

.cm-feedback {
    min-height: 18px;
    font-size: 12px;
    color: #008e42;
    margin-top: 12px;
}

.cm-feedback.error {
    color: #c62828;
}

.cm-comments {
    padding-top: 30px;
}

.cm-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.cm-comments-header h3 {
    font-size: 20px;
    margin: 0;
}

.cm-comment-form {
    margin-bottom: 25px;
}

.cm-textarea {
    display: block;
    width: 100%;
    min-height: 110px;
    resize: vertical;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font: inherit;
    font-size: 13px;
    line-height: 1.7;
    background: #fff;
}

.cm-textarea:focus {
    border-color: #00c853;
    outline: 2px solid rgba(0,200,83,.1);
}

.cm-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.cm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 0;
    border-radius: 6px;
    background: #00c853;
    color: #111;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.cm-button:hover {
    background: #00b64b;
}

.cm-button:disabled {
    opacity: .5;
    cursor: wait;
}

.cm-login-notice {
    padding: 22px;
    text-align: center;
    border-radius: 8px;
    background: #f5f8f6;
    border: 1px solid #e1e9e3;
    margin-bottom: 22px;
    font-size: 13px;
    line-height: 1.8;
}

.cm-login-notice a {
    color: #008e42;
    font-weight: 700;
    text-decoration: none;
}

.cm-comment {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.cm-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #e7f9ee;
    flex-shrink: 0;
}

.cm-comment-body {
    flex: 1;
    min-width: 0;
}

.cm-comment-name {
    font-size: 13px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.cm-comment-date {
    font-size: 10px;
    color: #999;
    margin-top: 5px;
}

.cm-comment-text {
    font-size: 13px;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 12px 0;
}

.cm-comment-actions {
    display: flex;
    gap: 15px;
}

.cm-text-button {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 11px;
    color: #888;
    cursor: pointer;
}

.cm-text-button:hover {
    color: #008e42;
}

.cm-delete {
    color: #c62828;
}

.cm-empty {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 13px;
    border: 1px dashed #ddd;
    border-radius: 8px;
}

.cm-empty[hidden] {
    display: none;
}

.cm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.cm-page {
    padding: 9px 13px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #555;
    text-decoration: none;
    font-size: 12px;
}

.cm-page.active {
    background: #00c853;
    border-color: #00c853;
    color: #111;
    font-weight: 700;
}

@media (max-width: 600px) {

    .cm-rating-summary {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px;
    }

    .cm-rating-score strong {
        font-size: 34px;
    }

    .cm-star {
        font-size: 29px;
    }

    .cm-heading {
        font-size: 20px;
    }

    .cm-avatar {
        width: 35px;
        height: 35px;
    }
}

/* =========================================
   TOONLOKA BLACK EMERALD V6
   RATING & COMMUNITY
========================================= */

.cm-community {
    color: #f5f7f6;
    border-top: 1px solid #20382a;
    margin-top: 40px;
    padding-top: 30px;
}

/* SECTION HEADING */

.cm-heading,
.cm-comments-header h3 {
    color: #f5f7f6;
    border-left: 4px solid #00c853;
    padding-left: 12px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.cm-muted {
    color: #96a89e;
}

/* RATING SUMMARY */

.cm-rating-summary {
    background: linear-gradient(
        135deg,
        #11251b,
        #0d1914
    );
    border: 1px solid #294638;
    border-radius: 12px;
    padding: 28px;
}

.cm-rating-score strong {
    color: #f5f7f6;
    font-size: 42px;
}

.cm-rating-score small {
    color: #a0b6a8;
}

.cm-summary-stars {
    color: #00df68;
}

.cm-distribution-row {
    color: #c1d1c7;
}

.cm-track {
    background: #294638;
    height: 8px;
}

.cm-fill {
    background: linear-gradient(
        90deg,
        #009e46,
        #00df68
    );
    border-radius: 20px;
}

/* RATING INTERACTION */

.cm-rate-box {
    background: #0d1914;
    border: 1px solid #294638;
    border-radius: 10px;
    margin-top: 14px;
    padding: 25px 20px;
}

.cm-rate-box h3 {
    color: #f5f7f6;
    font-weight: 700;
}

.cm-stars {
    gap: 10px;
}

.cm-star {
    color: #52705e;
    background: transparent;
    font-size: 36px;
    transition:
        color .2s ease,
        transform .2s ease;
}

.cm-star.active,
.cm-star:hover {
    color: #00df68;
}

.cm-star:hover {
    transform: translateY(-3px);
}

.cm-star:focus-visible {
    outline: 2px solid #00c853;
    outline-offset: 4px;
    border-radius: 5px;
}

.cm-feedback {
    color: #65e89b;
}

.cm-feedback.error {
    color: #ff8585;
}

/* COMMENTS */

.cm-comments {
    padding-top: 40px;
}

.cm-comments-header {
    margin-bottom: 22px;
}

.cm-comment-form {
    background: #0d1914;
    border: 1px solid #294638;
    padding: 20px;
    border-radius: 10px;
}

.cm-textarea {
    background: #11251b;
    color: #f5f7f6;
    border: 1px solid #345240;
    border-radius: 8px;
    min-height: 130px;
}

.cm-textarea::placeholder {
    color: #8fa99a;
}

.cm-textarea:focus {
    border-color: #00c853;
    outline: 2px solid rgba(0,200,83,.15);
}

.cm-form-footer {
    margin-top: 15px;
    flex-wrap: wrap;
}

/* COMMUNITY BUTTON */

.cm-button {
    background: #00c853;
    color: #07150c;
    border-radius: 7px;
    font-weight: 800;
    transition: background .2s ease;
}

.cm-button:hover {
    background: #32e87b;
}

.cm-button:disabled {
    opacity: .55;
}

/* LOGIN NOTICE */

.cm-login-notice {
    background: #11251b;
    border: 1px solid #294638;
    color: #b9ccbf;
    border-radius: 10px;
    padding: 24px;
}

.cm-login-notice a {
    color: #43e586;
}

.cm-login-notice a:hover {
    color: #82f5b3;
    text-decoration: underline;
}

/* COMMENT CARD */

.cm-comment {
    background: #0d1914;
    border: 1px solid #20382a;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 12px;
    transition: border-color .2s ease;
}

.cm-comment:hover {
    border-color: #345240;
}

.cm-avatar {
    background: #173927;
    border: 1px solid #345240;
    box-sizing: border-box;
}

.cm-comment-name {
    color: #e5f2ea;
    font-weight: 700;
}

.cm-comment-date {
    color: #96a89e;
}

.cm-comment-text {
    color: #c1d1c7;
    line-height: 1.85;
}

.cm-text-button {
    color: #96a89e;
}

.cm-text-button:hover {
    color: #43e586;
}

.cm-delete {
    color: #ff8585;
}

.cm-delete:hover {
    color: #ffaaaa;
}

/* EMPTY STATE */

.cm-empty {
    background: #0d1914;
    color: #96a89e;
    border: 1px dashed #345240;
    border-radius: 10px;
    padding: 35px 20px;
}

.cm-empty[hidden] {
    display: none !important;
}

/* PAGINATION */

.cm-page {
    background: #11251b;
    color: #c1d1c7;
    border: 1px solid #294638;
    border-radius: 6px;
}

.cm-page:hover {
    background: #203d2d;
    border-color: #00c853;
    color: #43e586;
}

.cm-page.active {
    background: #00c853;
    border-color: #00c853;
    color: #07150c;
}

/* MOBILE */

@media (max-width: 600px) {

    .cm-community {
        margin-top: 25px;
        padding-top: 25px;
    }

    .cm-rating-summary {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .cm-rating-score strong {
        font-size: 36px;
    }

    .cm-star {
        font-size: 30px;
    }

    .cm-heading {
        font-size: 20px;
    }

    .cm-comment-form {
        padding: 14px;
    }

    .cm-comment {
        padding: 14px;
        gap: 10px;
    }

    .cm-textarea {
        font-size: 13px;
    }

    .cm-comments {
        padding-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .cm-star,
    .cm-fill,
    .cm-button,
    .cm-comment {
        transition: none;
    }

    .cm-star:hover {
        transform: none;
    }
}
