/**
 * Feedback Form Styles
 */

/* Feedback Form Styles */
.glowrev-feedback-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.glowrev-form-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 1.5rem;
}

.glowrev-feedback-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.glowrev-form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.05rem;
    position: relative;
}

.glowrev-form-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.glowrev-form-input,
.glowrev-form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 5px;
    box-sizing: border-box;
}

.glowrev-form-input:focus,
.glowrev-form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Enhanced field validation styles */
.glowrev-form-input.valid {
    border-color: #28a745;
    box-shadow: 0 0 3px rgba(40, 167, 69, 0.1);
}

.glowrev-form-input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 3px rgba(220, 53, 69, 0.1);
}

.glowrev-field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    padding: 5px 8px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    animation: slideDown 0.3s ease-out;
}

.glowrev-form-error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

/* Loading spinner styles */
.glowrev-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: glowrev-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes glowrev-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced focus states */
.glowrev-form-input:focus,
.glowrev-form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Submit button states */
.glowrev-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.glowrev-submit-btn:not(:disabled):hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
}

.glowrev-submit-btn:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(41, 128, 185, 0.3);
}

/* Enhanced character counter */
.glowrev-char-count {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
    margin-left: auto;
    display: block;
    text-align: right;
    transition: color 0.3s ease;
    font-weight: 600;
}

.glowrev-char-count.warning {
    color: #ffc107;
}

.glowrev-char-count.danger {
    color: #dc3545;
}

/* Enhanced rating styles */
.glowrev-rating-input label:hover {
    color: #ffc107;
    transform: scale(1.1);
    text-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.glowrev-rating-input input[type="radio"]:checked + label {
    color: #ffc107;
    transform: scale(1.15);
    text-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.glowrev-rating-input input[type="radio"]:focus + label {
    outline: 2px solid #3498db;
    outline-offset: 3px;
    border-radius: 50%;
}

/* JavaScript-based highlighting classes */
.glowrev-rating-input label.star-highlighted {
    color: #ffc107 !important;
    transform: scale(1.1) !important;
    text-shadow: 0 2px 6px rgba(255, 193, 7, 0.4) !important;
}

.glowrev-rating-input label.star-hovered {
    color: #ffc107 !important;
    transform: scale(1.1) !important;
    text-shadow: 0 2px 4px rgba(255, 193, 7, 0.3) !important;
}

/* File upload enhancements */
.glowrev-upload-container {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 0.5rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.glowrev-upload-container:hover {
    border-color: #3498db;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.glowrev-upload-container.dragover {
    border-color: #28a745;
    background: #e8f5e8;
}

.glowrev-upload-text {
    font-size: medium;
}

/* Form message enhancements */
.glowrev-form-message {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    display: block;
    font-weight: 500;
    animation: slideDown 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.glowrev-form-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
    box-shadow: 0 4px 12px rgba(212, 237, 218, 0.2);
}

.glowrev-form-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
    box-shadow: 0 4px 12px rgba(248, 215, 218, 0.2);
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .glowrev-feedback-form-wrapper {
        padding: 1.5rem;
        margin: 0 1rem;
        max-width: none;
        border-radius: 8px;
    }
    
    .glowrev-form-input,
    .glowrev-form-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.875rem;
    }
    
    .glowrev-upload-container {
        padding: 1.5rem;
    }
    
    .glowrev-upload-icon {
        font-size: 2.5rem;
    }
    
    .glowrev-upload-main {
        font-size: 0.9rem;
    }
    
    .glowrev-upload-sub {
        font-size: 0.8rem;
    }
    
    .glowrev-rating-input label {
        font-size: 2.2rem;
        padding: 0.75rem;
    }
    
    .glowrev-submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .glowrev-form-message {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .glowrev-feedback-form-wrapper {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .glowrev-form-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .glowrev-form-label {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }
    
    .glowrev-form-input,
    .glowrev-form-textarea {
        padding: 0.75rem;
        font-size: 16px;
    }
    
    .glowrev-upload-container {
        padding: 1.25rem;
    }
    
    .glowrev-upload-icon {
        font-size: 2rem;
    }
    
    .glowrev-upload-main {
        font-size: 0.85rem;
    }
    
    .glowrev-upload-sub {
        font-size: 0.75rem;
    }
    
    .glowrev-rating-input label {
        font-size: 2rem;
        padding: 0.5rem;
    }
    
    .glowrev-submit-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .glowrev-form-message {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }
}

/* Accessibility improvements */
.glowrev-form-input:focus,
.glowrev-form-textarea:focus,
.glowrev-rating-input input[type="radio"]:focus + label {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glowrev-feedback-form-wrapper {
        border: 2px solid #000;
    }
    
    .glowrev-form-input,
    .glowrev-form-textarea {
        border-width: 2px;
    }
    
    .glowrev-submit-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .glowrev-form-input,
    .glowrev-form-textarea,
    .glowrev-submit-btn,
    .glowrev-upload-container,
    .glowrev-rating-input label {
        transition: none;
        animation: none;
    }
    
    .glowrev-spinner {
        animation: none;
        border: 2px solid #007bff;
    }
}

/* File size warning styles */
.glowrev-file-warning {
    color: #dc3545;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    animation: fadeIn 0.3s ease-in-out;
}

.glowrev-file-warning strong {
    display: block;
    margin-bottom: 5px;
    font-size: 15px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glowrev-preview-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e1e8ed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.glowrev-rating-input {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.glowrev-rating-input label {
    cursor: pointer;
    font-size: 2.8rem;
    color: #ddd;
    transition: all 0.3s ease;
    display: inline-block;
    line-height: 1;
    user-select: none;
    position: relative;
    padding: 0.5rem;
}

/* Simple hover effects */
.glowrev-rating-input label:hover {
    color: #ffc107;
    transform: scale(1.1);
}

/* Simple checked state */
.glowrev-rating-input input[type="radio"]:checked + label {
    color: #ffc107;
    transform: scale(1.1);
}

/* Simple focus state */
.glowrev-rating-input input[type="radio"]:focus + label {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.glowrev-rating-input input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Ensure labels are positioned correctly after hidden inputs */
.glowrev-rating-input input[type="radio"] + label {
    position: relative;
    z-index: 1;
}

/* Rating feedback text */
.glowrev-rating-feedback {
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.glowrev-rating-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

/* Rating validation state */
.glowrev-rating-input.error {
    border: 1px solid #e74c3c;
    background: rgba(231, 76, 60, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

/* Success state */
.glowrev-rating-input.success {
    border: 1px solid #27ae60;
    background: rgba(39, 174, 96, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.glowrev-submit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.glowrev-submit-btn:hover {
    background: #2980b9;
}

.glowrev-form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    display: none;
}

.glowrev-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.glowrev-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Company and Designation field styles */
.glowrev-testimonial-company {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    margin: 5px 0;
    line-height: 1.4;
}

.glowrev-testimonial-designation {
    font-size: 13px;
    color: #868e96;
    font-style: italic;
    margin: 3px 0;
    line-height: 1.3;
}

.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Character counter styles */
.glowrev-char-count {
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
    margin-left: auto;
    display: block;
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glowrev-feedback-form-wrapper {
        padding: 1.5rem;
        margin: 0 1rem;
        max-width: none;
    }
    
    .glowrev-form-input,
    .glowrev-form-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .glowrev-upload-container {
        padding: 1.5rem;
    }
    
    .glowrev-upload-icon {
        font-size: 2.5rem;
    }
    
    .glowrev-upload-main {
        font-size: 0.9rem;
    }
    
    .glowrev-upload-sub {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .glowrev-feedback-form-wrapper {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .glowrev-form-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .glowrev-form-label {
        font-size: 0.9rem;
    }
    
    .glowrev-form-input,
    .glowrev-form-textarea {
        padding: 0.6rem;
        font-size: 16px;
    }
    
    .glowrev-upload-container {
        padding: 1.5rem;
    }
    
    .glowrev-upload-icon {
        font-size: 2rem;
    }
    
    .glowrev-upload-main {
        font-size: 0.85rem;
    }
    
    .glowrev-upload-sub {
        font-size: 0.75rem;
    }
    
    .glowrev-submit-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Honeypot field - hidden from users but visible to bots */
.glowrev-honeypot {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Inline style replacements */
.glowrev-error-text {
    color: #dc3545;
}

.glowrev-success-text {
    color: #28a745;
}

.glowrev-error-upload-text {
    color: #dc3545;
}

.glowrev-success-upload-text {
    color: #28a745;
}
