/* Anafartalar Job Application Form - Frontend Styles */

.anaf-job-form-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Progress Bar */
.anaf-progress-bar {
    margin-bottom: 40px;
}

.anaf-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.anaf-step {
    flex: 1;
    min-width: 80px;
    text-align: center;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.anaf-step span {
    display: block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: bold;
    margin: 0 auto 5px;
    transition: all 0.3s ease;
}

.anaf-step.active span {
    background: #3498db;
    color: #fff;
}

.anaf-step.completed span {
    background: #27ae60;
    color: #fff;
}

.anaf-step.active {
    color: #3498db;
    font-weight: 600;
}

.anaf-step.completed {
    color: #27ae60;
}

.anaf-progress-line {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.anaf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #27ae60);
    transition: width 0.3s ease;
}

/* Form Steps */
.anaf-form-step {
    display: none;
}

.anaf-form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.anaf-form-step h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.anaf-form-step h3 {
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Form Groups */
.anaf-form-group {
    margin-bottom: 20px;
}

.anaf-form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.anaf-form-group input[type="text"],
.anaf-form-group input[type="email"],
.anaf-form-group input[type="tel"],
.anaf-form-group input[type="date"],
.anaf-form-group input[type="number"],
.anaf-form-group textarea,
.anaf-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.anaf-form-group input[type="file"] {
    padding: 8px;
}

.anaf-form-group input:focus,
.anaf-form-group textarea:focus,
.anaf-form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.anaf-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.anaf-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

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

/* Radio and Checkbox */
.anaf-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.anaf-radio-group label {
    display: inline-flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
    padding: 5px;
    min-height: 44px; /* Touch target size */
}

.anaf-radio-group input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.anaf-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 5px;
    min-height: 44px; /* Touch target size */
}

.anaf-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 3px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    min-width: 20px;
}

.anaf-checkbox-label span {
    flex: 1;
}

/* Required */
.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Help Text */
.anaf-help-text {
    display: block;
    font-size: 13px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Conditional Fields */
.anaf-conditional {
    display: none;
}

/* Navigation Buttons */
.anaf-form-navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.anaf-btn {
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.anaf-btn-prev {
    background: #95a5a6;
    color: #fff;
}

.anaf-btn-prev:hover {
    background: #7f8c8d;
}

.anaf-btn-next {
    background: #3498db;
    color: #fff;
}

.anaf-btn-next:hover {
    background: #2980b9;
}

.anaf-btn-submit {
    background: #27ae60;
    color: #fff;
}

.anaf-btn-submit:hover {
    background: #229954;
}

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

/* Messages */
.anaf-form-message {
    margin-top: 30px;
    padding: 15px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.anaf-form-message:not(:empty) {
    display: block;
}

.anaf-form-message.anaf-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.anaf-form-message.anaf-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Error States */
.anaf-error {
    border-color: #e74c3c !important;
    background-color: #fff5f5;
}

.anaf-error-message {
    display: block;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 600;
    padding: 5px;
}

/* Disable smooth scroll globally - only enable during navigation */
* {
    scroll-behavior: auto !important;
}

/* Smooth scrolling only when navigating form steps */
html.anaf-smooth-scroll,
html.anaf-smooth-scroll * {
    scroll-behavior: smooth !important;
}

.anaf-job-form-wrapper {
    scroll-margin-top: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .anaf-job-form-wrapper {
        padding: 20px 15px;
        margin: 20px 10px;
        border-radius: 6px;
    }
    
    .anaf-progress-steps {
        font-size: 10px;
        gap: 5px;
    }
    
    .anaf-step {
        min-width: 70px;
    }
    
    .anaf-step span {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .anaf-form-step h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .anaf-form-step h3 {
        font-size: 16px;
        margin-top: 25px;
    }
    
    .anaf-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .anaf-form-row .anaf-form-group {
        margin-bottom: 15px;
    }
    
    .anaf-form-group input[type="text"],
    .anaf-form-group input[type="email"],
    .anaf-form-group input[type="tel"],
    .anaf-form-group input[type="date"],
    .anaf-form-group input[type="number"],
    .anaf-form-group textarea,
    .anaf-form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 10px;
    }
    
    .anaf-radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .anaf-form-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .anaf-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .anaf-job-form-wrapper {
        padding: 15px 10px;
        margin: 10px 5px;
    }
    
    .anaf-progress-bar {
        margin-bottom: 30px;
    }
    
    .anaf-progress-steps {
        gap: 3px;
    }
    
    .anaf-step {
        font-size: 8px;
        min-width: 40px;
        padding: 2px;
    }
    
    .anaf-step span {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .anaf-form-step h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .anaf-form-step h3 {
        font-size: 15px;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    
    .anaf-form-group {
        margin-bottom: 15px;
    }
    
    .anaf-form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .anaf-help-text {
        font-size: 12px;
    }
}

/* Landscape mode optimization for small devices */
@media (max-width: 768px) and (orientation: landscape) {
    .anaf-progress-steps {
        margin-bottom: 10px;
    }
    
    .anaf-step {
        font-size: 9px;
        min-width: 60px;
    }
    
    .anaf-step span {
        width: 26px;
        height: 26px;
        line-height: 26px;
        font-size: 11px;
    }
}
