.dc-google-rating {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    font-family: inherit;
}

.dc-google-rating__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dc-google-rating__icon {
    flex-shrink: 0;
}

.dc-google-rating__title {
    font-size: 1rem;
    font-weight: 600;
    color: inherit;
}

.dc-google-rating__stars-link {
    text-decoration: none;
    display: inline-block;
}

.dc-google-rating__stars-link:hover .dc-google-rating__star--filled,
.dc-google-rating__stars-link:hover .dc-google-rating__star--half {
    filter: brightness(1.15);
}

.dc-google-rating__stars {
    display: flex;
    gap: 0.1rem;
    cursor: default;
    user-select: none;
    line-height: 1;
}

.dc-google-rating__star {
    font-size: 1.75rem;
    color: #dadce0;
    transition: color 0.1s ease;
}

.dc-google-rating__star--filled {
    color: #fbbc04;
}

.dc-google-rating__star--half {
    /* Half-star via gradient trick */
    background: linear-gradient(90deg, #fbbc04 50%, #dadce0 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (prefers-color-scheme: dark) {
    .dc-google-rating__star {
        color: #9aa0a6;
    }

    .dc-google-rating__star--filled {
        color: #fbbc04;
    }

    .dc-google-rating__star--half {
        background: linear-gradient(90deg, #fbbc04 50%, #9aa0a6 50%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

@media (forced-colors: active) {
    /* gradient clip doesn't work in forced-colors; fall back to a solid filled star */
    .dc-google-rating__star--half {
        background: none;
        -webkit-background-clip: unset;
        background-clip: unset;
        -webkit-text-fill-color: unset;
        color: ButtonText;
    }
}

.dc-google-rating__value {
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.8;
}

.dc-google-rating__btn {
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    background: #4285F4;
    color: #fff;
    transition: background 0.2s ease;
}

.dc-google-rating__btn:hover {
    background: #3367d6;
    color: #fff;
}
