* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.remove-btn {
      position: absolute;
      right: 10px;
      top: 10px;
      background: #d9534f;
      color: white;
      border: none;
      padding: 5px 10px;
      cursor: pointer;
      border-radius: 4px;
    }
     .reference-entry {
      border: 1px solid #ccc;
      padding: 15px;
      margin-bottom: 15px;
      border-radius: 5px;
      position: relative;
    }
.signature-container {
      border: 2px solid #ccc;
      border-radius: 5px;
      background: white;
      width: 100%;
      max-width: 500px;
      height: 200px;
    }
    .button-group {
      margin-top: 10px;
    }
    button {
      background-color: #007BFF;
      color: white;
      border: none;
      padding: 8px 15px;
      margin-right: 8px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
    }
    button.clear {
      background-color: #6c757d;
    }
    button:hover {
      opacity: 0.9;
    }
    #signatureData {
      margin-top: 10px;
      word-break: break-all;
      font-size: 12px;
      color: #555;
    }
body {
    font-family: "Arial", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    /* border-bottom: 2px solid #666;
    padding-bottom: 20px; */
}

.logo {
    margin-bottom: 15px;
    text-align: left;
}

.logo-image {
    width: 80px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    margin: 0;
}

.form-header h1 {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.section-header {
    background-color: #666;
    color: white;
    padding: 12px 20px;
    margin: 30px 0 20px 0;
    border-radius: 4px;
}

.section-header h2 {
    font-size: 1em;
    font-weight: bold;
    margin: 0;
    text-align: center;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.form-group {
    flex: 1;
    min-width: 0;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}
  .addresswith{
     width: 200px !important;
  }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    border-top: none;
    border-left: none;
    border-right: none;
     background-color: aliceblue;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #666;
     background-color: #fff;
}

.full-name-group {
    flex: 2;
}

.name-fields {
    display: flex;
    gap: 10px;
}

.name-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.name-field input {
    margin-bottom: 5px;
}

.name-field small {
    font-size: 11px;
    color: #666;
    text-align: center;
    font-style: italic;
}

.date-group {
    flex: 0 0 200px;
}

.address-group {
    flex: 1;
}

.address-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.address-line {
    display: flex;
    gap: 10px;
}

.address-line input:first-child {
    flex: 2;
}

.address-line input:last-child {
    flex: 1;
}

.professional-info {
    /* background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin: 25px 0;
    border: 1px solid #e9ecef; */
}

.professional-info h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
}

.checkbox-group {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    gap: 10px;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: auto;
    margin-right: 20px;
    transform: scale(1.2);
}

.checkmark,
.radio-mark {
    margin-left: -24px;
    margin-right: 12px;
}

.probation-group label {
    font-weight: normal;
    margin-bottom: 10px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.nearest-relative {
    /* background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px; */
    margin: 25px 0;
    /* border: 1px solid #e9ecef; */
}

.nearest-relative h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: #333;
}

.form-actions {
    margin-top: 40px;
    text-align: center;
    padding: 20px 0;
    border-top: 2px solid #eee;
    display: flex;
    gap: 15px;
    justify-content: center;
}


   .btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.commonp{
        color: black;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

/* .btn-success:hover {
    background-color: #1e7e34;
} */
.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}
/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background-color: #666;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #ddd;
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.preview-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #666;
}

.preview-section h4 {
    color: #666;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.preview-item {
    display: flex;
    margin-bottom: 8px;
}

.preview-label {
    font-weight: bold;
    min-width: 150px;
    color: #333;
}

.preview-value {
    flex: 1;
    color: #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    body{
        padding: 0px;
    }
 .form-group {
        width: 100% !important;
    }
    .addresswith {
    width: 100% !important;
}
    .container {
        padding: 20px;
        margin: 10px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .name-fields {
        flex-direction: column;
        gap: 15px;
    }

    .address-line {
        flex-direction: column;
        gap: 10px;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 15px;
    }

    .radio-group {
        flex-direction: row;
        gap: 10px;
    }

    .form-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 480px) {
    .form-header h1 {
        font-size: 1.8em;
    }

    .container {
        padding: 15px;
        margin: 5px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        padding: 20px;
        max-width: none;
    }

    .form-actions {
        display: none;
    }

    .modal {
        display: none;
    }

    .btn {
        display: none;
    }
}

/* Form Validation Styles */
/* .form-group input:invalid {
    border-color: #dc3545;
} */

/* .form-group input:valid {
    border-color: #28a745;
} */
  .required {
            color: #e74c3c;
        }
        
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input {
    border-color: #dc3545;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top-color: #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Employment History Styles */
.employment-history {
    margin-top: 30px;
}

.employment-entry {
    background-color: #f8f9fa;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    /* border-left: 4px solid #666; */
}

.employment-entry h3 {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.employment-entry .form-row {
    margin-bottom: 15px;
}

.employment-entry textarea {
    min-height: 80px;
    resize: vertical;
}

/* Motivation Section Styles */
.motivation-section {
    margin-top: 30px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.motivation-section label {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.motivation-section textarea {
    min-height: 120px;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
}

/* Enhanced responsive design for new sections */
@media (max-width: 768px) {
    .employment-entry {
        padding: 20px;
        margin-bottom: 20px;
    }

    .employment-entry h3 {
        font-size: 1.1em;
    }

    .motivation-section {
        padding: 20px;
    }

    .motivation-section textarea {
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .employment-entry {
        padding: 15px;
    }

    .motivation-section {
        padding: 15px;
    }
}

/* Work Availability Styles */
.work-availability {
    margin-top: 30px;
}

.work-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.work-schedule .checkbox-label {
      /* background-color: #f8f9fa; */
    padding: 10px 11px;
    /* border: 1px solid #dee2e6; */
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: justify;
}

.work-schedule .checkbox-label:hover {
    background-color: #e9ecef;
}

.work-schedule input[type="checkbox"]:checked + .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.work-schedule input[type="checkbox"]:checked {
    accent-color: #007bff;
}

.work-schedule .checkbox-label input[type="checkbox"]:checked ~ * {
    color: #007bff;
    font-weight: bold;
}

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

.conditional-field.show {
    display: block;
}

/* Enhanced responsive design for work availability */
@media (max-width: 768px) {
    .work-schedule {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .work-schedule .checkbox-label {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .work-schedule {
        grid-template-columns: 1fr;
    }
}

/* Education Section Styles */
.education-section {
    margin-top: 30px;
}

.education-entry {
    background-color: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    /* border-left: 3px solid #666; */
}

.education-entry .form-row {
    margin-bottom: 15px;
}

.education-entry .form-row:last-child {
    margin-bottom: 0;
}

/* Skills Section Styles */
.skills-section {
    margin-top: 30px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.skills-section label {
    font-size: 1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.skills-section textarea {
    min-height: 150px;
    resize: vertical;
    font-size: 14px;
    line-height: 1.5;
}

/* Additional Information Section Styles */
.additional-info-section {
    margin-top: 30px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.additional-info-section .form-group {
    margin-bottom: 20px;
}

.additional-info-section .form-row {
    margin-bottom: 15px;
}

/* Enhanced responsive design for new sections */
@media (max-width: 768px) {
    .education-entry {
        padding: 15px;
        margin-bottom: 15px;
    }

    .skills-section {
        padding: 20px;
    }

    .skills-section textarea {
        min-height: 120px;
    }

    .additional-info-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .education-entry {
        padding: 12px;
    }

    .skills-section {
        padding: 15px;
    }

    .skills-section textarea {
        min-height: 100px;
    }

    .additional-info-section {
        padding: 15px;
    }
}

/* Legal Eligibility Section Styles */
.legal-eligibility-section {
    margin-top: 30px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.legal-eligibility-section .form-group {
    margin-bottom: 20px;
}

.legal-eligibility-section label {
    font-size: 1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.legal-eligibility-section textarea {
    min-height: 80px;
    resize: vertical;
}

/* References Section Styles */
.references-section {
    margin-top: 30px;
}

.section-description {
    font-style: italic;
    color: #666;
    margin-bottom: 25px;
    font-size: 1em;
}

.reference-entry {
    background-color: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    /* border-left: 3px solid #007bff; */
}

.reference-entry h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    /* color: #007bff; */
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 8px;
}

.reference-entry .form-row {
    margin-bottom: 15px;
}

.reference-entry .form-row:last-child {
    margin-bottom: 0;
}

/* Military Service Section Styles */
.military-section {
    margin-top: 30px;
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    /* border-left: 4px solid #28a745; */
}

.military-section .form-row {
    margin-bottom: 15px;
}

.military-section .form-row:last-child {
    margin-bottom: 0;
}

/* Enhanced responsive design for new sections */
@media (max-width: 768px) {
    .legal-eligibility-section {
        padding: 20px;
    }

    .reference-entry {
        padding: 15px;
        margin-bottom: 15px;
    }

    .reference-entry h3 {
        font-size: 1em;
    }

    .military-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .legal-eligibility-section {
        padding: 15px;
    }

    .reference-entry {
        padding: 12px;
    }

    .military-section {
        padding: 15px;
    }
}

/* Previous Addresses Section Styles */
.previous-addresses-section {
    margin-top: 30px;
}

.address-history-entry {
    background-color: #f8f9fa;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    /* border-left: 3px solid #17a2b8; */
}

.address-history-entry .form-row {
    margin-bottom: 15px;
}

.address-history-entry .form-row:last-child {
    margin-bottom: 0;
}

/* Disclaimer and Signature Section Styles */
.disclaimer-section {
    margin-top: 40px;
    background-color: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 30px;
}

.disclaimer-text {
    margin-bottom: 30px;
    font-size: 1.1em;
    line-height: 1.6;
}

.disclaimer-text p {
    margin-bottom: 15px;
    color: #856404;
}

.disclaimer-text p:last-child {
    margin-bottom: 0;
}

.disclaimer-text strong {
    color: #721c24;
    font-weight: bold;
}

.signature-section {
    border-top: 2px solid #ffc107;
    padding-top: 25px;
    margin-top: 25px;
}

.signature-group {
    flex: 2;
}

.signature-field {
    font-family: "Courier New", monospace;
    font-size: 16px;
    font-style: italic;
    border: 2px solid #ffc107;
    background-color: #fffbf0;
}

.signature-field:focus {
    border-color: #856404;
    background-color: #fff;
}

/* Enhanced responsive design for new sections */
@media (max-width: 768px) {
    .address-history-entry {
        padding: 15px;
        margin-bottom: 15px;
    }

    .disclaimer-section {
        padding: 20px;
    }

    .disclaimer-text {
        font-size: 1em;
    }

    .signature-section .form-row {
        flex-direction: column;
    }

    .signature-group,
    .date-group {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .address-history-entry {
        padding: 12px;
    }

    .disclaimer-section {
        padding: 15px;
    }

    .disclaimer-text {
        font-size: 0.95em;
    }

    .signature-field {
        font-size: 14px;
    }
}
