/**
 * Modern Reviews Styling for iTiles.ro
 * Elegant, Romanian-localized design
 */

/* Main Container - Fixed Layout */
.reviews-section-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .reviews-section-container {
        gap: 1.5rem;
    }
}

/* Reviews List Section */
.reviews-list-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .reviews-list-section {
        padding: 1.5rem;
        border-radius: 12px;
    }
}

/* Review Form Section */
.review-form-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
}

@media (max-width: 768px) {
    .review-form-section {
        padding: 1rem;
        border-radius: 12px;
    }
    
    /* Make rating section more compact on mobile */
    .review-form-section .bg-green-50 {
        padding: 1rem !important;
    }
    
    /* Stack rating fields vertically on mobile */
    .review-form-section #product-review-table > div {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0.75rem !important;
    }
    
    /* Make labels smaller and take full width */
    .review-form-section #product-review-table label {
        font-size: 0.875rem !important;
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Make stars container take full width */
    .review-form-section #product-review-table .flex.items-center {
        width: 100% !important;
        justify-content: flex-start !important;
    }
    
    /* Reduce star size on mobile */
    .review-form-section #product-review-table svg {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }
    
    /* Reduce heading size */
    .review-form-section .text-xl {
        font-size: 1.125rem !important;
    }
    
    /* Compact form fields */
    .review-form-section input[type="text"],
    .review-form-section textarea {
        font-size: 0.875rem !important;
        padding: 0.5rem !important;
    }
}

/* Reviews List Header */
.reviews-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.reviews-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Individual Review Card */
.review-card {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.review-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #10b981;
}

.review-card:hover::before {
    opacity: 1;
}

/* Review Header - Author and Date */
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.review-author-info {
    display: flex;
    flex-direction: column;
}

.review-author-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
    margin: 0;
}

.review-date {
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.review-date svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Star Rating */
.review-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.review-rating svg {
    width: 20px;
    height: 20px;
}

.star-filled {
    color: #eab308;
    fill: currentColor;
}

.star-empty {
    color: #d1d5db;
    fill: currentColor;
}

/* Review Title */
.review-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Review Content */
.review-content {
    font-size: 0.975rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 0;
}

/* Rating Breakdown (if exists) */
.review-rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rating-label {
    font-size: 0.875rem;
    color: #64748b;
    min-width: 80px;
    font-weight: 500;
}

.rating-stars-small {
    display: flex;
    gap: 0.2rem;
}

.rating-stars-small svg {
    width: 16px;
    height: 16px;
}

/* Pagination */
.review-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.review-pagination button,
.review-pagination a {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.review-pagination button:hover,
.review-pagination a:hover {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.review-pagination .active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Review Form Header */
.review-form-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 3px solid #10b981;
}

.review-form-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.review-form-header svg {
    width: 32px;
    height: 32px;
    color: #10b981;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .review-form-header h3 {
        font-size: 1.35rem;
    }
    
    .review-form-header svg {
        width: 26px;
        height: 26px;
    }
}

/* Review Form Styling */
.review-form fieldset,
#review_form fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.75rem 0;
}

.review-form legend,
#review_form legend {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    width: 100%;
}

.review-form .field,
#review_form .field {
    margin-bottom: 1.5rem;
}

.review-form label,
#review_form label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.625rem;
    font-size: 0.975rem;
}

.review-form input[type="text"],
.review-form input[type="email"],
.review-form textarea,
#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea {
    width: 100% !important;
    padding: 0.875rem 1.125rem !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 0.975rem !important;
    transition: all 0.2s ease !important;
    background: #f8fafc !important;
    font-family: inherit !important;
}

.review-form input:focus,
.review-form textarea:focus,
#review_form input:focus,
#review_form textarea:focus {
    outline: none !important;
    border-color: #10b981 !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

.review-form textarea,
#review_form textarea {
    min-height: 150px !important;
    resize: vertical !important;
}

/* Submit Button */
.review-form button[type="submit"],
.review-form .action.submit,
#review_form button[type="submit"],
#review_form .action.submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    padding: 1rem 3rem !important;
    border-radius: 12px !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    margin-top: 1rem !important;
}

.review-form button[type="submit"]:hover,
.review-form .action.submit:hover,
#review_form button[type="submit"]:hover,
#review_form .action.submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4) !important;
}

.review-form button[type="submit"]:active,
.review-form .action.submit:active,
#review_form button[type="submit"]:active,
#review_form .action.submit:active {
    transform: translateY(0) !important;
}

/* Rating Stars in Form */
.review-form .control.review-control-vote,
#review_form .control.review-control-vote {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.75rem 0;
}

.review-form .control.review-control-vote label,
#review_form .control.review-control-vote label {
    margin: 0;
    cursor: pointer;
}

/* Product Name in "You're reviewing" */
.review-form .product-name,
#review_form .product-name {
    font-weight: 700;
    color: #10b981;
}

/* Remove default card styling from form */
#review-form .card,
#review_form .card {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Empty State */
.reviews-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: white;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.reviews-empty-state svg {
    width: 64px;
    height: 64px;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.reviews-empty-state h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
}

.reviews-empty-state p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .review-title {
        font-size: 1.05rem;
    }
    
    .review-content {
        font-size: 0.925rem;
    }
    
    .reviews-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Rating Input Stars (for form) */
.rating-input {
    display: flex;
    gap: 0.5rem;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

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

.rating-input label {
    cursor: pointer;
    font-size: 0;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.rating-input label svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input[type="radio"]:checked ~ label {
    color: #eab308;
}

