/* Import common styles */
@import '../common/base.css';
@import '../common/layout.css';
@import '../common/components.css';

/* Field Agent specific styles */
body {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    min-height: 100vh;
    color: #1a202c;
}

.back-to-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #4a5568;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-back svg {
    width: 18px;
    height: 18px;
}

.btn-back:hover {
    background: #10b981;
    color: white;
    transform: translateX(-4px);
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 20px 40px;
}

.onboarding-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.onboarding-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #059669 0%, #10b981 40%, #f59e0b 100%);
    color: white;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.35);
}

.onboarding-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.12"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>') repeat;
    pointer-events: none;
}

.onboarding-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #ffffff 0%, #fef9c3 60%, #fde68a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    font-weight: 800;
}

.onboarding-header p {
    position: relative;
    z-index: 1;
    opacity: 0.92;
    font-size: 0.95rem;
}

.role-summary {
    background: linear-gradient(135deg, #d1fae5 0%, #f0fdf4 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #10b981;
    margin: 1.5rem 0;
}

.role-summary .highlight {
    color: #059669;
    font-weight: bold;
}

.deliverables-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.deliverables-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.deliverables-list li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    background: rgba(16, 185, 129, 0.1);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.btn-submit-onboarding {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-submit-onboarding:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

h4 {
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    padding-left: 0.5rem;
    border-left: 3px solid #10b981;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-header h1 {
    font-family: 'Sora', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-header p {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 400;
}

.application-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.section-title {
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid #10b981;
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 2px;
}

.conditional-field {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.conditional-field.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.declaration-box {
    background: linear-gradient(135deg, #fef5e7, #fed7aa);
    padding: 30px;
    border-radius: 16px;
    border: 2px solid #f6ad55;
    margin: 40px 0;
}

.declaration-box h3 {
    color: #c05621;
    margin-bottom: 16px;
}

.declaration-box ul {
    margin: 20px 0;
    padding-left: 20px;
}

.declaration-box li {
    margin-bottom: 8px;
    color: #744210;
}

.submit-section {
    text-align: center;
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f0fff4, #c6f6d5);
    border-radius: 16px;
}

.btn-submit {
    padding: 16px 40px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    font-family: 'Sora', sans-serif;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.checkbox-agreement { 
    justify-content: flex-start; 
    align-items: flex-start; 
    padding: 15px;
    display: flex;
    gap: 0.75rem;
}

.checkbox-agreement input[type="checkbox"] { 
    margin: 0;
    margin-top: 0.125rem;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-agreement label { 
    margin: 0;
    line-height: 1.5;
    flex: 1;
    cursor: pointer;
}

.subsection {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.subsection h4 {
    color: #4a5568;
    margin-bottom: 16px;
    font-size: 1.1rem;
    font-weight: 600;
}

.review-note { 
    margin-top: 16px; 
    color: #059669; 
    font-weight: 500; 
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Form Row Layout */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* Radio and Checkbox Groups */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-item, .checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-item input[type="radio"],
.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.radio-item label,
.checkbox-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

@media (max-width: 768px) {
    .form-container {
        padding: 80px 16px 20px;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .application-form {
        padding: 24px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Input Validation Error Styling */

/* Error state - red border and light red background */
.input-error,
input.input-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

/* Error state focus - maintain error styling when focused */
.input-error:focus,
input.input-error:focus {
    outline: none !important;
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1) !important;
}

/* Error message text styling */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    font-weight: 500;
}

/* Success state - green border for valid inputs */
input:valid:not(:placeholder-shown):not(.input-error),
select:valid:not(.input-error),
textarea:valid:not(.input-error) {
    border-color: #28a745;
}

/* Enhanced transitions for all input states */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
