/**
 * eLearn Application Form Styles
 */

/* Container */
.elearn-app-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.elearn-app-header {
    text-align: center;
    margin-bottom: 30px;
}

.elearn-app-logo h1 {
    color: #0A6B3F;
    font-size: 32px;
    margin: 0 0 10px;
    font-weight: 700;
}

.elearn-app-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Progress Bar */
.elearn-app-progress {
    margin-bottom: 40px;
}

.elearn-app-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.elearn-app-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0A6B3F 0%, #F2A900 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.elearn-app-progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Form */
.elearn-app-form {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Step */
.elearn-app-step {
    animation: fadeIn 0.3s ease;
}

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

.elearn-app-step-title {
    color: #0A6B3F;
    font-size: 24px;
    margin: 0 0 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #F2A900;
}

/* Fields */
.elearn-app-field {
    margin-bottom: 25px;
}

.elearn-app-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 15px;
}

.elearn-app-label .required {
    color: #d32f2f;
    margin-left: 3px;
}

.elearn-app-input,
.elearn-app-select,
.elearn-app-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    background: #ffffff;
}

.elearn-app-input:focus,
.elearn-app-select:focus,
.elearn-app-textarea:focus {
    outline: none;
    border-color: #0A6B3F;
    box-shadow: 0 0 0 3px rgba(10, 107, 63, 0.1);
}

.elearn-app-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Radio & Checkbox */
.elearn-app-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.elearn-app-radio-label,
.elearn-app-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
}

.elearn-app-radio-label input,
.elearn-app-checkbox-label input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* File Upload */
.elearn-app-file {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.elearn-app-file:hover {
    border-color: #0A6B3F;
}

.file-info {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.file-preview {
    margin-top: 10px;
    font-size: 14px;
    color: #0A6B3F;
}

.char-count {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
    text-align: right;
}

/* Error Messages */
.error-message {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
}

.elearn-app-field.error .elearn-app-input,
.elearn-app-field.error .elearn-app-select,
.elearn-app-field.error .elearn-app-textarea {
    border-color: #d32f2f;
}

/* Navigation Buttons */
.elearn-app-navigation {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 40px;
}

.elearn-app-btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.elearn-app-btn-primary {
    background: #0A6B3F;
    color: #ffffff;
}

.elearn-app-btn-primary:hover {
    background: #085a33;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 107, 63, 0.3);
}

.elearn-app-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.elearn-app-btn-secondary:hover {
    background: #d0d0d0;
}

.elearn-app-btn-success {
    background: linear-gradient(135deg, #0A6B3F 0%, #F2A900 100%);
    color: #ffffff;
    font-size: 18px;
    padding: 16px 40px;
}

.elearn-app-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 107, 63, 0.4);
}

.elearn-app-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.elearn-app-success {
    background: #ffffff;
    padding: 60px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
}

.elearn-app-success h2 {
    color: #0A6B3F;
    font-size: 28px;
    margin: 0 0 15px;
}

.elearn-app-success p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0;
}

.elearn-app-success a {
    color: #0A6B3F;
    font-weight: 600;
}

/* Loading Overlay */
.elearn-app-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #0A6B3F;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.elearn-app-loading p {
    margin-top: 20px;
    font-size: 16px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .elearn-app-wrapper {
        padding: 15px;
        margin: 20px auto;
    }
    
    .elearn-app-form {
        padding: 25px 20px;
    }
    
    .elearn-app-logo h1 {
        font-size: 24px;
    }
    
    .elearn-app-step-title {
        font-size: 20px;
    }
    
    .elearn-app-navigation {
        flex-direction: column;
    }
    
    .elearn-app-btn {
        width: 100%;
    }
    
    .elearn-app-radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

/* Conditional Fields */
.elearn-app-field[data-conditional] {
    display: none;
}

.elearn-app-field[data-conditional].show {
    display: block;
}
