/* Star Rating */
.ccp-star-rating {
    text-align: center;
}

.ccp-star-rating-title {
    display: block;
    font-size: 0.9rem;
    color: #6b6b83;
    margin-bottom: 6px;
}

.ccp-star-rating-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.ccp-star-rating .ccp-average-rating {
    font-size: 1.1rem;
    font-weight: 700;
    color: #303030;
}

.ccp-star-rating .ccp-star-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.ccp-star-rating .ccp-star-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.ccp-star-rating .ccp-rating-count {
    font-size: 0.9rem;
    color: #6b6b83;
}

/* Single Star Rating (loop) */
.ccp-single-star-rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
}

.ccp-single-star-rating .ccp-single-star-rating-title {
    font-size: 0.9rem;
    color: #6b6b83;
}

.ccp-single-star-rating .ccp-star-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
}

.ccp-single-star-rating .ccp-single-average-rating {
    font-size: 1rem;
    font-weight: 700;
    color: #303030;
}

/* Post Star Rating */
.ccp-post-star-rating {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 1rem 0;
}

.ccp-post-star-rating .ccp-post-star-rating-label {
    color: #6b6b83;
    font-size: .9rem;
}

.ccp-post-star-rating .ccp-star-wrap {
    display: inline-flex;
    direction: ltr;
    gap: 4px;
    margin-right: 10px;
}

.ccp-post-star-rating .ccp-star-wrap > input {
    display: none;
}

.ccp-post-star-rating .ccp-star-wrap > label {
    position: relative;
    display: inline-flex;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.ccp-post-star-rating .ccp-star-wrap > label .ccp-star-icon {
    position: absolute;
    inset: 0;
    width: 24px;
    height: 24px;
}

/* Second icon (filled) is hidden by default; empty icon shows. */
.ccp-post-star-rating .ccp-star-wrap > label .ccp-star-icon:last-child {
    opacity: 0;
}

/* Checked star + all following in DOM (lower values) become filled. */
.ccp-post-star-rating .ccp-star-wrap > input:checked ~ label .ccp-star-icon:last-child,
.ccp-post-star-rating .ccp-star-wrap > label:hover .ccp-star-icon:last-child,
.ccp-post-star-rating .ccp-star-wrap > label:hover ~ label .ccp-star-icon:last-child {
    opacity: 1;
}

.ccp-post-star-rating .ccp-star-wrap > input:checked ~ label .ccp-star-icon:first-child,
.ccp-post-star-rating .ccp-star-wrap > label:hover .ccp-star-icon:first-child,
.ccp-post-star-rating .ccp-star-wrap > label:hover ~ label .ccp-star-icon:first-child {
    opacity: 0;
}

/* On hover anywhere in the wrap, reset checked state so only hovered range shows. */
.ccp-post-star-rating .ccp-star-wrap:hover > input:checked ~ label .ccp-star-icon:last-child {
    opacity: 0;
}

.ccp-post-star-rating .ccp-star-wrap:hover > input:checked ~ label .ccp-star-icon:first-child {
    opacity: 1;
}

.ccp-post-star-rating .ccp-star-wrap:hover > label:hover .ccp-star-icon:last-child,
.ccp-post-star-rating .ccp-star-wrap:hover > label:hover ~ label .ccp-star-icon:last-child {
    opacity: 1;
}

.ccp-post-star-rating .ccp-star-wrap:hover > label:hover .ccp-star-icon:first-child,
.ccp-post-star-rating .ccp-star-wrap:hover > label:hover ~ label .ccp-star-icon:first-child {
    opacity: 0;
}

/* Comment Message */
.ccp-comment-message {
    width: 100%;
    padding: .75rem;
    border-radius: 5px;
    text-align: center;
    margin: 1rem 0;
}

.ccp-comment-message.cpp-error {
    background-color: #f8d7da;
    color: #842029;
}

.ccp-comment-message.cpp-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

/* Comment Form */
#comments #commentform {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #ececf2;
    box-shadow: 0 2px 10px rgba(20, 20, 43, 0.04);
}

#comments #commentform > * {
    flex: 1 1 100%;
}

.ccp-comment-form-title {
    order: -2;
    font-size: 1.1rem;
    font-weight: 700;
    color: #303030;
}

#comments #commentform .ccp-comment-message {
    order: -1;
}

#comments #commentform .ccp-post-star-rating {
    order: 0;
}

#comments #commentform .comment-form-comment {
    order: 1;
}

#comments #commentform .comment-form-email,
#comments #commentform .comment-form-author {
    order: 2;
    flex: 1 1 200px;
}

#comments #commentform .comment-notes,
#comments #commentform .comment-form-cookies-consent {
    order: 3;
}

#comments #commentform .form-submit {
    order: 4;
}

#comments #commentform textarea,
#comments #commentform input[type=text],
#comments #commentform input[type=email],
#comments #commentform input[type=url] {
    width: 100%;
    background-color: #f7f7fa;
    border: 1px solid #ececf2;
    border-radius: 8px;
    padding: .75rem;
    margin-top: .5rem;
}

#comments #commentform label {
    color: #6b6b83;
    font-size: .9rem;
}

#comments #commentform .form-submit input[type=submit] {
    background-color: #6c5ce7;
    border-color: #6c5ce7;
    border-radius: 8px;
    color: #fff;
    padding: .6rem 1.5rem;
}

#comments #commentform .form-submit input[type=submit]:disabled {
    background-color: #bbb !important;
    border-color: #bbb !important;
    color: #fff !important;
}

.comment-form textarea:disabled,
.comment-form input:disabled {
    background-color: rgba(239, 239, 239, 0.3) !important;
    border-color: rgba(118, 118, 118, 0.3) !important;
}

/* Comment List */
.comment-list li.comment {
    background-color: #f7f7fa;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.comment-list .comments-number {
    display: inline-block;
    font-size: 1rem;
    font-weight: bold;
    margin-right: 5px;
}

.comment-list .comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-list .comment-meta .comment-author {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
}

.comment-list .comment-meta .comment-author .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.comment-list .comment-meta .comment-author b {
    font-size: .95rem;
    color: #303030;
}

.comment-list .comment-meta .comment-author .says {
    display: none;
}

.comment-list .comment-metadata {
    font-size: .85rem;
    color: #6b6b83;
}

.comment-list .ccp-custom-comment-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin: .75rem 0;
}

.comment-list .ccp-custom-comment-meta .ccp-star-wrap {
    font-size: 1rem;
}

.comment-list .ccp-rate-badge {
    display: inline-block;
    background-color: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    font-size: 12px;
    color: #6b6b83;
    padding: 3px 8px;
}

.comment-list .ccp-post-star-rating,
.comment-list .ccp-comment-message,
.comment-list .ccp-comment-form-title {
    display: none !important;
}

.comment-list .comment-content {
    flex-direction: column !important;
    align-items: flex-start !important;
    font-size: 1rem;
}

.comment-list .cpp-comment-footer {
    display: flex;
    margin-top: 1rem;
}

#comments .comment-list .comment-body .reply {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    margin-right: 1rem;
}

#comments .comment-list .comment-body .reply svg path {
    fill: #303030 !important;
}

#comments .comment-list .comment-body .reply .comment-reply-link {
    background: unset !important;
    color: #303030 !important;
    margin-right: 5px;
    cursor: pointer;
}

/* Comment Vote */
.ccp-comment-vote {
    display: inline-flex;
    align-items: center;
}

.ccp-comment-vote .ccp-comment-button {
    font-size: 20px;
    cursor: pointer;
}

.ccp-comment-vote .ccp-comment-dislike {
    margin-right: 10px;
}

.ccp-comment-vote .ccp-comment-like.active svg {
    fill: green;
}

.ccp-comment-vote .ccp-comment-dislike.active svg {
    fill: red;
}

.ccp-comment-vote .ccp-comment-count {
    margin-right: 4px;
}