/* Стили для отзывов */
.reviews-container {
    padding: 20px 0;
}

.reviews-filter {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.reviews-filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #0f172a;
}

.branch-select {
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 8px;
    font-size: 16px;
    min-height: 44px;
    background: #fff;
    cursor: pointer;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.review-card {
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.review-card__author {
    display: flex;
    gap: 12px;
    align-items: center;
}

.review-card__avatar {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.review-card__author-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.review-card__date {
    font-size: 14px;
    color: #64748b;
}

.review-card__branch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #64748b;
}

.review-card__rating {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1;
}

.oc-star {
    color: #cbd5e1;
    margin-right: 4px;
}

.oc-star.is-on {
    color: #fbbf24;
}

.review-card__content {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
}

.review-reply {
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 3px solid #1976d2;
}

.review-reply__header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.review-reply__avatar {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.review-reply__author {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}

.review-reply__date {
    font-size: 12px;
    color: #64748b;
}

.review-reply__content {
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.review-card__footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.review-reply-btn {
    background: transparent;
    border: none;
    color: #1976d2;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    min-height: 44px;
}

.review-reply-btn:hover {
    background: #f1f5f9;
}

.reviews-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.reviews-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: #cbd5e1;
}

#review-form-title {
    font-size: 24px;
    font-weight: 600;
    margin: 16px 0 12px;
    color: #0f172a;
}

.reply-context {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.reply-context__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reply-context__title {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}

.reply-context__cancel {
    background: transparent;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.reply-context__cancel:hover {
    background: #e2e8f0;
}

.reply-context__content {
    color: #475569;
    font-size: 14px;
    font-style: italic;
}

.review-form-container {
    margin-top: 16px;
}

.form-group {
    margin-bottom: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.char-counter {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    text-align: right;
}

.form-error {
    color: #dc2626;
    font-size: 14px;
    margin-top: 2px;
    display: none;
}

.form-error:not(:empty) {
    display: block;
}

.reviews-closed {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 12px;
}

/* Стили для рейтинга */
.comment-form-rating {
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.comment-form-rating legend {
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 12px;
    padding: 0;
}

.rating-group {
    margin-bottom: 12px;
}

.rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-bottom: 4px;
}

.rating input[type="radio"] {
    display: none;
}

.rating label {
    font-size: 28px;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.2s, transform 0.1s;
    user-select: none;
    line-height: 1;
}

.rating label:hover,
.rating label:hover ~ label {
    color: #fbbf24;
    transform: scale(1.1);
}

.rating input[type="radio"]:checked ~ label {
    color: #fbbf24;
}

.rating input[type="radio"]:checked + label {
    color: #fbbf24;
}

.rating input[type="radio"]:checked ~ label,
.rating input[type="radio"]:checked + label ~ label {
    color: #fbbf24;
}

.rating-hint {
    font-size: 14px;
    color: #64748b;
    margin-top: 2px;
}

/* Стили для чекбокса privacy */
.comment-form-privacy {
    margin: 12px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.privacy-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    user-select: none;
}

.privacy-label input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin: 0;
    margin-top: 0;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #334155;
    border-radius: 4px;
    background: #ffffff;
    position: relative;
    transition: all 0.2s ease;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    vertical-align: middle;
    z-index: 1;
}

.privacy-label input[type="checkbox"]:checked {
    background: #1976d2;
    border-color: #1976d2;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3);
}

.privacy-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    display: block;
}

.privacy-label input[type="checkbox"]:hover {
    border-color: #1976d2;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.2);
}

.privacy-label input[type="checkbox"]:focus {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.privacy-text {
    color: #475569;
    flex: 1;
    margin: 0;
    padding: 0;
}

.privacy-text a {
    color: #1976d2;
    text-decoration: underline;
}

.privacy-text a:hover {
    color: #1565c0;
}

/* Стили для reCAPTCHA */
.comment-form-recaptcha {
    margin: 12px 0;
}

.comment-form-recaptcha .g-recaptcha {
    display: inline-block;
}

.form-submit {
    margin-top: 16px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .reviews-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .branch-select {
        width: 100%;
    }

    .review-card__header {
        flex-direction: column;
    }

    .review-card {
        padding: 16px;
    }

    .review-reply {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .review-card__author {
        flex-wrap: wrap;
    }

    .review-card__avatar {
        width: 40px;
        height: 40px;
    }

    .review-reply__avatar {
        width: 32px;
        height: 32px;
    }

    .rating label {
        font-size: 24px;
    }

    .comment-form-privacy {
        font-size: 13px;
        padding: 12px;
    }

    .privacy-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
        display: block;
        visibility: visible;
        opacity: 1;
    }

    .privacy-label input[type="checkbox"]:checked::after {
        font-size: 14px;
    }
}

