/* style.css */

/* Основная обертка формы */
.scf-feedback-wrapper {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

.scf-feedback-wrapper h3 {
    margin-top: 0;
    color: #333;
}

/* Блок сообщений (AJAX) */
.scf-response-message {
    display: none;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}
.scf-response-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}
.scf-response-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.scf-form-meta {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
}

.scf-form-meta p {
    margin: 5px 0;
}

/* Бейдж услуги в форме */
.scf-service-badge {
    background: #e2e6ea;
    color: #495057;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

/* Группа рейтинга */
.scf-rating-group {
    margin-bottom: 25px;
    text-align: center;
}

.scf-rating-title {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #555;
}

/* --- МАГИЯ ЗВЕЗД --- */
.scf-star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: center;
}

.scf-star-rating input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.scf-star-rating label {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ccc'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 30px;
}

.scf-star-rating label:hover {
    transform: scale(1.2);
}

.scf-star-rating input:checked ~ label,
.scf-star-rating label:hover ~ label,
.scf-star-rating label:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD700'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}

/* --- ВЫБОР ПРИВАТНОСТИ (НОВОЕ) --- */
.scf-privacy-options {
    margin: 20px 0 25px 0;
    padding: 15px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}

.scf-privacy-title {
    font-weight: 600;
    color: #555;
    margin-bottom: 12px;
}

.scf-privacy-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
}

.scf-privacy-label:last-child {
    margin-bottom: 0;
}

.scf-privacy-label input[type="radio"] {
    margin-top: 3px;
    margin-right: 10px;
    accent-color: #333;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.scf-privacy-label span {
    line-height: 1.4;
    color: #333;
}

.scf-privacy-label small {
    display: block;
    color: #777;
    margin-top: 2px;
}


/* Остальные стили формы */
.scf-comment-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.scf-comment-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
}
.scf-comment-group textarea:focus {
    border-color: #FFD700;
    outline: none;
}

.scf-submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scf-submit-btn:hover {
    background-color: #555;
}

.scf-submit-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* Спиннер загрузки */
.scf-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* --- Стили для списка отзывов (Grid) --- */

.scf-reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.scf-review-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.scf-review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.scf-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.scf-card-author {
    font-size: 16px;
    line-height: 1.3;
}

.scf-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Бейдж верификации */
.scf-verified-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    text-transform: uppercase;
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    letter-spacing: 0.5px;
}
.scf-verified-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-right: 2px;
}

.scf-company-name {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.scf-card-rating {
    color: #FFD700;
    font-size: 18px;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* Мета информация под хедером (Услуга и номер) */
.scf-meta-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
}

.scf-service-tag {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 11px;
}

.scf-job-id {
    color: #999;
}

.scf-card-body {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    flex-grow: 1;
}

.scf-card-footer {
    margin-top: 15px;
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* --- Стили для быстрых тегов --- */

.scf-tags-wrapper {
    margin-bottom: 15px;
    min-height: 10px;
}

.scf-tags-group {
    display: none; 
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

.scf-tag-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #f9f9f9;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    color: #555;
}

.scf-tag-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.scf-tag-btn.positive:hover {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.scf-tag-btn.negative:hover {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Пагинация */
.scf-pagination {
    margin-top: 40px;
    text-align: center;
}

.scf-pagination ul {
    display: inline-flex;
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 5px;
}

.scf-pagination li a, 
.scf-pagination li span {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
    background: #fff;
}

.scf-pagination li a:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

/* Активная страница */
.scf-pagination li span.current {
    background: #333;
    color: #fff;
    border-color: #333;
    font-weight: bold;
}