/* Smart Review Router Frontend Styles */
.srr-widget {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.srr-step {
    display: none;
    text-align: center;
}

.srr-step.active {
    display: block;
    animation: srrFadeIn 0.5s ease;
}

@keyframes srrFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.srr-header h2 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.srr-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Location Selector */
.srr-location-selector {
    margin-bottom: 30px;
    text-align: left;
}

.srr-location-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.srr-location-selector select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.srr-location-selector select:focus {
    outline: none;
    border-color: #4a90e2;
}

/* Emoji Buttons */
.srr-emoji-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

.srr-emoji-button {
    background: none;
    border: 3px solid #e0e0e0;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.srr-emoji-button:hover:not(:disabled) {
    transform: scale(1.1);
    border-color: #4a90e2;
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.2);
}

.srr-emoji-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.srr-emoji-button.srr-happy {
    color: #27ae60;
}

.srr-emoji-button.srr-sad {
    color: #e74c3c;
}

.srr-instructions {
    color: #888;
    margin-top: 20px;
    font-size: 0.95rem;
}

/* Google Redirect */
.srr-google-redirect {
    background: linear-gradient(45deg, #4285f4, #34a853);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin: 20px 0;
}

.srr-google-redirect .srr-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.srr-google-redirect h2 {
    margin-bottom: 15px;
    color: white;
}

.srr-google-button {
    background: white;
    color: #4285f4;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.srr-google-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.srr-google-help {
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Feedback Form */
.srr-feedback-form {
    text-align: left;
}

.srr-feedback-intro {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
}

.srr-form-group {
    margin-bottom: 20px;
}

.srr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

/* Required field indicator */
.srr-required {
    color: #e74c3c;
    font-weight: bold;
}

.srr-form-group input,
.srr-form-group textarea,
.srr-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.srr-form-group input:focus,
.srr-form-group textarea:focus,
.srr-form-group select:focus {
    outline: none;
    border-color: #4a90e2;
}

.srr-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Form Actions */
.srr-form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.srr-submit-button {
    background: linear-gradient(45deg, #4a90e2, #7b68ee);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    margin-left: 10px;
}

.srr-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.srr-back-button {
    background: none;
    border: 2px solid #ccc;
    color: #666;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.srr-back-button:hover {
    border-color: #4a90e2;
    color: #4a90e2;
}

/* Success Message */
.srr-success-message {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.srr-success-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.srr-success-message h2 {
    margin-bottom: 15px;
    color: white;
}

/* Success Actions */
.srr-success-actions {
    margin-top: 20px;
}

.srr-close-button {
    background: white;
    color: #27ae60;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.srr-close-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Loading Overlay */
.srr-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.srr-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4a90e2;
    border-radius: 50%;
    animation: srrSpin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes srrSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 600px) {
    .srr-widget {
        padding: 30px 20px;
        margin: 20px;
        border-radius: 15px;
    }
    
    .srr-emoji-buttons {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .srr-emoji-button {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .srr-header h2 {
        font-size: 1.8rem;
    }
    
    .srr-form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .srr-submit-button {
        margin-left: 0;
        order: 2;
    }
    
    .srr-back-button {
        order: 1;
        align-self: flex-start;
    }
}

@media (max-width: 400px) {
    .srr-widget {
        padding: 20px 15px;
    }
    
    .srr-emoji-button {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
}

/* Accessibility */
.srr-emoji-button:focus,
.srr-google-button:focus,
.srr-submit-button:focus,
.srr-back-button:focus,
.srr-close-button:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .srr-widget {
        border: 2px solid #000;
    }
    
    .srr-emoji-button {
        border-width: 2px;
        border-color: #000;
    }
    
    .srr-form-group input,
    .srr-form-group textarea,
    .srr-form-group select {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .srr-step.active {
        animation: none;
    }
    
    .srr-emoji-button:hover:not(:disabled) {
        transform: none;
    }
    
    .srr-google-button:hover,
    .srr-submit-button:hover,
    .srr-close-button:hover {
        transform: none;
    }
    
    .srr-spinner {
        animation: none;
        border: 4px solid #4a90e2;
        border-top-color: transparent;
    }
}

/* Field help text */
.srr-field-help {
    font-size: 0.85rem;
    color: #666;
    margin: 5px 0 0 0;
    font-style: italic;
}

/* Simplified form styling */
.srr-feedback-form .srr-form-group {
    margin-bottom: 25px;
}

.srr-feedback-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* Focus improvements for simplified form */
.srr-feedback-form input:focus,
.srr-feedback-form textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
}

/* Required field styling */
.srr-feedback-form input[required],
.srr-feedback-form textarea[required] {
    border-left: 3px solid #e74c3c;
}

.srr-feedback-form input[required]:valid,
.srr-feedback-form textarea[required]:valid {
    border-left-color: #27ae60;
}

/* Form validation styling */
.srr-feedback-form input:invalid,
.srr-feedback-form textarea:invalid {
    box-shadow: none; /* Remove browser default */
}

.srr-feedback-form input[required]:focus:invalid,
.srr-feedback-form textarea[required]:focus:invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

/* Improved mobile layout for simplified form */
@media (max-width: 600px) {
    .srr-feedback-form .srr-form-group {
        margin-bottom: 20px;
    }
    
    .srr-feedback-form textarea {
        min-height: 100px;
    }
}