.ucr-reviews [hidden],
.ucr-modal[hidden] {
    display: none !important;
}

.ucr-reviews,
.ucr-modal {
    --ucr-accent: #F00;
    --ucr-accent-dark: #cc0000;
    --ucr-accent-soft: rgba(255, 0, 0, 0.08);
    --ucr-accent-border: rgba(255, 0, 0, 0.18);
    --ucr-stars: #ffb400;
    --ucr-text: #1f1f1f;
    --ucr-muted: #777;
    --ucr-line: #ececec;
    --ucr-card: #ffffff;
    --ucr-soft: #fafafa;
    --ucr-radius: 18px;
    font-family: Arial, sans-serif;
    color: var(--ucr-text);
    box-sizing: border-box;
}

.ucr-reviews *,
.ucr-modal * {
    box-sizing: border-box;
}

/* =========================
   ОСНОВНОЙ КОНТЕЙНЕР
========================= */

.ucr-reviews {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 0;
}

/* =========================
   ШАПКА
========================= */

.ucr-reviews__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--ucr-line);
}

.ucr-reviews__title {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.1;
    font-weight: 800;
    color: var(--ucr-text);
}

.ucr-reviews__summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: var(--ucr-muted);
}

.ucr-reviews__average {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--ucr-accent);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

/* =========================
   КНОПКИ
========================= */

.ucr-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 14px 24px;
    background: var(--ucr-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.ucr-btn:hover {
    background: var(--ucr-accent-dark);
    box-shadow: 0 8px 24px rgba(255,0,0,.18);
    transform: translateY(-1px);
}

.ucr-btn--primary,
.ucr-btn--submit {
    background: var(--ucr-accent);
    color: #fff;
}

/* =========================
   КАРТОЧКА ОТЗЫВА
========================= */

.ucr-review {
    position: relative;
    margin: 0 0 22px;
    padding: 26px;
    background: var(--ucr-card);
    border: 1px solid var(--ucr-line);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.04);
    overflow: hidden;
    transition: .2s ease;
}

.ucr-review::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, #ff2a2a 0%, #F00 100%);
    border-radius: 20px 0 0 20px;
}

.ucr-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0,0,0,.08);
    border-color: var(--ucr-accent-border);
}

.ucr-review__top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.ucr-review__avatar {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 60px;
    background: linear-gradient(135deg, #ffe5e5 0%, #ffd0d0 100%);
    border: 1px solid var(--ucr-accent-border);
    color: var(--ucr-accent);
    font-weight: 800;
    font-size: 22px;
    text-transform: uppercase;
}

.ucr-review__meta {
    min-width: 0;
}

.ucr-review__name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ucr-review__name {
    font-size: 17px;
    font-weight: 800;
    color: var(--ucr-text);
}

.ucr-review__date {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--ucr-soft);
    color: #888;
    font-size: 12px;
}

/* =========================
   ЗВЕЗДЫ
========================= */

.ucr-stars {
    display: inline-flex;
    gap: 4px;
    line-height: 1;
}

.ucr-star {
    font-size: 18px;
    color: #ddd;
}

.ucr-star.is-active {
    color: var(--ucr-stars);
}

/* =========================
   ТЕКСТ
========================= */

.ucr-review__section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #eee;
}

.ucr-review__label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ucr-accent);
}

.ucr-review__text {
    font-size: 15px;
    line-height: 1.7;
    color: #4d4d4d;
    white-space: pre-line;
}

/* =========================
   ФОТОГРАФИИ
========================= */

.ucr-review__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.ucr-review__photo {
    display: block;
    width: 86px;
    height: 86px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f1f1;
    border: 1px solid var(--ucr-line);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}

.ucr-review__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.ucr-review__photo:hover img {
    transform: scale(1.06);
}

/* =========================
   ПУСТО / ЗАГРУЗКА
========================= */

.ucr-reviews__loading,
.ucr-reviews__empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 0;
    color: var(--ucr-muted);
    font-size: 15px;
}

.ucr-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: var(--ucr-accent);
    border-radius: 50%;
    animation: ucr-spin .7s linear infinite;
}

@keyframes ucr-spin {
    to { transform: rotate(360deg); }
}

/* =========================
   ПАГИНАЦИЯ
========================= */

.ucr-reviews__pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.ucr-page {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    background: #fff;
    color: #333;
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.ucr-page:hover {
    border-color: var(--ucr-accent);
    color: var(--ucr-accent);
    background: #fff5f5;
}

.ucr-page.is-active {
    background: var(--ucr-accent);
    border-color: var(--ucr-accent);
    color: #fff;
}

/* =========================
   МОДАЛЬНОЕ ОКНО
========================= */

.ucr-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(20,20,20,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
    backdrop-filter: blur(4px);
}

.ucr-modal__dialog {
    position: relative;
    width: min(860px,100%);
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 80px rgba(0,0,0,.28);
    border: 1px solid rgba(255,0,0,.12);
}

.ucr-modal__title {
    margin: 0 0 24px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
}

.ucr-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: #fff1f1;
    color: var(--ucr-accent);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

.ucr-modal__close:hover {
    background: var(--ucr-accent);
    color: #fff;
}

/* =========================
   ФОРМА
========================= */

.ucr-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.ucr-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ucr-field--full {
    margin-top: 16px;
}

.ucr-field__label {
    font-size: 13px;
    font-weight: 800;
    color: #333;
}

.ucr-field__input,
.ucr-field__textarea {
    width: 100%;
    border: 1px solid #ddd !important;
    border-radius: 14px !important;
    background: #fff;
    padding: 13px 14px !important;
    font: inherit;
    outline: none;
    transition: .2s ease;
}

.ucr-field__textarea {
    min-height: 130px;
    resize: vertical;
}

.ucr-field__textarea--short {
    min-height: 92px;
}

.ucr-field__input:focus,
.ucr-field__textarea:focus {
    border-color: var(--ucr-accent) !important;
    box-shadow: 0 0 0 4px rgba(255,0,0,.08);
}

/* =========================
   РЕЙТИНГ
========================= */

.ucr-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 3px;
}

.ucr-rating-input input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ucr-rating-input label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    line-height: 1;
    transition: .15s ease;
}

.ucr-rating-input label:hover,
.ucr-rating-input label:hover ~ label,
.ucr-rating-input input:checked ~ label {
    color: var(--ucr-stars);
}

/* =========================
   ЗАГРУЗКА ФОТО
========================= */

.ucr-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    cursor: pointer;
}

.ucr-upload input {
    display: none;
}

.ucr-upload__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    transition: .2s ease;
}

.ucr-upload:hover .ucr-upload__button {
    background: var(--ucr-accent);
}

.ucr-upload__hint {
    font-size: 12px;
    color: #999;
}

.ucr-upload__preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ucr-upload__preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #eee;
}

/* =========================
   СООБЩЕНИЯ
========================= */

.ucr-form__message {
    min-height: 20px;
    margin: 14px 0 8px;
    font-size: 13px;
}

.ucr-form__message.is-error {
    color: #b42318;
}

.ucr-form__message.is-success {
    color: #15803d;
}

.ucr-btn--submit {
    min-width: 180px;
}

/* =========================
   HONEYPOT
========================= */

.ucr-honeypot {
    position: absolute !important;
    left: -99999px !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
}

/* =========================
   МОБИЛЬНАЯ ВЕРСИЯ
========================= */

@media (max-width: 700px) {
    .ucr-reviews {
        padding: 20px 0;
    }

    .ucr-reviews__header {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .ucr-reviews__header .ucr-btn {
        align-self: flex-start;
    }

    .ucr-reviews__title {
        font-size: 28px;
    }

    .ucr-form__grid {
        grid-template-columns: 1fr;
    }

    .ucr-modal__dialog {
        padding: 22px 16px;
        border-radius: 18px;
    }

    .ucr-review {
        padding: 20px;
    }

    .ucr-review__text {
        font-size: 14px;
    }

    .ucr-review__photo {
        width: 74px;
        height: 74px;
    }
}

body.ucr-modal-is-open .header__bottom {
    z-index: 1 !important;
}
button.ucr-btn.ucr-btn--primary {
    height: auto;
}
