/* ============================================
   STEP4 STYLES - Tous les styles isolés sous #step4
   pour éviter les conflits avec d'autres composants
   ============================================ */

/* Main container */
#step4 {
    display: none;
}

/* Alert warning */
#step4 .alert-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

#step4 .alert-warning > div:first-child {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

#step4 .alert-warning i.fa-exclamation-triangle {
    font-size: 24px;
    color: #856404;
    margin-right: 15px;
}

#step4 .alert-warning h5 {
    margin: 0;
    color: #856404;
    font-weight: 600;
}

#step4 .alert-warning p {
    margin: 10px 0;
    color: #856404;
    font-size: 16px;
    line-height: 1.6;
}

/* Instruction text */
#step4 .step4-instruction {
    text-align: center;
    font-size: 18px;
    color: #01A6C7;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Signature options container */
#step4 .signature-options {
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Option cards */
#step4 .option-card {
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    height: 100%;
    transition: all 0.3s;
}

#step4 .option-card:hover {
    border-color: #01A6C7;
    background: #f0f8ff;
}

#step4 .option-card.selected {
    border: 2px solid #01A6C7;
    background: #f0f8ff;
}

#step4 .option-card i {
    font-size: 24px;
    color: #666;
    margin-bottom: 10px;
}

#step4 .option-card h6 {
    font-weight: 700;
    color: #333;
}

#step4 .option-card p {
    font-size: 12px;
    color: #666;
    margin-bottom: 0;
}

#step4 .option-card input[type="radio"] {
    display: none;
}

/* Messages (Email and Post) */
#step4 #msg-email,
#step4 #msg-post {
    display: none;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

#step4 #msg-email i,
#step4 #msg-post i {
    color: #01A6C7;
    font-size: 20px;
    margin-bottom: 10px;
}

#step4 #msg-email p,
#step4 #msg-post p {
    font-size: 16px;
    color: #333;
}

/* Signature pad */
#step4 #signPad {
    display: none;
    text-align: center;
    margin-bottom: 20px;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}



#step4 #signatureImg {
    display: none;
}

/* Signature buttons */
#step4 #signature-buttons {
    display: none;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Bouton Löschen - pointer-events géré par CSS */
#step4 #loschen-button,
#step4 .step4-btn-clear {
    pointer-events: auto !important;
}

/* Boutons einreichen - même style pour tous */
#step4 #btn-online-submit,
#step4 #btn-email-submit,
#step4 #btn-post-submit {
    font-size: 18px;
    padding: 12px 30px;
}

/* Printable area styles */
#step4 #printableArea .container-fluid {
    width: 100% !important;
}

#step4 #printableArea .row {
    display: flex;
    flex-wrap: wrap;
}

#step4 #printableArea .top-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: start;
}

#step4 #printableArea .heading-1 {
    color: #01A6C7;
    font-family: sans-serif;
    margin-bottom: 10px;
    font-weight: 500;
}

#step4 #printableArea .sub-heading {
    margin: 0;
    font-family: sans-serif;
}

#step4 #printableArea .top-logo-sec {
    display: flex;
}

#step4 #printableArea .logo-img {
    max-width: 250px;
    width: 100%;
    min-width: 100px;
}

/* Table styles */
#step4 #printableArea table {
    width: 100%;
    border: 1px solid #000;
}

#step4 #printableArea table td {
    height: 50px;
    border: 1px solid var(--sky-blu);
    padding: 0px 10px;
}

#step4 #printableArea table th {
    height: 40px;
    border-bottom: 1px solid #000;
    padding: 5px;
}

#step4 #printableArea .multiple-checkboxes {
    display: flex;
    max-width: 100%;
}

#step4 #printableArea .checkbox-wrap {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

#step4 #printableArea .checkbox {
    border: 2px solid #01A6C7;
    text-align: center;
    color: #01A6C7;
    height: 25px;
    width: 25px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#step4 #printableArea .checkbox-td {
    display: flex;
    justify-content: center;
    align-items: center;
}

#step4 #printableArea label {
    font-weight: 600;
    margin-right: 5px;
}

/* Application div */
#step4 #printableArea .application-div {
    display: flex;
    align-items: flex-start;
    height: 100%;
    border: 1px solid;
    padding: 10px;
}

#step4 #printableArea .application-div p {
    margin: 0;
}

/* Table list form */
#step4 #printableArea .table-list-form table {
    width: 100%;
    margin-top: 30px;
    text-align: center;
    border: 1px solid #000;
}

/* Reusable table */
#step4 #printableArea .reuseable-table table {
    width: 100%;
    margin-top: 30px;
    text-align: center;
    border: 1px solid #000;
}

/* Table below content */
#step4 #printableArea .table-below-content {
    padding: 10px;
}

#step4 #printableArea .table-below-content p {
    line-height: 28px;
}

/* Date and signature wrap */
#step4 #printableArea .date_sign_wrap {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 0 10px;
}

#step4 #printableArea .date,
#step4 #printableArea .sign {
    text-align: center;
    min-width: 200px;
    border-top: 2px solid;
    padding: 10px;
    margin-top: 50px;
}

#step4 #printableArea .sign > div {
    margin-bottom: 10px;
}

#step4 #printableArea .date label,
#step4 #printableArea .sign label {
    font-weight: 600;
    margin-right: 5px;
    padding: 9px 0px;
}

/* Bottom table */
#step4 #printableArea .bottom-table {
    margin-top: 50px;
    border: 2px solid #d95053;
    padding: 0px 15px 15px 15px;
}

#step4 #printableArea .overlap-heading {
    text-align: center;
    margin-top: -10px;
}

#step4 #printableArea .overlap-heading h3 {
    max-width: 570px;
    background: #fff;
    margin: auto;
}

#step4 #printableArea .overlap-heading small {
    color: #d95053;
}

/* Attached date sign wrap */
#step4 #printableArea .attached-date-sign-wrap {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    font-size: 14px;
}

#step4 #printableArea .text-field {
    min-width: 200px;
    border-bottom: 2px solid #000;
    display: inline-block;
    margin-left: 20px;
}

/* Bottom contact list */
#step4 #printableArea .bottom-contact-list {
    list-style-type: none;
    display: flex;
    justify-content: space-between;
    padding: 0;
}

#step4 #printableArea .bottom-contact-list li {
    font-size: 12px;
}

/* Alternative table styles (for non-assemble route) */
#step4 #printableArea .table {
    width: 100%;
    margin: 0 auto;
    padding: 10px;
}

#step4 #printableArea .table h5 {
    font-size: 24px;
    color: var(--dark-blue);
    font-weight: 100;
    margin: 0;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

#step4 #printableArea .table h3 {
    font-size: 30px;
    color: var(--dark-blue);
    font-weight: 400;
    margin: 0;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

#step4 #printableArea .table h6 {
    font-size: 24px;
    color: var(--sky-blu);
    margin-bottom: 0;
    font-weight: 200;
    margin-top: 10px;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

#step4 #printableArea .table p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: var(--dark-blue);
    margin-top: 0px;
}

#step4 #printableArea .table td[style*="text-align: right"] {
    text-align: right;
}

/* Title name checkboxes */
#step4 #printableArea #title_name_für_pk,
#step4 #printableArea #title_name_her_pk {
    border: 2px solid #01A6C7;
    text-align: center;
    color: #01A6C7;
    height: 25px;
    width: 25px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form inputs */
#step4 #printableArea input[type="text"] {
    border-bottom: 2px solid #6a6a6a;
    border-left: none;
    border-right: none;
    border-top: none;
}

/* Pflegegrad checkboxes */
#step4 #printableArea .pflegegr {
    border: 2px solid #01A6C7;
    text-align: center;
    color: #01A6C7;
    height: 25px;
    width: 25px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Package styles */
#step4 #printableArea .package-item {
    display: flex;
    width: 50%;
    float: left;
    margin: 30px 0 20px 0;
}

#step4 #printableArea .package-item img {
    width: 80px;
    border-right: 2px solid #0d9bda;
    padding-right: 10px;
}

#step4 #printableArea .package-content {
    flex-grow: 1;
    padding: 0 5px;
}

#step4 #printableArea .package-checkbox {
    border: 2px solid #01A6C7;
    text-align: center;
    color: #01A6C7;
    height: 25px;
    width: 25px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#step4 #printableArea .package-details {
    width: 30%;
    float: left;
    padding-left: 30px;
}

#step4 #printableArea .package-details span {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    display: block;
    padding: 2px 2px 0 0;
}

#step4 #printableArea .package-products {
    width: 60%;
    float: left;
}

#step4 #printableArea .package-products span {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    display: block;
    padding: 2px 2px 0 0;
}

/* Inner table */
#step4 #printableArea .inner-tabel {
    width: 100%;
}

#step4 #printableArea .inner-tabel td {
    display: flex;
    max-width: 100%;
}

#step4 #printableArea .inner-tabel label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #6a6a6a;
}

#step4 #printableArea .inner-tabel .checkbox-option {
    display: flex;
    align-items: center;
    margin-right: 10px;
    color: #6a6a6a;
}

#step4 #printableArea .inner-tabel .checkbox-option .checkbox {
    border: 2px solid #01A6C7;
    text-align: center;
    color: #01A6C7;
    height: 25px;
    width: 25px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Text styles */
#step4 #printableArea .text-small {
    font-size: 14px;
    margin-bottom: 5px;
    font-family: Arial, Helvetica, sans-serif;
    color: #6a6a6a;
}

#step4 #printableArea .text-center-small {
    font-size: 12px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    color: #6a6a6a;
}

/* Printable Area - Additional styles for tables and forms */
#step4 #printableArea .container-fluid {
    width: 100% !important;
}

#step4 #printableArea .row {
    display: flex;
    flex-wrap: wrap;
}

#step4 #printableArea .top-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: start;
}

#step4 #printableArea .heading-1 {
    color: #01A6C7;
    font-family: sans-serif;
    margin-bottom: 10px;
    font-weight: 500;
}

#step4 #printableArea .sub-heading {
    margin: 0;
    font-family: sans-serif;
}

#step4 #printableArea .top-logo-sec {
    display: flex;
}

#step4 #printableArea .logo-img {
    max-width: 250px;
    width: 100%;
    min-width: 100px;
}

#step4 #printableArea .table-form table {
    width: 100%;
    border: 1px solid #000;
}

#step4 #printableArea .table-form table td {
    height: 50px;
    border: 1px solid var(--sky-blu);
    padding: 0px 10px;
}

#step4 #printableArea .table-form table td.multiple-checkboxes {
    display: flex;
    max-width: 100%;
}

#step4 #printableArea .table-form table td.checkbox-td {
    display: flex;
    justify-content: center;
    align-items: center;
}

#step4 #printableArea .table-form table label {
    font-weight: 600;
    margin-right: 5px;
}

#step4 #printableArea .application-div {
    display: flex;
    align-items: flex-start;
    height: 100%;
    border: 1px solid;
    padding: 10px;
}

#step4 #printableArea .application-div p {
    margin: 0;
}

#step4 #printableArea .table-list-form table {
    width: 100%;
    margin-top: 30px;
    text-align: center;
    border: 1px solid #000;
}

#step4 #printableArea .table-list-form table th {
    height: 40px;
    border-bottom: 1px solid #000;
    padding: 5px;
}

#step4 #printableArea .table-list-form table td {
    height: 50px;
    border: 1px solid var(--sky-blu);
    padding: 0px 10px;
}

#step4 #printableArea .reuseable-table table {
    width: 100%;
    margin-top: 30px;
    text-align: center;
    border: 1px solid #000;
}

#step4 #printableArea .reuseable-table table th {
    height: 40px;
    border-bottom: 1px solid #000;
    padding: 5px;
}

#step4 #printableArea .reuseable-table table td {
    height: 50px;
    border: 1px solid var(--sky-blu);
    padding: 0px 10px;
}

#step4 #printableArea .reuseable-table table td.checkbox-td {
    display: flex;
    justify-content: center;
    align-items: center;
}

#step4 #printableArea .checkbox-wrap {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

#step4 #printableArea .checkbox {
    border: 2px solid #01A6C7;
    text-align: center;
    color: #01A6C7;
    height: 25px;
    width: 25px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#step4 #printableArea .checkbox.title_name_pd {
    border: 2px solid #01A6C7;
    text-align: center;
    color: #01A6C7;
    height: 25px;
    width: 25px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button styles */
#step4 .btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

/* Signature pad styles */
#step4 .signatureImg {
    width: 100%;
    max-width: 800px;
    margin: 1rem auto;
    box-shadow: rgba(0,0,0,.35) 0 5px 15px;
}

#step4 #signPad canvas {
    width: 100%;
    height: 300px;
    border: 2px solid #01A6C7;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

#step4 div#signPad {
    height: auto;
}

/* Additional styles for remaining inline styles */
#step4 #printableArea .table {
    width: 100%;
    margin: 0 auto;
    padding: 10px;
}

#step4 #printableArea .table h5 {
    font-size: 24px;
    color: var(--dark-blue);
    font-weight: 100;
    margin: 0;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

#step4 #printableArea .table h3 {
    font-size: 30px;
    color: var(--dark-blue);
    font-weight: 400;
    margin: 0;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

#step4 #printableArea .table h6 {
    font-size: 24px;
    color: var(--sky-blu);
    margin-bottom: 0;
    font-weight: 200;
    margin-top: 10px;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

#step4 #printableArea .table p {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: var(--dark-blue);
    margin-top: 0px;
}

#step4 #printableArea .table td[style*="text-align: right"] {
    text-align: right;
}

#step4 #printableArea .table td {
    padding: 20px 0;
}

#step4 #printableArea .table .title-checkbox-wrapper {
    display: flex;
    max-width: 100%;
    padding-top: 10px;
}

#step4 #printableArea .table .title-checkbox-item {
    display: flex;
    align-items: center;
    margin-right: 10px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #6a6a6a;
}

#step4 #printableArea .table .title-checkbox-item .checkbox {
    border: 2px solid #01A6C7;
    text-align: center;
    color: #01A6C7;
    height: 25px;
    width: 25px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#step4 #printableArea .table .form-label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #6a6a6a;
}

#step4 #printableArea .table .form-input {
    border-bottom: 2px solid #6a6a6a;
    border-left: none;
    border-right: none;
    border-top: none;
}

#step4 #printableArea .table .pflegegrad-wrapper {
    display: flex;
    max-width: 100%;
}

#step4 #printableArea .table .pflegegrad-item {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

#step4 #printableArea .table .package-wrapper {
    display: flex;
    width: 50%;
    float: left;
    margin: 30px 0 20px 0;
}

#step4 #printableArea .table .package-image {
    width: 80px;
    border-right: 2px solid #0d9bda;
    padding-right: 10px;
}

#step4 #printableArea .table .package-content-wrapper {
    flex-grow: 1;
    padding: 0 5px;
}

#step4 #printableArea .table .package-checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

#step4 #printableArea .table .package-details-wrapper {
    width: 30%;
    float: left;
    padding-left: 30px;
}

#step4 #printableArea .table .package-products-wrapper {
    width: 60%;
    float: left;
}

#step4 #printableArea .table .package-details-wrapper span,
#step4 #printableArea .table .package-products-wrapper span {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    display: block;
    padding: 2px 2px 0 0;
}

#step4 #printableArea .table .inner-table-wrapper {
    display: flex;
    max-width: 100%;
}

#step4 #printableArea .table .checkbox-option-wrapper {
    display: flex;
    align-items: center;
    margin-right: 10px;
    color: #6a6a6a;
}

#step4 #printableArea .table .text-small {
    font-size: 14px;
    margin-bottom: 5px;
    font-family: Arial, Helvetica, sans-serif;
    color: #6a6a6a;
}

#step4 #printableArea .table .text-center-small {
    font-size: 12px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    color: #6a6a6a;
}

/* Additional styles for remaining elements */
#step4 #printableArea .text-right {
    text-align: right;
}

#step4 #printableArea .text-small-wrapper {
    padding: 20px 0 10em 0;
}

/* ============================================
   MOBILE ADJUSTMENTS (Garde le design original)
   ============================================ */

   @media (max-width: 768px) {

    /* Container principal plus compact */
    #step4 {
        padding: 15px;
    }

    /* Titre */
    #step4 .step4-instruction {
        font-size: 16px;
        padding: 0 10px;
        line-height: 1.4;
    }

    /* Les 3 cartes restent horizontales mais mieux espacées */
    #step4 .signature-options {
        padding: 0 5px;
    }

    #step4 .option-card {
        padding: 16px 10px;

    }

    #step4 .option-card h6 {
        font-size: 15px;
        line-height: 1.2;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        }

    #step4 .option-card p {
        font-size: 11px;
    }

    /* Icônes */
    #step4 .option-card i {
        font-size: 20px;
        margin-bottom: 6px;
    }

    /* Signature pad plus proportionné */
    #step4 #signPad canvas {
        height: 220px;
    }

    /* Boutons bas */
    #step4 #signature-buttons {
        justify-content: space-between;
        padding: 0 10px;
    }

    #step4 #loschen-button {
        font-size: 14px;
        padding: 8px 16px;
    }

    #step4 #btn-online-submit {
        font-size: 16px;
        padding: 10px 22px;
    }
}