/* Frontend Survey Styles */
.advanced-survey-container {
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.survey-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
}

.survey-question {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    animation: fadeInUp 0.6s ease;
}

.survey-question:last-of-type {
    border-bottom: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.survey-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 12px;
}

.survey-label .required {
    color: #dc3545;
    margin-right: 3px;
}

.survey-input,
.survey-textarea,
.survey-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: Tahoma, Arial, sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

.survey-input:focus,
.survey-textarea:focus,
.survey-select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.survey-textarea {
    resize: vertical;
    min-height: 100px;
}

.survey-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.survey-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.survey-option:hover {
    background: #e9ecef;
    transform: translateX(-5px);
    border-color: #667eea;
}

.survey-option input[type="radio"],
.survey-option input[type="checkbox"] {
    margin-left: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.survey-option span {
    font-size: 15px;
    color: #333;
}

/* Conditional Questions */
.conditional-question {
    margin-right: 35px;
    margin-top: 15px;
    padding: 15px;
    background: #fff9e6;
    border-right: 4px solid #ffc107;
    border-radius: 8px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
        padding-top: 15px;
        padding-bottom: 15px;
    }
}

.conditional-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* Star Rating */
.rating-stars {
    display: flex;
    gap: 8px;
    font-size: 32px;
    direction: ltr;
    justify-content: flex-end;
}

.star {
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star:hover,
.star.active {
    color: #ffd700;
    transform: scale(1.2);
}

.star.active {
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {
    0%, 100% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1.4);
    }
}

/* Submit Button */
.survey-submit {
    text-align: center;
    margin-top: 30px;
}

.survey-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.survey-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.survey-button:active {
    transform: translateY(0);
}

.survey-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Messages */
.survey-message {
    margin-top: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.survey-message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.survey-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.survey-notice {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #ffeeba;
}

/* Responsive Design */
@media (max-width: 768px) {
    .advanced-survey-container {
        margin: 20px 10px;
        padding: 15px;
    }
    
    .survey-form {
        padding: 20px;
    }
    
    .survey-label {
        font-size: 15px;
    }
    
    .survey-input,
    .survey-textarea,
    .survey-select {
        font-size: 14px;
    }
    
    .survey-button {
        padding: 12px 35px;
        font-size: 16px;
    }
    
    .rating-stars {
        font-size: 28px;
    }
    
    .conditional-question {
        margin-right: 20px;
    }
}

/* Print Styles */
@media print {
    .advanced-survey-container {
        box-shadow: none;
        background: white;
    }
    
    .survey-button {
        display: none;
    }
}
