/**
 * EcoFlow Product Reviews - Complete Styles
 * Version: 2.0
 */

/* ============================================
   REVIEW WRAPPER
   ============================================ */

.ecoflow-reviews-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}
/* ============================================
   REVIEW STATS - ORIGINAL DESIGN
   ============================================ */

.ecoflow-review-stats {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0;
}

/* Ãœst Bar: YÄ±ldÄ±zlar + Buton */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.stats-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quick-stars {
    display: flex;
    gap: 4px;
    color: #ffa500;
    font-size: 20px;
}

.quick-stars i {
    font-size: 20px;
}

.quick-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.quick-rate {
    font-weight: 600;
    color: #333;
}

.divider {
    color: #ccc;
}

.quick-count {
    color: #666;
}

/* Bir yorum yazÄ±n butonu - SAÄžDA */
.btn-add-review {
    padding: 12px 28px;
    background: #000;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-review:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Tabs */
.stats-tabs {
    display: flex;
    gap: 30px;
    padding: 20px 0 15px;
    border-bottom: 1px solid #e0e0e0;
}

.tab-item {
    font-size: 16px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    /* padding-bottom: 10px; */
    position: relative;
    transition: color 0.3s;
}

.tab-item.active {
    color: #000;
}

.tab-item.active::after {
    /* content: ''; */
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #000;
}

.tab-item:hover {
    color: #000;
}

/* Customer Photos */
.customer-media-section {
    margin: 30px 0;
    justify-items: center;
}

.media-title {
    font-size: 15px;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
}

.customer-media-grid {
    display: flex;
    gap: 10px;
    max-width: 800px;
}

.customer-media-grid img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e0e0e0;
    display: inline-flex;
}

.customer-media-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sorting */
.review-sorting {
    margin: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    border-top: 1px solid #e0e0e0;
    padding: 30px 0 18px 0;
}

.sort-dropdown {
    padding: 10px 20px 10px 0;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    background: white;
    cursor: pointer;
    appearance: none;
}

.sort-dropdown:focus {
    outline: none;
    border-color: #000;
}

/* Float button kaldÄ±r */
.btn-add-review-float {
    display: none;
}
/* ============================================
   REVIEW LIST
   ============================================ */

.ecoflow-review-list {
    margin-top: 30px;
}

.ecoflow-review-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 25px 0;
}

.ecoflow-review-item:last-child {
    border-bottom: none;
}
.sort-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.sort-dropdown {
    appearance: none;
    padding-right: 30px;
}

.sort-chevron {
    position: absolute;
    right: 10px;
    pointer-events: none;
}
.review-header {
    margin-bottom: 12px;
}
.ecoflow-review-item {
    display: flex;
    flex-direction: row;
    gap: 90px;
}
.review-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 14px;
    flex-wrap: wrap;
}
.review-user-info {
    flex: 0 0 32%;
    display: flex;
    flex-direction: row;
}
.ecoflow-review-item.is-verified .review-verified {
    background: #ffa722;
}
.review-verified {
    height: fit-content;
    padding: 2px 6px;
    background: #df2323;
    color: #fff;
    border-radius: 8px;
    margin-left: 10px;
    font-size: 12px;
}
.review-stars {
    display: flex;
    gap: 2px;
    color: #ffa500;
    margin-bottom: 8px;
}

.review-stars i {
    font-size: 14px;
}

.review-author {
    font-weight: 600;
    color: #333;
}

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

.review-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.review-content {
    color: #555;
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 15px;
}

/* Customer Photos */
.review-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
    max-width: 600px;
}

.review-img {
    width: 94px;
    height: 94px !important;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 2px solid #e0e0e0;
}

.review-img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #000;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-style: italic;
    font-size: 16px;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.ecoflow-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.ecoflow-modal.show {
    display: flex;
}

.ecoflow-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.ecoflow-modal-dialog {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 750px;
    max-height: 90vh;
}

.ecoflow-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.ecoflow-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ecoflow-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.ecoflow-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.ecoflow-modal-close:hover {
    color: #333;
}

.ecoflow-modal-body {
    padding: 30px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

body.ecoflow-modal-open {
    overflow: hidden;
}

/* ============================================
   FORM STYLES
   ============================================ */

.ecoflow-form-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ecoflow-form-group:last-of-type {
    border-bottom: none;
}

.ecoflow-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.ecoflow-form-control {
    width: -webkit-fill-available;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

.ecoflow-form-control:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.ecoflow-form-control.is-invalid {
    border-color: #dc3545;
}

textarea.ecoflow-form-control {
    min-height: 120px;
    resize: vertical;
}

/* ============================================
   STAR RATING
   ============================================ */

.ecoflow-star-rating {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;
}

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

.ecoflow-star-rating label {
    cursor: pointer;
    font-size: 32px;
    color: #ddd;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.ecoflow-star-rating label:hover,
.ecoflow-star-rating label:hover ~ label {
    color: #ffa500;
    transform: scale(1.1);
}

.ecoflow-star-rating input:checked ~ label {
    color: #ffa500;
}

.ecoflow-star-rating.is-invalid label {
    color: #ffcccc;
}

/* ============================================
   PHOTO UPLOAD
   ============================================ */

.ecoflow-photo-upload {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.ecoflow-upload-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #000;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.2);
}

.ecoflow-upload-btn:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.upload-hint {
    font-size: 13px;
    color: #999;
    margin: 10px 0 0 0;
}

.ecoflow-photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.preview-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

/* ============================================
   CHECKBOX STYLES
   ============================================ */

.ecoflow-form-check {
    margin: 30px 0;
}

.ecoflow-check-input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ecoflow-check-label {
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
}

.ecoflow-check-input.is-invalid {
    outline: 2px solid #dc3545;
}

/* Email Toggle */
.ecoflow-email-toggle {
    margin-top: 10px;
}

.ecoflow-email-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.ecoflow-email-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */

.ecoflow-invalid-feedback {
    display: none;
    font-size: 13px;
    color: #dc3545;
    padding: 8px 12px;
    background: #f8d7da;
    border-radius: 6px;
    border-left: 3px solid #dc3545;
    margin-top: 8px;
    animation: shake 0.3s;
}

.ecoflow-form-control.is-invalid ~ .ecoflow-invalid-feedback,
.ecoflow-star-rating.is-invalid ~ .ecoflow-invalid-feedback,
.ecoflow-check-input.is-invalid ~ .ecoflow-invalid-feedback {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */

.ecoflow-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #28a745;
    color: white;
    font-size: 36px;
    line-height: 60px;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-text {
    font-size: 16px;
    color: #155724;
    font-weight: 600;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.ecoflow-btn-submit {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #000, #000);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
    margin-top: 20px;
}

.ecoflow-btn-submit:hover {
    background: linear-gradient(135deg, #000, #141c1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 212, 170, 0.4);
}

.ecoflow-btn-submit:active {
    transform: translateY(0);
}

.ecoflow-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ecoflow-btn-submit.loading {
    background: #999;
}

.btn-spinner {
    display: none;
}

.ecoflow-btn-submit.loading .btn-text {
    display: none;
}

.ecoflow-btn-submit.loading .btn-spinner {
    display: inline-block;
}

/* ============================================
   ADMIN META BOX STYLES
   ============================================ */

.ecoflow-meta-row {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.ecoflow-meta-row label {
    width: 200px;
    font-weight: 600;
}

.ecoflow-meta-row input[type="text"],
.ecoflow-meta-row select {
    flex: 1;
    max-width: 400px;
}

.ecoflow-rating-stars {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
    justify-content: flex-end;
    align-items: center;
}

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

.ecoflow-rating-stars label {
    cursor: pointer;
    font-size: 24px;
    color: #ddd;
    transition: color 0.2s;
}

.ecoflow-rating-stars input:checked ~ label,
.ecoflow-rating-stars label:hover,
.ecoflow-rating-stars label:hover ~ label {
    color: #ffa500;
}

.ecoflow-rating-stars .rating-value {
    margin-left: 10px;
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

.ecoflow-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.ecoflow-images-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.ecoflow-image-item {
    position: relative;
}

.ecoflow-remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
}

.ecoflow-remove-image:hover {
    background: #c82333;
}

/* Admin list columns */
.column-ecoflow_rating {
    width: 120px;
}

.column-ecoflow_location {
    width: 150px;
}

.column-ecoflow_images {
    width: 80px;
    text-align: center;
}

.ecoflow-stars-admin {
    display: flex;
    gap: 2px;
    margin-bottom: 3px;
}

.ecoflow-stars-admin .dashicons-star-filled {
    color: #ffa500;
}

.ecoflow-stars-admin .dashicons-star-empty {
    color: #ddd;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .ecoflow-reviews-wrapper {
        padding: 15px;
    }
    
    .stats-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .btn-add-review {
        width: 100%;
        text-align: center;
    }
    
    .stats-sections {
        gap: 20px;
    }
    
    .ecoflow-modal-dialog {
        width: 95%;
        max-height: 95vh;
    }
    
    .ecoflow-modal-header {
        padding: 15px 20px;
    }
    
    .ecoflow-modal-title {
        font-size: 18px;
    }
    
    .ecoflow-modal-body {
        padding: 20px;
    }
    
    .ecoflow-star-rating label {
        font-size: 28px;
    }
    
    .review-images {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .review-img {
        height: 100px;
    }
    
    .ecoflow-photo-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .preview-img {
        height: 80px;
    }
    
    .ecoflow-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ecoflow-meta-row label {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .ecoflow-meta-row input[type="text"],
    .ecoflow-meta-row select {
        max-width: 100%;
    }
    .ecoflow-review-item {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .quick-stars {
        font-size: 18px;
    }
    
    .quick-info {
        font-size: 14px;
    }
    
    .stats-sections {
        flex-direction: column;
        gap: 10px;
    }
    
    .review-images {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .review-img {
        height: 80px;
    }
}
/* ============================================
   PHOTO MODAL - REVIEW DETAIL
   ============================================ */

.ecoflow-photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ecoflow-photo-modal.show {
    display: flex;
}

.ecoflow-photo-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1;
}

.ecoflow-photo-modal-content {
    position: relative;
    z-index: 2;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: white;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
}

.photo-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Sol taraf - FotoÄŸraf */
.photo-modal-left {
    flex: 0 0 60%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.photo-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* SaÄŸ taraf - Review DetaylarÄ± */
.photo-modal-right {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: white;
}

.modal-review-header {
    margin-bottom: 20px;
}

.modal-review-stars {
    display: flex;
    gap: 4px;
    color: #ffa500;
    font-size: 20px;
    margin-bottom: 10px;
}

.modal-review-date {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

.modal-review-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.modal-author-avatar {
    width: 40px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
}

.modal-author-info {
    flex: 1;
}

.modal-author-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.verified-badge {
    display: inline-flex;
    padding: 2px 8px;
    background: #ffa500;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.modal-review-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.modal-review-content {
    color: #555;
    line-height: 1.8;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 1024px) {
    .ecoflow-photo-modal-content {
        flex-direction: column;
        height: auto;
        max-height: 90vh;
    }
    
    .photo-modal-left {
        flex: 0 0 auto;
        max-height: 50vh;
        padding: 20px;
    }
    
    .photo-modal-right {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .photo-modal-left {
        padding: 15px;
        max-height: 40vh;
    }
    
    .photo-modal-right {
        padding: 15px;
    }
    
    .modal-review-title {
        font-size: 18px;
    }
}