/* ============================================
   021 Electrician - Employee Application Form
   Front-End Styles
   ============================================ */

/* Reset & Base */
#eaf-application-wrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1a1a2e;
    line-height: 1.6;
    font-size: 15px;
}

#eaf-application-wrapper *,
#eaf-application-wrapper *::before,
#eaf-application-wrapper *::after {
    box-sizing: border-box;
}

/* Form Header - using high specificity to override theme styles */
#eaf-application-wrapper .eaf-form-header {
    text-align: center !important;
    padding: 0 0 30px 0 !important;
    background: #4a9ede !important;
    color: #ffffff !important;
    border-radius: 12px 12px 0 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
    border: none !important;
}

#eaf-application-wrapper .eaf-form-header .eaf-header-banner {
    width: 100% !important;
    padding: 0 !important;
    background: #ffffff !important;
    border: none !important;
    margin: 0 !important;
}

#eaf-application-wrapper .eaf-form-header .eaf-header-banner .eaf-header-logo {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

#eaf-application-wrapper .eaf-form-header h2 {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin: 20px 0 8px 0 !important;
    padding: 0 30px !important;
    color: #ffffff !important;
    letter-spacing: 0.5px !important;
    background: none !important;
    border: none !important;
    text-shadow: none !important;
    line-height: 1.3 !important;
}

#eaf-application-wrapper .eaf-form-header .eaf-company-name {
    font-size: 22px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    margin: 0 0 4px 0 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15) !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

#eaf-application-wrapper .eaf-form-header .eaf-subtitle {
    font-size: 14px !important;
    color: rgba(255,255,255,0.85) !important;
    margin: 0 0 20px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

#eaf-application-wrapper .eaf-form-header .eaf-header-notice {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    padding: 15px 20px !important;
    margin: 15px 30px 0 30px !important;
    text-align: left !important;
}

#eaf-application-wrapper .eaf-form-header .eaf-header-notice p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #ffffff !important;
    line-height: 1.5 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Form */
#eaf-application-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 0;
}

/* Sections / Fieldsets */
.eaf-section {
    border: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 30px 35px;
    margin: 0;
}

.eaf-section:last-of-type {
    border-bottom: none;
}

.eaf-section legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    padding: 0;
    margin-bottom: 20px;
    width: 100%;
}

.eaf-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    color: #ffffff;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.eaf-section-info {
    color: #64748b;
    font-size: 14px;
    margin: -10px 0 20px 0;
    padding: 10px 15px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #0f3460;
}

/* Grid System */
.eaf-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.eaf-col-3 { flex: 0 0 calc(25% - 12px); min-width: 0; }
.eaf-col-4 { flex: 0 0 calc(33.333% - 11px); min-width: 0; }
.eaf-col-6 { flex: 0 0 calc(50% - 8px); min-width: 0; }
.eaf-col-12 { flex: 0 0 100%; min-width: 0; }

@media (max-width: 768px) {
    .eaf-col-3,
    .eaf-col-4,
    .eaf-col-6 {
        flex: 0 0 100%;
    }

    .eaf-section {
        padding: 20px 18px;
    }

    .eaf-form-header {
        padding: 25px 18px;
    }

    .eaf-form-header h2 {
        font-size: 22px;
    }
}

/* Labels */
#eaf-application-wrapper label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
    letter-spacing: 0.2px;
}

.required {
    color: #dc2626;
    font-weight: 700;
}

/* Inputs */
#eaf-application-wrapper input[type="text"],
#eaf-application-wrapper input[type="email"],
#eaf-application-wrapper input[type="tel"],
#eaf-application-wrapper input[type="date"],
#eaf-application-wrapper input[type="number"],
#eaf-application-wrapper select,
#eaf-application-wrapper textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

#eaf-application-wrapper input:focus,
#eaf-application-wrapper select:focus,
#eaf-application-wrapper textarea:focus {
    outline: none;
    border-color: #0f3460;
    box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
}

#eaf-application-wrapper input::placeholder,
#eaf-application-wrapper textarea::placeholder {
    color: #94a3b8;
    font-style: italic;
}

#eaf-application-wrapper select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23334155' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

#eaf-application-wrapper textarea {
    resize: vertical;
    min-height: 80px;
}

/* Radio Groups */
.eaf-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.eaf-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    color: #475569;
}

.eaf-radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #0f3460;
    cursor: pointer;
}

/* Checkbox Grid */
.eaf-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    padding: 10px 0;
}

.eaf-checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    color: #475569;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.eaf-checkbox-grid label:hover {
    background: #eff6ff;
    border-color: #0f3460;
}

.eaf-checkbox-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0f3460;
    cursor: pointer;
    flex-shrink: 0;
}

/* Subsection Titles */
.eaf-subsection-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f3460;
    margin: 25px 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

/* Employer & Reference Blocks */
.eaf-employer-block,
.eaf-reference-block {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Important Notices */
.eaf-important-notice {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 25px;
}

.eaf-important-notice h4 {
    color: #991b1b;
    font-size: 16px;
    margin: 0 0 10px 0;
}

.eaf-important-notice p {
    color: #7f1d1d;
    font-size: 14px;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.eaf-important-notice p:last-child {
    margin-bottom: 0;
}

.eaf-notice-references {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}

.eaf-notice-references h4 {
    color: #92400e;
}

.eaf-notice-references p {
    color: #78350f;
}

.eaf-notice-references ul {
    margin: 10px 0;
    padding-left: 20px;
}

.eaf-notice-references ul li {
    color: #78350f;
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Criminal History Section */
.eaf-section-criminal {
    background: #fefefe;
}

/* Conditional Fields */
.eaf-conditional {
    display: none;
    animation: eafSlideDown 0.3s ease;
}

.eaf-conditional.eaf-visible {
    display: flex;
}

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

/* Due Diligence Statement */
.eaf-due-diligence-statement {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 25px;
}

.eaf-due-diligence-statement h4 {
    color: #1e3a5f;
    font-size: 17px;
    margin: 0 0 12px 0;
}

.eaf-due-diligence-statement p {
    color: #334155;
    font-size: 14px;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.eaf-due-diligence-statement ul {
    margin: 10px 0;
    padding-left: 20px;
}

.eaf-due-diligence-statement ul li {
    color: #334155;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Consent Checkboxes */
.eaf-consent-checkboxes {
    margin-bottom: 25px;
}

.eaf-consent-checkboxes h4 {
    color: #1a1a2e;
    font-size: 17px;
    margin: 0 0 8px 0;
}

.eaf-consent-checkboxes > p {
    color: #64748b;
    font-size: 14px;
    margin: 0 0 16px 0;
}

.eaf-checkbox-item {
    padding: 14px 18px;
    margin-bottom: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s, background 0.2s;
}

.eaf-checkbox-item:hover {
    border-color: #0f3460;
    background: #f0f4ff;
}

.eaf-checkbox-item label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-weight: 400 !important;
    font-size: 14px !important;
    color: #334155 !important;
    cursor: pointer;
    line-height: 1.5;
}

.eaf-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0f3460;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Data Protection */
.eaf-data-protection {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
}

.eaf-data-protection h4 {
    color: #1a1a2e;
    font-size: 16px;
    margin: 0 0 10px 0;
}

.eaf-data-protection p {
    color: #64748b;
    font-size: 13px;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.eaf-data-protection p:last-child {
    margin-bottom: 0;
}

/* Signature Section */
.eaf-signature-input {
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-size: 18px !important;
    font-style: italic;
    border-bottom: 2px solid #1a1a2e !important;
    border-radius: 0 !important;
    padding: 12px 14px !important;
}

/* Submit Section */
.eaf-submit-section {
    padding: 30px 35px;
    text-align: center;
}

.eaf-submit-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 20px;
}

.eaf-submit-notice p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

.eaf-submit-button {
    display: inline-block;
    padding: 16px 60px;
    background: linear-gradient(135deg, #0f3460, #1a1a2e);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.eaf-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 52, 96, 0.35);
}

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

.eaf-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Success Message */
#eaf-success-message {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.eaf-success-content {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.eaf-success-content h3 {
    color: #166534;
    font-size: 24px;
    margin: 0 0 15px 0;
}

.eaf-success-content p {
    color: #15803d;
    font-size: 15px;
    margin: 0 0 12px 0;
    line-height: 1.6;
}

/* Error Message */
#eaf-error-message {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.eaf-error-content {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.eaf-error-content h3 {
    color: #991b1b;
    font-size: 20px;
    margin: 0 0 10px 0;
}

.eaf-error-content p {
    color: #b91c1c;
    font-size: 14px;
    margin: 0 0 8px 0;
}

/* Validation Errors */
#eaf-application-wrapper input.eaf-error,
#eaf-application-wrapper select.eaf-error,
#eaf-application-wrapper textarea.eaf-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.eaf-field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Print Styles */
@media print {
    #eaf-application-wrapper {
        max-width: 100%;
    }

    .eaf-submit-section {
        display: none;
    }
}

/* CV File Upload */
.eaf-file-input {
    display: block;
    width: 100%;
    padding: 12px 15px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease;
    font-size: 14px;
}

.eaf-file-input:hover {
    border-color: #0f3460;
    background: #f0f4f8;
}

.eaf-file-input:focus {
    border-color: #0f3460;
    outline: none;
    background: #fff;
}

.eaf-file-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 12px 15px;
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    font-size: 14px;
}

.eaf-file-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.eaf-file-name {
    font-weight: 600;
    color: #2e7d32;
    word-break: break-all;
}

.eaf-file-size {
    color: #666;
    font-size: 13px;
    flex-shrink: 0;
}

.eaf-file-remove {
    margin-left: auto;
    background: #ef5350;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.eaf-file-remove:hover {
    background: #c62828;
}

.eaf-field-description {
    font-size: 13px;
    color: #777;
    margin-top: 5px;
    font-style: italic;
}
