/* TS Reviews Frontend Styles */

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

.ts-review-form-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.ts-review-form-title {
    margin: 0 0 25px 0;
    font-size: 20px;
    color: #1e3a5f;
}

.ts-form-row {
    margin-bottom: 20px;
}

.ts-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ts-form-row label .required {
    color: #dc3545;
}

.ts-form-row-half {
    display: flex;
    gap: 20px;
}

.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;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.ts-review-form input:focus,
.ts-review-form textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.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: 5px;
}

.ts-star-rating input[type="radio"] {
    display: none;
}

.ts-star-rating .star-label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color 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;
}

/* Submit Button */
.ts-review-submit-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 14px 35px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ts-review-submit-btn:hover {
    background: #1d4ed8;
}

.ts-review-submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

/* Messages */
.ts-review-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    font-size: 14px;
}

.ts-review-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ts-review-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ts-review-error {
    color: #721c24;
    background: #f8d7da;
    padding: 15px;
    border-radius: 4px;
}

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

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

.ts-reviews-empty {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
    font-style: italic;
}

/* Summary */
.ts-reviews-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
}

.ts-reviews-avg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.avg-number {
    font-size: 48px;
    font-weight: bold;
    color: #1e3a5f;
    line-height: 1;
}

.avg-stars {
    font-size: 24px;
}

.avg-stars .star {
    color: #ddd;
}

.avg-stars .star.filled {
    color: #f59e0b;
}

.avg-count {
    color: #666;
    font-size: 14px;
}

/* Reviews List */
.ts-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ts-review-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.ts-review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ts-review-author {
    font-weight: 600;
    color: #1e3a5f;
}

.ts-review-rating {
    font-size: 14px;
}

.ts-review-rating .star {
    color: #ddd;
}

.ts-review-rating .star.filled {
    color: #f59e0b;
}

.ts-review-date {
    color: #999;
    font-size: 13px;
    margin-left: auto;
}

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

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