/* Container includes safety buffers to prevent accidental clicks on surrounding layouts */
.cld-rating-wrapper {
    margin: 25px 0;
    padding: 15px;
    background: #fdfdfd;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cld-rating-title {
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.cld-rating-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}
/* Existing button style, updated for SVG alignment */
.cld-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 18px;
    font-size: 16px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center; /* Ensures SVG and count are vertically centered */
    gap: 8px;
    color: #475569;
    transition: all 0.2s ease;
}

/* Base SVG styling: constraints the icon size so it doesn't break layout */
.cld-svg {
    display: block;
    width: 18px; /* Slightly smaller than parent font-size for balance */
    height: 18px;
    fill: none; /* Inherits stroke color from parent .cld-btn color */
}

/* Specific styling for the 'Like' thumb when voted */
.cld-rating-wrapper.has-voted .cld-btn[data-type="like"] {
    background: #e2f5e9;
    border-color: #4ade80;
    color: #166534; /* This color applies to the SVG stroke and the text */
}

/* Specific styling for the 'Dislike' thumb when voted */
.cld-rating-wrapper.has-voted .cld-btn[data-type="dislike"] {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b; /* This color applies to the SVG stroke and the text */
}

.cld-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.cld-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cld-rating-wrapper.has-voted .cld-btn[data-type="like"] {
    background: #e2f5e9;
    border-color: #4ade80;
    color: #166534;
}

.cld-rating-wrapper.has-voted .cld-btn[data-type="dislike"] {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}

.cld-btn .cld-count {
    font-weight: bold;
}