:root {
    --alert-success-color: #146c43;
    --alert-success-bg: #d1e7dd;
    --alert-success-border: #badbcc;
    --alert-error-color: #842029;
    --alert-error-bg: #f8d7da;
    --alert-error-border: #f5c2c7;

    --radius-md: 0.75rem;
    --focus-ring: 0.1875rem;
    --control-height: 3rem;
    --gap-md: 0.75rem;

    --fs-comment-base: 0.875rem;
    --fs-comment-sm: 0.8125rem;
    --fs-comment-xs: 0.75rem;

    --color-fill-svg: #ffc107;
    --color-empty-svg: #e0e0e2;
}

.comments .comments__header-icon svg {
    width: 27px;
    height: 27px;
}

.comments__header-icon {
    width: 40px;
    background: linear-gradient(140deg, var(--primary-10), #fff6ed14);
    border-radius: 8px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-form {
    padding: 32px;
    border-radius: 1.25rem;
}

.comment-form__header {
    padding-bottom: 10px;
}

.comment-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: var(--fs-comment-base);
    line-height: 1.8;
}

.comment-alert--success {
    color: var(--alert-success-color);
    background-color: var(--alert-success-bg);
    border: 0.0625rem solid var(--alert-success-border);
}

.comment-alert--error {
    color: var(--alert-error-color);
    background-color: var(--alert-error-bg);
    border: 0.0625rem solid var(--alert-error-border);
}

.comment-form__label {
    color: #343a40;
    font-size: var(--fs-comment-base);
    line-height: 1.6;
}

.comment-form__input,
.comment-form__textarea {
    border-color: #dee2e6;
    border-radius: var(--radius-md);
    color: #212529;
    font-size: var(--fs-comment-base);

    transition: border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.comment-form__input {
    min-height: var(--control-height);
}

.comment-form__textarea {
    min-height: 8.75rem;
    line-height: 1.9;
    resize: vertical;
}

.comment-form__input::placeholder,
.comment-form__textarea::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.comment-form__input:focus,
.comment-form__textarea:focus {
    border-color: var(--primary-50);
    box-shadow: 0 0 0 var(--focus-ring) rgba(239, 150, 62, 0.12);
}

.comment-form__input:hover,
.comment-form__textarea:hover {
    border-color: #ced4da;
}

.comment-form__input.is-invalid:focus,
.comment-form__textarea.is-invalid:focus {
    box-shadow: 0 0 0 var(--focus-ring) rgba(220, 53, 69, 0.1);
}

.comment-form__rating {
    border-radius: 0.875rem;
    transition: border-color 0.2s ease,
    background-color 0.2s ease;
}

.comment-form__rating.has-error {
    background-color: #fffafa;
}

.comment-form__rating-value {
    color: #6c757d;
    font-size: var(--fs-comment-sm);
    line-height: 1.6;
}

.comment-form__star {
    width: 1.875rem;
    height: 1.875rem;
    padding: 2px;
    border: 0;
    border-radius: 0.625rem;
    background: transparent;
    cursor: pointer;
    transition: transform 0.15s ease,
    background-color 0.15s ease;
}

.comment-form__star svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: #e1e5e9;
    stroke: #77777794;
    stroke-width: 1.2;
    transition: fill 0.15s ease,
    stroke 0.15s ease,
    transform 0.15s ease;
}

.comment-form__star:hover svg,
.comment-form__star:has(~ .comment-form__star:hover) svg {
    fill: var(--primary-30);
    stroke: var(--primary-50);
}

.comment-form__star:hover {
    background: rgba(239, 150, 62, 0.08);
    transform: translateY(-0.125rem);
}

.comment-form__star.is-active svg {
    fill: var(--primary-30);
    stroke: var(--primary-50);
}

.comment-form__star.is-active:hover svg {
    transform: scale(1.08);
}

.comment-form__star:focus-visible {
    outline: 0.125rem solid var(--primary-50);
    outline-offset: 0.125rem;
}

.comment-form__counter {
    margin-top: 8px;
    color: #8a8f98;
    font-size: var(--fs-comment-xs);
    line-height: 1.5;
}

.comment-form .invalid-feedback {
    margin-top: 6px;
    font-size: var(--fs-comment-xs);
    line-height: 1.7;
}

.comment-form__submit {
    min-width: 9.375rem;
    min-height: var(--control-height);
    border-radius: var(--radius-md);
    font-size: var(--fs-comment-base);
    transition: transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.comment-form__submit:hover {
    transform: translateY(-0.0625rem);
    box-shadow: 0 0.375rem 1.125rem rgba(239, 150, 62, 0.22);
}

.comment-form__submit:active {
    transform: translateY(0);
}

.review-card {
    width: 100%;
    border: 0.0625rem solid var(--border-color);
    border-radius: var(--border-radius-base);
}

.review-card__top {
    gap: var(--gap-md);
    margin-bottom: 14px;
}

.review-user {
    gap: var(--gap-md);
}

.avatar-user,
.avatar-admin {
    width: 2.5rem;
    height: 2.5rem;
    background-image: url("/assets/images/icons/user.webp");
    background-repeat: no-repeat;
    background-size: 2.5rem;
    font-size: 1.375em;
}

.avatar-admin {
    background-image: url("/assets/images/icons/support.webp");
}

.review-stars {
    font-size: 1.125rem;
    letter-spacing: -0.3125rem;
}

.review-card__text {
    margin: 0;
    font-size: var(--fs-comment-base);
}

.comment-form .form-label {
    font-size: var(--fs-comment-base);
    color: #212529bf;
    margin-bottom: 8px;
}

.comment-form .form-control {
    min-height: var(--control-height);
    box-shadow: none;
    font-size: var(--fs-comment-base);
    text-align: right;
}

.comment-form .form-control:focus {
    border-color: var(--primary-50);
    box-shadow: 0 0 0 var(--focus-ring) rgba(255, 138, 0, 0.12);
}

.review__reply-box {
    margin-top: 14px;
    margin-right: 0;
    background: var(--primary-10);
    border: 0.0625rem solid var(--primary-20);
    border-radius: var(--border-radius-base);
    padding: 14px 16px;
}

.review__reply-box .reply-header {
    gap: 0.5rem;
    color: var(--primary-50);
    margin-bottom: 8px;
}

.review__reply-box::before {
    content: "";
    position: absolute;
    right: -6px;
    top: 15px;
    background: var(--primary-10);
    width: 10px;
    height: 10px;
    border: 2px solid var(--primary-20);
    border-top: 0;
    border-left: 0;
    transform: rotate(-48deg);
}

.review__reply-box .reply-text,
.review-card__text {
    text-align: justify;
}

.review__reply-box .reply-text {
    font-size: var(--fs-comment-sm);
    line-height: 1.8;
}

.rating-card {
    margin: auto;
    position: sticky;
    top: 8.4rem;
}

.rating-card__score {
    color: #3f4043;
    font-size: 1.5rem;
}

.rating-card__star {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s ease;
}

.rating-card__star--filled {
    fill: var(--color-fill-svg);
}

.rating-card__star--empty {
    fill: var(--color-empty-svg);
}

.btn-register-comment {
    transition: all 0.3s ease;
}

#commentForm {
    scroll-margin-top: 150px;
}

@media (max-width: 769px) {
    .comment-form {
        padding: 24px 18px;
        border-radius: 1rem;
    }

    .comment-form__title {
        font-size: 1rem;
    }

    .comment-form__subtitle {
        font-size: var(--fs-comment-sm);
    }

    .comment-form__rating {
        padding: 16px;
    }


    .comment-form__submit {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .comment-form__rating {
        padding: 14px 10px;
    }
}


.review-empty__title {
    margin: 0 0 10px;
    color: #272727;
    font-weight: 600;
    line-height: 1.8;
}

.review-empty__description {
    max-width: 570px;
}

.review-empty__link {
    gap: 8px;
    color: #ed8500;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.review-empty__link:hover {
    color: #c96f00;
}


.review-empty__svg {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 280px;
    height: 190px;
}

.review-empty__decoration {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f2a13d;
    background-color: #fff8ef;
}

.review-empty__decoration--star {
    top: 24px;
    left: 5%;
    width: 34px;
    height: 34px;
    border: 1px solid #f8ddb8;
    border-radius: 50%;
    font-size: 19px;
}

.review-empty__decoration--heart {
    right: 28%;
    bottom: 35px;
    width: 38px;
    height: 38px;
    border: 1px solid #f8ddb8;
    border-radius: 50%;
    font-size: 27px;
    font-weight: 300;
}

.review-empty__decoration--dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #f6bd6c;
}

.review-empty__decoration--dot-one {
    top: 52px;
    right: 24%;
}

.review-empty__decoration--dot-two {
    bottom: 42px;
    left: 17%;
    width: 6px;
    height: 6px;
    background-color: #ffdca9;
}

.review-empty__rating {
    position: absolute;
    right: 19%;
    top: 28px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid #f5dfc5;
    border-radius: 20px;
    color: #a96a20;
    background-color: #ffffff;
    box-shadow: 0 5px 15px rgba(180, 110, 25, 0.08);
    font-size: 11px;
    white-space: nowrap;
}

.review-empty__rating-icon {
    display: flex;
    color: #f2a13d;
}


.review-visual__img{
    width: 15.625rem;
    height: 15.625rem;
    background-image: url("/assets/images/visual-comment.webp");
    background-size: 15.625rem;
    background-repeat: no-repeat;
}

@media (max-width: 991px) {
    .review-empty__svg {
        max-width: 245px;
        height: 165px;
    }

    .review-empty__rating {
        right: 16%;
    }
}

@media (max-width: 991.98px) {
    .review-empty__svg {
        max-width: 215px;
        height: 145px;
    }

    .review-empty__decoration--star {
        top: 15px;
        left: 16%;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .review-empty__decoration--heart {
        right: 10%;
        bottom: 22px;
        width: 32px;
        height: 32px;
        font-size: 23px;
    }

    .review-empty__rating {
        top: 15px;
        right: 8%;
        padding: 5px 8px;
        font-size: 10px;
    }

    .review-empty__content {
        text-align: center;
    }

    .review-empty__description {
        margin-right: auto;
        margin-left: auto;
    }

    .review-empty__svg {
        max-width: 240px;
        height: 150px;
    }

    .review-empty__content {
        padding: 12px 0 0;
    }

    .review-empty__description {
        font-size: 13px;
    }

    .review-empty__svg {
        max-width: 210px;
        height: 130px;
    }
}
