/**
 * Reviews Widget CSS
 * Modern, temiz tasarım - gradient yok
 * @version 1.0.0
 */

/* ==================== REVIEWS SECTION ==================== */
.reviews-section {
    margin: 48px 0;
    padding: 0;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.reviews-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviews-header h2 i {
    color: #6366f1;
}

.review-count {
    font-weight: 400;
    color: #6b7280;
    font-size: 18px;
}

/* ==================== BUTTONS ==================== */
.reviews-section .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.reviews-section .btn-primary {
    background: #6366f1;
    color: white;
    flex-shrink: 0;
    width: auto;
    max-width: 180px;
}

.reviews-section .btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.reviews-section .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #f1f1f1;
}

.reviews-section .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.btn-load-more {
    width: 100%;
    justify-content: center;
    padding: 14px;
}

/* ==================== SUMMARY ==================== */
.reviews-summary {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 32px;
    padding: 28px;
    background: #f9fafb;
    border-radius: 16px;
    margin-bottom: 32px;
    border: 1px solid #f1f1f1;
}

@media (max-width: 900px) {
    .reviews-summary {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.rating-overview {
    text-align: center;
    padding: 8px 0;
}

.rating-big {
    font-size: 56px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 12px 0 8px;
}

.rating-stars .star {
    font-size: 22px;
    color: #e5e7eb;
}

.rating-stars .star.filled {
    color: #fbbf24;
}

.rating-count {
    font-size: 14px;
    color: #6b7280;
}

/* Rating Breakdown */
.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.rating-bar:hover {
    background: rgba(99, 102, 241, 0.05);
}

.rating-bar-label {
    font-size: 13px;
    color: #6b7280;
    min-width: 60px;
    white-space: nowrap;
}

.rating-bar-track {
    flex: 1;
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #fbbf24;
    border-radius: 5px;
    transition: width 0.3s;
}

.rating-bar-count {
    font-size: 13px;
    color: #374151;
    font-weight: 500;
    min-width: 30px;
    text-align: right;
}

/* Highlights */
.rating-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    padding-left: 24px;
    border-left: 1px solid #f1f1f1;
}

@media (max-width: 900px) {
    .rating-highlights {
        flex-direction: row;
        padding-left: 0;
        border-left: none;
        padding-top: 16px;
        border-top: 1px solid #f1f1f1;
    }
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

.highlight-item i {
    color: #10b981;
}

/* ==================== REVIEW FORM ==================== */
.review-form-container {
    background: white;
    border: 1px solid #f1f1f1;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 32px;
}

.review-form-notice {
    text-align: center;
    padding: 32px;
    color: #6b7280;
}

.review-form-notice i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    color: #9ca3af;
}

.review-form-notice a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.review-form-notice a:hover {
    text-decoration: underline;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.required {
    color: #ef4444;
}

.reviews-section .form-input,
.reviews-section .form-textarea,
.reviews-section .form-select {
    padding: 12px 16px;
    border: 1px solid #f1f1f1;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    transition: all 0.2s;
    width: 100%;
    font-family: inherit;
    box-sizing: border-box;
}

.reviews-section .form-input:focus,
.reviews-section .form-textarea:focus,
.reviews-section .form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.reviews-section .form-input::placeholder,
.reviews-section .form-textarea::placeholder {
    color: #9ca3af;
}

.reviews-section .form-textarea {
    min-height: 120px;
    resize: vertical;
}

.char-counter {
    font-size: 12px;
    color: #9ca3af;
    text-align: right;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-rating-input .star {
    font-size: 32px;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.15s;
}

.star-rating-input .star:hover,
.star-rating-input .star.active,
.star-rating-input .star.hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.rating-text {
    margin-left: 12px;
    font-size: 14px;
    color: #6b7280;
}

/* Photo Upload */
.photo-upload-area {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px dashed #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: white;
    border: 1px solid #f1f1f1;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.upload-hint {
    font-size: 13px;
    color: #9ca3af;
}

.photo-preview {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.photo-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #f1f1f1;
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-item .remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.form-note {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.form-note i {
    color: #9ca3af;
}

/* ==================== FILTERS ==================== */
.reviews-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid #f1f1f1;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-tab:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.filter-tab.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.filter-sort .form-select {
    padding: 8px 36px 8px 12px;
    min-width: 150px;
    cursor: pointer;
    background: white url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") right 10px center/16px no-repeat;
    appearance: none;
}

/* ==================== REVIEWS LIST ==================== */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.no-reviews i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.no-reviews p {
    margin: 4px 0;
}

/* ==================== REVIEW ITEM ==================== */
.review-item {
    padding: 24px 0;
    border-bottom: 1px solid #f3f4f6;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviewer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.reviewer-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reviewer-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 15px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #059669;
    font-weight: 500;
}

.verified-badge i {
    font-size: 11px;
}

.review-date {
    font-size: 13px;
    color: #9ca3af;
}

.review-rating {
    display: flex;
    gap: 2px;
    margin-bottom: 12px;
}

.review-rating .star {
    font-size: 16px;
    color: #e5e7eb;
}

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

.review-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.review-content {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
}

.review-content p {
    margin: 0;
}

/* Review Photos */
.review-photos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.review-photo {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid #f1f1f1;
}

.review-photo:hover {
    transform: scale(1.05);
}

.review-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Seller Reply */
.seller-reply {
    margin-top: 16px;
    padding: 16px;
    background: #f0fdf4;
    border-radius: 6px;
    border-left: 4px solid #10b981;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.reply-header i {
    color: #10b981;
}

.reply-header strong {
    color: #065f46;
}

.reply-date {
    color: #6b7280;
    margin-left: auto;
}

.seller-reply p {
    margin: 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

/* Review Actions */
.review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.helpful-voting {
    display: flex;
    align-items: center;
    gap: 10px;
}

.helpful-text {
    font-size: 13px;
    color: #6b7280;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #f1f1f1;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.vote-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.vote-btn.vote-up:hover,
.vote-btn.vote-up.active,
.vote-btn.vote-up.voted {
    border-color: #10b981;
    color: #10b981;
    background: #ecfdf5;
}

.vote-btn.vote-down:hover,
.vote-btn.vote-down.active,
.vote-btn.vote-down.voted {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.vote-count {
    font-weight: 500;
}

.report-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.2s;
}

.report-btn:hover {
    color: #ef4444;
}

/* ==================== LOAD MORE ==================== */
.reviews-load-more {
    margin-top: 24px;
}

/* ==================== PHOTO LIGHTBOX ==================== */
.review-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.review-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.review-lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 6px;
}

.review-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.review-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .reviews-header h2 {
        font-size: 18px;
    }
    
    .reviews-summary {
        padding: 20px;
    }
    
    .rating-big {
        font-size: 44px;
    }
    
    .review-form-container {
        padding: 20px;
    }
    
    .reviews-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tabs {
        justify-content: center;
    }
    
    .filter-sort {
        width: 100%;
    }
    
    .filter-sort .form-select {
        width: 100%;
    }
    
    .review-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .review-date {
        align-self: flex-start;
    }
    
    .review-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .helpful-voting {
        flex-wrap: wrap;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.review-item {
    animation: fadeIn 0.3s ease;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.reviews-section .btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== TOAST NOTIFICATION ==================== */
.review-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.review-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.review-toast-success {
    background: #10b981;
    color: white;
}

.review-toast-error {
    background: #ef4444;
    color: white;
}

.review-toast .toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* ==================== WRITE REVIEW BUTTON ==================== */
.write-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    background: #6366f1;
    color: white;
}

.write-review-btn:hover:not(.disabled) {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.write-review-btn.disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.write-review-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}
