/* TS Reviews Frontend Styles — TwojBobasek pastel theme */

/* =====================
   FORMULARZ OPINII
   ===================== */

.ts-review-form-container {
    background: #fff;
    border: 1px solid #FAD8E5;
    padding: 30px;
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: 0 10px 26px rgba(244, 143, 177, 0.12);
}

.ts-review-form-title {
    margin: 0 0 25px 0;
    font-size: 22px;
    color: #5C5470;
    font-family: 'Baloo 2', Arial, sans-serif;
    font-weight: 800;
}

.ts-form-row { margin-bottom: 18px; }
.ts-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #5C5470;
    font-size: 14px;
}
.ts-form-row label .required { color: #D84B57; }

.ts-form-row-half {
    display: flex;
    gap: 16px;
}
.ts-form-col { flex: 1; }

.ts-review-form input[type="text"],
.ts-review-form input[type="email"],
.ts-review-form textarea {
    width: 100%;
    padding: 12px 15px;
    background: #FFF8F2;
    border: 2px solid #FAD8E5;
    border-radius: 10px;
    font-size: 14px;
    color: #5C5470;
    font-family: 'Nunito', Arial, sans-serif;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.ts-review-form input:focus,
.ts-review-form textarea:focus {
    outline: none;
    border-color: #F48FB1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(244, 143, 177, 0.15);
}

.ts-review-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Star Rating Input */
.ts-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
}
.ts-star-rating input[type="radio"] { display: none; }
.ts-star-rating .star-label {
    font-size: 32px;
    color: #FAD8E5;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}
.ts-star-rating .star-label:hover,
.ts-star-rating .star-label:hover ~ .star-label,
.ts-star-rating input[type="radio"]:checked ~ .star-label {
    color: #f59e0b;
}
.ts-star-rating .star-label:hover { transform: scale(1.1); }

/* Submit Button */
.ts-review-submit-btn {
    background: #F48FB1;
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Baloo 2', Arial, sans-serif;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 20px rgba(244, 143, 177, 0.3);
}
.ts-review-submit-btn:hover {
    background: #EC6FA0;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(236, 111, 160, 0.35);
}
.ts-review-submit-btn:disabled {
    background: #cbd5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Messages */
.ts-review-message {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}
.ts-review-message.success { background: #DCFCE7; color: #2D6E37; border: 1px solid #86EFAC; }
.ts-review-message.error { background: #FEF2F3; color: #8E3338; border: 1px solid #D84B57; }
.ts-review-error {
    color: #8E3338;
    background: #FEF2F3;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #D84B57;
}

/* =====================
   WYŚWIETLANIE OPINII
   ===================== */

.ts-reviews-container { margin: 30px 0; }

.ts-reviews-empty {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #FFE3EF, #E7F4FF);
    border-radius: 16px;
    color: #5C5470;
    font-weight: 600;
}

/* Summary */
.ts-reviews-summary {
    background: linear-gradient(135deg, #FFE3EF, #E7F4FF);
    padding: 26px;
    border-radius: 16px;
    margin-bottom: 22px;
    text-align: center;
}
.ts-reviews-avg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.avg-number {
    font-size: 48px;
    font-weight: 800;
    color: #EC6FA0;
    line-height: 1;
    font-family: 'Baloo 2', Arial, sans-serif;
}
.avg-stars { font-size: 24px; }
.avg-stars .star { color: #FAD8E5; }
.avg-stars .star.filled { color: #f59e0b; }
.avg-count { color: #8a83a0; font-size: 14px; font-weight: 600; }

/* Reviews List */
.ts-reviews-list { display: flex; flex-direction: column; gap: 16px; }
.ts-review-item {
    background: #FFF8F2;
    border: 1px solid #FAD8E5;
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.2s ease;
}
.ts-review-item:hover { transform: translateY(-2px); }

.ts-review-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ts-review-author {
    font-weight: 700;
    color: #5C5470;
    font-family: 'Baloo 2', Arial, sans-serif;
}
.ts-review-rating { font-size: 14px; }
.ts-review-rating .star { color: #FAD8E5; }
.ts-review-rating .star.filled { color: #f59e0b; }
.ts-review-date {
    color: #8a83a0;
    font-size: 12px;
    margin-left: auto;
    font-weight: 600;
}

.ts-review-content {
    color: #5C5470;
    line-height: 1.6;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .ts-review-form-container { padding: 22px; }
    .ts-form-row-half { flex-direction: column; gap: 14px; }
    .ts-star-rating .star-label { font-size: 28px; }
    .ts-reviews-avg { flex-direction: column; gap: 8px; }
    .ts-review-date { margin-left: 0; width: 100%; }
}