/**
 * WGL Merchant Reviews — stars + form
 */

.vgl-rating {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

.vgl-rating__stars {
    display: inline-flex;
    gap: 0.1em;
    letter-spacing: 0;
}

.vgl-rating__star {
    font-size: 1.1em;
    line-height: 1;
    color: #f5a623;
}

.vgl-rating__star--empty {
    color: #d0d0d0;
}

.vgl-rating__star--half {
    position: relative;
    color: #d0d0d0;
}

.vgl-rating__star--half::before {
    content: "★";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #f5a623;
}

.vgl-rating--compact {
    display: flex;
    justify-content: center;
    width: 90%;
    max-width: 108px;
    margin-inline: auto;
}

.vgl-rating--compact .vgl-rating__stars {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 0.12em;
}

.vgl-rating--compact .vgl-rating__star {
    font-size: 1.35rem;
    line-height: 1;
}

.vgl-rating--summary {
    display: block;
    text-align: center;
    width: 100%;
}

.vgl-rating--summary .vgl-rating__stars {
    justify-content: center;
}

.vgl-rating--summary .vgl-rating__star {
    font-size: 2rem;
}

.vgl-rating__text,
.vgl-rating__empty {
    margin: 0.5rem 0 0;
    text-align: center;
}

.vgl-rating__count {
    font-size: 0.85em;
    color: #666;
}

/* Review list */
.vgl-rating-list__item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e5e5;
}

.vgl-rating-list__item:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.vgl-rating-list__header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
    margin-bottom: 0.35rem;
}

.vgl-rating-list__date {
    font-size: 0.85em;
    color: #666;
}

.vgl-rating-list__content {
    margin-top: 0.5rem;
}

.vgl-rating-list__content p:last-child {
    margin-bottom: 0;
}

/* Form */
.vgl-rating-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.vgl-rating-form__label,
.vgl-rating-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.vgl-rating-form__input,
.vgl-rating-form__textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d0d0d0;
    padding: 0.65rem 0.75rem;
    box-sizing: border-box;
}

.vgl-rating-form__stars {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.15rem;
}

.vgl-rating-form__star-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.vgl-rating-form__star-label {
    cursor: pointer;
    margin: 0;
    font-size: 1.75rem;
    color: #d0d0d0;
    line-height: 1;
}

.vgl-rating-form__star-input:checked ~ .vgl-rating-form__star-label,
.vgl-rating-form__star-label:hover,
.vgl-rating-form__star-label:hover ~ .vgl-rating-form__star-label {
    color: #f5a623;
}

.vgl-rating-form__star-input:focus-visible + .vgl-rating-form__star-label {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.vgl-rating-form__hp {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

.vgl-rating-form__message {
    margin: 0;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
}

.vgl-rating-form__message--success {
    background: #edfaef;
    color: #1e6b2f;
}

.vgl-rating-form__message--error {
    background: #fbeaea;
    color: #8a1f1f;
}

.vgl-rating-form__submit {
    width: 100%;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 8px;
    background: #2271b1;
    color: #fff;
    font-weight: 600;
}

.vgl-rating-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
