/**
 * Cuttalo Reviews Modal Styles
 */

/* Modal Container */
.cuttalo-review-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Modal Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

/* Modal Content */
.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: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cuttalo-review-modal.active .modal-content {
    transform: scale(1);
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #666;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1;
}

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

/* Modal Body */
.modal-body {
    overflow-y: auto;
    max-height: 90vh;
    padding: 0;
}

/* Compact Form Wrapper */
.cuttalo-review-form-wrapper.compact {
    padding: 30px;
    background: white;
    margin: 0;
}

.cuttalo-review-form-wrapper.compact h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    padding-right: 30px; /* Space for close button */
}

/* Compact Form Styles */
.compact-form .form-row {
    margin-bottom: 18px;
}

.compact-form .form-row label {
    margin-bottom: 6px;
    font-size: 14px;
}

.compact-form input[type="text"],
.compact-form input[type="email"],
.compact-form textarea {
    padding: 8px 12px;
    font-size: 14px;
}

.compact-form textarea {
    min-height: 80px;
}

/* Form Row Group */
.form-row-group {
    display: flex;
    gap: 15px;
    margin-bottom: 18px;
}

.form-row.half {
    flex: 1;
    margin-bottom: 0;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.cuttalo-reviews-button.primary {
    background: #0073aa;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cuttalo-reviews-button.primary:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cuttalo-reviews-button.secondary {
    background: transparent;
    color: #666;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cuttalo-reviews-button.secondary:hover {
    background: #f8f9fa;
    border-color: #999;
}

/* Cancel button specific */
.cancel-review {
    margin-left: auto;
}

/* Rating Input in Modal */
.compact-form .cuttalo-reviews-rating-input .star {
    font-size: 24px;
}

/* Character Count in Modal */
.compact-form .character-count {
    font-size: 12px;
}

/* Image Preview in Modal */
.compact-form .image-preview-container {
    gap: 8px;
}

.compact-form .image-preview {
    width: 80px;
    height: 80px;
}

/* Description text */
.compact-form .description {
    font-size: 12px;
}

/* Messages in Modal */
.compact-form .form-messages {
    margin-top: 15px;
}

.compact-form .success-message,
.compact-form .error-message {
    padding: 10px 12px;
    font-size: 14px;
}

/* Loading state */
.compact-form button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 600px) {
    .modal-content {
        margin: 10px;
        max-height: 100vh;
    }
    
    .cuttalo-review-form-wrapper.compact {
        padding: 20px;
    }
    
    .form-row-group {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row.half {
        margin-bottom: 18px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cuttalo-reviews-button.primary,
    .cuttalo-reviews-button.secondary {
        width: 100%;
        text-align: center;
    }
    
    .cancel-review {
        margin-left: 0;
    }
}

/* Animation for modal appearance */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cuttalo-review-modal.active .modal-content {
    animation: modalFadeIn 0.3s ease forwards;
}