/* --- ГЛОБАЛЬНЫЙ КОНТЕЙНЕР --- */
.ar-wrapper {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
}

/* --- КНОПКА "ОСТАВИТЬ ОТЗЫВ" --- */
.ar-form-wrap {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

.ar-toggle-btn {
    padding: 15px 30px;
    background-color: #ffd450;
    color: #0d121d;
    border: none;
    border-radius: 5px; /* Углы 5px */
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 212, 80, 0.2);
}

.ar-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 212, 80, 0.4);
    background-color: #ffca28;
}

/* --- ФОРМА ОТЗЫВА --- */
.ar-form {
    background: #0d121d; /* Темный фон */
    padding: 30px;
    border-radius: 5px; /* Углы 5px */
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-10px);
    text-align: left;
}

.ar-form.active {
    opacity: 1;
    max-height: 1000px;
    visibility: visible;
    transform: translateY(0);
}

/* --- ПОЛЯ ВВОДА (INPUT / TEXTAREA) --- */
.ar-field { margin-bottom: 15px; }

.ar-field input,
.ar-field textarea {
    width: 100%;
    padding: 14px 15px;
    background-color: #161b26 !important; /* Чуть светлее фона формы */
    color: #ffffff !important; /* БЕЛЫЙ ТЕКСТ */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 5px !important; /* Углы 5px */
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.3s;
    font-family: inherit;
}

/* Цвет плейсхолдера (подсказки) */
.ar-field input::placeholder,
.ar-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
    opacity: 1;
}

/* Фокус на поле */
.ar-field input:focus,
.ar-field textarea:focus {
    outline: none;
    border-color: #ffd450 !important;
    background-color: #1a202c !important;
}

/* Хак для автозаполнения (чтобы не становилось белым) */
.ar-field input:-webkit-autofill,
.ar-field input:-webkit-autofill:hover, 
.ar-field input:-webkit-autofill:focus, 
.ar-field textarea:-webkit-autofill,
.ar-field textarea:-webkit-autofill:hover,
.ar-field textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff !important;
    -webkit-box-shadow: 0 0 0px 1000px #161b26 inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* --- ВЫБОР РЕЙТИНГА --- */
.ar-rating {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.ar-radio {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px; /* Углы 5px */
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

.ar-radio input { display: none; }

.ar-radio:hover { background: rgba(255, 255, 255, 0.05); }

/* Логика нажатия (через :has для современных браузеров) */
.ar-radio:has(input:checked) {
    color: #fff;
    border-color: transparent;
}
.ar-radio.good:has(input:checked) { background: #28a745; }
.ar-radio.average:has(input:checked) { background: #ffc107; color: #000; }
.ar-radio.bad:has(input:checked) { background: #dc3545; }

/* Фолбэк для старых браузеров (если :has не работает) */
.ar-radio input:checked + span { font-weight: bold; }


/* --- КНОПКА ОТПРАВИТЬ --- */
.ar-submit {
    width: 100%;
    padding: 14px;
    background: #ffd450;
    color: #0d121d;
    border: none;
    border-radius: 5px; /* Углы 5px */
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.ar-submit:hover { background: #ffca28; }


/* --- СПИСОК ОТЗЫВОВ (BENTO CARDS) --- */
.ar-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 40px;
}

/* Карточка */
.ar-item {
    background-color: #0d121d; /* Графит */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px; /* Углы 5px */
    padding: 30px;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.ar-item:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 212, 80, 0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Шапка отзыва */
.ar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
}

.ar-author {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    display: block;
}

.ar-company-wrapper {
    font-size: 13px;
    color: #ffd450;
    margin-top: 4px;
}

.ar-source {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 5px;
}

/* Бейдж рейтинга */
.ar-rating-badge {
    padding: 5px 12px;
    border-radius: 4px; /* Углы 4-5px */
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: #fff;
}
.ar-rating-badge.good { background: #28a745; }
.ar-rating-badge.average { background: #ffc107; color: #000; }
.ar-rating-badge.bad { background: #dc3545; }

/* Контент */
.ar-content {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
}

/* Дата */
.ar-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: right;
    margin-top: 10px;
}

/* --- ОТВЕТЫ (АДМИН) --- */
.ar-replies {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.ar-reply.admin-reply {
    background: rgba(255, 212, 80, 0.05); /* Легкий желтый */
    border-left: 3px solid #ffd450;
    padding: 20px;
    border-radius: 0 5px 5px 0;
    margin-left: 0;
}

.ar-reply-header {
    font-size: 13px;
    font-weight: 700;
    color: #ffd450;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ar-reply-content {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.ar-reply-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 8px;
    text-align: left;
}

/* --- ПАГИНАЦИЯ --- */
.ar-pagination {
    margin-top: 40px;
    text-align: center;
}

.ar-pagination a,
.ar-pagination span {
    display: inline-block;
    padding: 10px 18px;
    margin: 0 5px;
    border-radius: 5px;
    background: #0d121d;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transition: 0.3s;
}

.ar-pagination a:hover,
.ar-pagination .current {
    background: #ffd450;
    color: #0d121d;
    border-color: #ffd450;
}

/* Адаптив */
@media (max-width: 600px) {
    .ar-header {
        flex-direction: column;
        gap: 10px;
    }
    .ar-rating-badge {
        align-self: flex-start;
    }
}