/* Review Modal Styles */
.review-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.review-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.review-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.review-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.review-modal-header h3 i {
    color: #ffc107;
    margin-right: 10px;
}

.review-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.review-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.review-modal-body {
    padding: 30px;
}

.review-form-group {
    margin-bottom: 25px;
}

.review-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.review-form-group label i {
    color: #666;
    margin-right: 8px;
    width: 16px;
}

.review-form-group input[type="text"],
.review-form-group input[type="email"],
.review-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.review-form-group input[type="text"]:focus,
.review-form-group input[type="email"]:focus,
.review-form-group textarea:focus {
    outline: none;
    border-color: #429688;
    box-shadow: 0 0 0 3px rgba(66, 150, 136, 0.1);
}

.review-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.review-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85rem;
}

/* Star Rating Styles */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    margin-bottom: 5px;
}

.star-rating-input input {
    display: none;
}

.star-rating-input .star-label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.1s ease;
    margin-bottom: 0;
    font-weight: normal;
}

.star-rating-input .star-label:hover,
.star-rating-input input:checked ~ .star-label,
.star-rating-input .star-label:hover ~ .star-label {
    color: #ffc107;
    transform: scale(1.1);
}

.rating-text {
    color: #666;
    font-style: italic;
}

/* Character Counter */
.char-counter {
    text-align: right;
    color: #999;
}

.char-counter.warning {
    color: #ff6b6b;
}

/* Image Upload Styles */
.image-upload-container {
    position: relative;
}

.image-input {
    display: none;
}

.image-upload-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background-color: #f9fafb;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.image-upload-button:hover {
    border-color: #429688;
    background-color: #f0f9ff;
    color: #429688;
}

.image-upload-button i {
    font-size: 1.2rem;
}

.image-preview {
    position: relative;
    margin-top: 15px;
}

.image-preview img {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #e1e5e9;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background-color: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Form Actions */
.review-form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: #429688;
    color: white;
    box-shadow: 0 2px 4px rgba(66, 150, 136, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background-color: #357a6f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 150, 136, 0.3);
}

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

.btn-secondary {
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background-color: #e9ecef;
    color: #333;
}

/* Success/Error Messages */
.review-success,
.review-error {
    text-align: center;
    padding: 40px 20px;
}

.success-icon,
.error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-icon {
    color: #28a745;
}

.error-icon {
    color: #dc3545;
}

.review-success h4,
.review-error h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.review-success p,
.review-error p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Loading State */
.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Image Processing State */
.processing-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #429688;
    font-weight: 600;
    font-size: 0.9rem;
}

.processing-text i {
    color: #429688;
}

.image-upload-button.processing {
    border-color: #429688;
    background-color: #f0f9ff;
    color: #429688;
    cursor: wait;
}

/* Processed Image Indicator */
.image-preview.processed {
    position: relative;
}

.image-preview.processed::before {
    content: "✓ Optimized";
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(66, 150, 136, 0.9);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 1;
}

/* Add Review Button */
.add-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #429688, #357a6f);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(66, 150, 136, 0.3);
    margin: 20px auto;
    display: block;
    width: fit-content;
}

.add-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 150, 136, 0.4);
    background: linear-gradient(135deg, #357a6f, #2d6960);
}

.add-review-btn i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .review-modal {
        padding: 10px;
    }
    
    .review-modal-content {
        max-height: 95vh;
    }
    
    .review-modal-header,
    .review-modal-body {
        padding: 20px;
    }
    
    .star-rating-input .star-label {
        font-size: 1.8rem;
    }
    
    .review-form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .image-preview img {
        width: 120px;
        height: 120px;
    }
}