/* Review Modal Styles */
.review-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.review-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.review-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.review-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #60C5D1 0%, #2c7fb8 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.review-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.review-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.review-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.review-modal-body {
    padding: 24px;
}

/* Form Styles */
#reviewForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #60C5D1;
    box-shadow: 0 0 0 3px rgba(96, 197, 209, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Rating Stars */
.rating-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-stars {
    display: flex;
    gap: 4px;
    cursor: pointer;
}

.rating-stars i {
    font-size: 24px;
    color: #d1d5db;
    transition: color 0.3s ease;
}

.rating-stars i.fas {
    color: #fbbf24;
}

.rating-text {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

/* Character Counter */
.char-count {
    text-align: right;
    font-size: 12px;
    color: #6b7280;
}

/* Photo Upload */
.photo-upload {
    position: relative;
}

.photo-upload input[type="file"] {
    display: none;
}

.photo-preview {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.photo-preview:hover {
    border-color: #60C5D1;
    background: #e0f7fa;
}

.photo-preview i {
    font-size: 32px;
    color: #9ca3af;
    margin-bottom: 8px;
    display: block;
}

.photo-preview span {
    font-size: 14px;
    color: #6b7280;
}

.photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.remove-photo {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.remove-photo:hover {
    background: #dc2626;
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #60C5D1 0%, #2c7fb8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(96, 197, 209, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .review-modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 20px;
    }

    .review-modal-header {
        padding: 20px;
    }

    .review-modal-header h3 {
        font-size: 20px;
    }

    .review-modal-body {
        padding: 20px;
    }

    #reviewForm {
        gap: 16px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 16px; /* iOS zoom prevention */
    }

    .rating-stars i {
        font-size: 20px;
    }

    .submit-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .review-modal-content {
        width: 98%;
        margin: 10px;
        border-radius: 12px;
    }

    .review-modal-header {
        padding: 16px;
        border-radius: 12px 12px 0 0;
    }

    .review-modal-header h3 {
        font-size: 18px;
    }

    .review-modal-body {
        padding: 16px;
    }

    #reviewForm {
        gap: 14px;
    }

    .form-group label {
        font-size: 13px;
    }

    .rating-stars i {
        font-size: 18px;
    }

    .photo-preview {
        padding: 16px;
    }

    .photo-preview i {
        font-size: 24px;
    }
}

/* RTL Support */
[dir="rtl"] .review-modal-content {
    direction: rtl;
}

[dir="rtl"] .rating-input {
    flex-direction: row-reverse;
}

[dir="rtl"] .char-count {
    text-align: left;
}

[dir="rtl"] .submit-btn {
    flex-direction: row-reverse;
}

/* Focus States */
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    outline: 2px solid #60C5D1;
    outline-offset: 2px;
}

.submit-btn:focus-visible {
    outline: 2px solid #2c7fb8;
    outline-offset: 2px;
}

/* Loading State */
.submit-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error Messages */
.testimonial-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

.testimonial-message.success {
    border-left: 4px solid #10b981;
}

.testimonial-message.error {
    border-left: 4px solid #ef4444;
}

.testimonial-message.info {
    border-left: 4px solid #3b82f6;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.testimonial-message.success .message-content i {
    color: #10b981;
}

.testimonial-message.error .message-content i {
    color: #ef4444;
}

.testimonial-message.info .message-content i {
    color: #3b82f6;
}

.message-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.message-close:hover {
    background: #f3f4f6;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .review-modal-content {
        background: #1f2937;
        color: white;
    }

    .review-modal-header {
        border-bottom-color: #374151;
    }

    .form-group label {
        color: #e5e7eb;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        background: #374151;
        border-color: #4b5563;
        color: white;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #3b82f6;
    }

    .rating-text {
        color: #9ca3af;
    }

    .photo-preview {
        background: #374151;
        border-color: #4b5563;
    }

    .photo-preview:hover {
        border-color: #3b82f6;
        background: #1e3a8a;
    }

    .testimonial-message {
        background: #374151;
        color: white;
    }

    .message-close {
        color: #9ca3af;
    }

    .message-close:hover {
        background: #4b5563;
    }
}
