/* =========================================================
   Reviews page — bizpozyka_v3
   Light cards on the dark theme (matches .reviews__list pattern).
   ========================================================= */

.reviews-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    margin: 30px 0 10px;
    line-height: 1.2;
}

.reviews-page .breadcrumbs,
.container > .breadcrumbs {
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: #cfcfcf;
}
.breadcrumbs__link,
.breadcrumbs__link span {
    color: #2BADE4;
    text-decoration: none;
}
.breadcrumbs__link:hover { text-decoration: underline; }
.breadcrumbs__separator { color: #cfcfcf; padding: 0 4px; }
.breadcrumbs__current { color: #cfcfcf; }

/* ---------- Список отзывов ---------- */
.reviews-page .load-more-container {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.reviews-page .load-more-container > li {
    list-style: none;
    margin: 0;
}

.reviews-page .white {
    background: #F8F8F8;
    border-radius: 16px;
    padding: 20px 24px;
    color: #161616;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.reviews-page .content { display: block; }

/* шапка карточки: имя+город слева, дата справа */
.reviews-page .review_content_header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.reviews-page .review_city_and_name {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.reviews-page .review_name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #161616;
}
.reviews-page .review_city {
    color: #F39200;
    font-weight: 600;
    font-size: 0.95rem;
}
.reviews-page .review_content_header > span {
    color: #8a8a8a;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* звёзды */
.reviews-page .static-rate {
    display: flex;
    gap: 2px;
    margin: 4px 0 10px;
}
.reviews-page .static-rate i { font-size: 14px; color: #FFA526; }

/* текст */
.reviews-page .review-text {
    color: #161616;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px;
    word-break: break-word;
}

/* нижняя строка с действиями */
.reviews-page .review-comment {
    display: flex;
    align-items: center;
    gap: 24px;
}
.reviews-page .reply-to-review-btn,
.reviews-page .toggle-comments-btn {
    background: none;
    border: 0;
    padding: 0;
    color: #2BADE4;
    text-decoration: underline;
    font-size: 0.9rem;
    cursor: pointer;
}
.reviews-page .reply-to-review-btn:hover,
.reviews-page .toggle-comments-btn:hover { color: #1d8cb5; }

/* ---------- Блок комментариев (внутри карточки) ---------- */
.reviews-page .review-reply {
    margin-top: 14px;
    border-top: 1px solid #e3e3e3;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.reviews-page .empty-reply-content {
    color: #888;
    font-style: italic;
    font-size: 0.9rem;
}
.reviews-page .reply-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.reviews-page .replay-img img,
.reviews-page .reply-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.reviews-page .reply-body { flex: 1; min-width: 0; }
.reviews-page .reply-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.reviews-page .reply-name { font-weight: 700; color: #161616; }
.reviews-page .reply-date { color: #8a8a8a; font-size: 0.85rem; white-space: nowrap; }
.reviews-page .reply-text {
    margin: 0;
    color: #161616;
    font-size: 0.9rem;
    line-height: 1.5;
}
.reviews-page .reply-feedback { margin-top: 6px; }
.reviews-page .reply-feedback .reply-to-review-btn { text-decoration: underline; }
.reviews-page .reply-to-admin {
    margin-left: 52px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.reviews-page .review-feedback {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------- Пагинация ---------- */
.reviews-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 24px 0 36px;
}
.reviews-pagination a,
.reviews-pagination .page-number,
.reviews-pagination .page-prev,
.reviews-pagination .page-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}
.reviews-pagination a:hover { background: rgba(255, 255, 255, 0.18); }
.reviews-pagination .page-number.current {
    background: #F39200;
    color: #fff;
    font-weight: 700;
}

/* ---------- Форма "Залишити відгук" ---------- */
.my-custom-reviews-form-wrapper { margin-top: 40px; }
.my-custom-reviews-form {
    background: #F8F8F8;
    border-radius: 16px;
    padding: 28px;
    color: #161616;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.my-custom-reviews-form h2 {
    margin: 0 0 18px;
    font-size: 1.6rem;
    color: #161616;
    font-weight: 700;
}
.review_form_item {
    margin: 0 0 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.review_form_item br { display: none; }
.review_form_item label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #161616;
}
.review_form_item .required { color: #e63946; }
.review_form_item input[type="text"],
.review_form_item input[type="email"],
.review_form_item textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d6d6d6;
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: #161616;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.review_form_item input:focus,
.review_form_item textarea:focus {
    border-color: #2BADE4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 173, 228, 0.18);
}
.review_form_item .wrong-input {
    border-color: #e63946 !important;
    background: #fff5f5;
}
.error-text {
    color: #e63946;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* кликабельная оценка */
.review_rate_input {
    display: inline-flex;
    gap: 6px;
    padding: 4px 0;
}
.review_rate_input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: #FFA526;
    line-height: 1;
}
.review_rate_input.error { box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.3); border-radius: 6px; padding: 4px 6px; }

/* сабмит */
.my-custom-reviews-form .button.button-primary,
.my-custom-reviews-form input[type="submit"] {
    background: #F39200;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 12px 26px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}
.my-custom-reviews-form .button.button-primary:hover,
.my-custom-reviews-form input[type="submit"]:hover { background: #d97e00; }

.g-recaptcha { margin: 10px 0; }

/* ---------- Модалка "спасибо за отзыв" ---------- */
#review-added-modal,
#review-added-modal > .modal {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    transform: none;
    -webkit-transform: none;
    overflow: auto;
    z-index: 9999;
}
#review-added-modal > .modal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#review-added-modal .modal-overlay,
.reply-modal .reply-modal-content ~ .reply-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}
#review-added-modal .modal-content {
    position: relative;
    z-index: 2;
    background: #fff;
    color: #161616;
    border-radius: 16px;
    max-width: 460px;
    width: 100%;
    padding: 28px 24px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    text-align: center;
}
#review-added-modal .modal-content p { margin: 0 0 18px; font-size: 1rem; line-height: 1.4; }
#review-added-modal .modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: 0;
    font-size: 1.6rem;
    cursor: pointer;
    color: #161616;
    line-height: 1;
}
#review-added-modal .review-button {
    background: #F39200;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 22px;
    font-weight: 700;
    cursor: pointer;
}
#review-added-modal .review-button:hover { background: #d97e00; }

/* ---------- Модалка ответа на отзыв ---------- */
.reply-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.reply-modal-content {
    background: #fff;
    color: #161616;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 28px 24px 22px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.reply-modal-content h2 {
    margin: 0 0 16px;
    font-size: 1.3rem;
    color: #161616;
}
.reply-modal-close {
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 1.6rem;
    cursor: pointer;
    color: #161616;
}
.reply-modal-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d6d6d6;
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: #161616;
}
.reply-modal-input:focus {
    border-color: #2BADE4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 173, 228, 0.18);
}
.create-reply-modal-btn { text-align: right; margin: 8px 0 0; }
.create-reply-modal-btn button {
    background: #F39200;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 10px 22px;
    font-weight: 700;
    cursor: pointer;
}
.create-reply-modal-btn button:hover { background: #d97e00; }

/* ---------- Адаптив ---------- */
@media (max-width: 768px) {
    .reviews-title { font-size: 1.6rem; }
    .reviews-page .white,
    .my-custom-reviews-form { padding: 16px; border-radius: 12px; }
    .reviews-page .review_content_header { flex-direction: column; align-items: flex-start; }
    .reviews-page .review_content_header > span { font-size: 0.85rem; }
    .reviews-page .reply-to-admin { margin-left: 28px; }
    .reviews-pagination a,
    .reviews-pagination .page-number { min-width: 32px; height: 32px; padding: 0 8px; font-size: 0.85rem; }
}
