﻿/* =========================================================
   Shared Wizard Theme (opt-in)
   Apply by adding class "wm-es-wizard" to form root:
   <div class="container-fluid esignature-form wm-es-wizard">
   ========================================================= */

/* Design tokens (ASCX-priority values) */
:root {
    --brand-primary: #2f3b52;
    --brand-primary-dark: #232c3d;
    --brand-accent: #4a90e2;
    --text-muted: #6b7280;
    --border-color: #d9dee3;
    --consent-bg: #eef0f2;
    --radius-md: 8px;
    --radius-lg: 14px;
}

/* TEST ENV banner: keep original size, only fix stacking */
div[id$='divTestEnvStyle'] {
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 15px !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Hide legacy footer buttons */
#esignbutton,
#esignbutton .form-cancel,
#esignbutton .form-save {
    display: none !important;
}

/* Wizard shell */
.wm-es-wizard {
    max-width: 1100px !important;
    margin: 0 auto !important;
    padding: 24px 16px 64px !important;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: #333 !important;
    background: transparent !important;
}

/* Width lock to match prototype geometry */
.container-fluid.esignature-form.wm-es-wizard {
    width: 1100px !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
    background-color: transparent !important;
}

.wm-es-wizard .section-card,
.wm-es-wizard .step-indicator,
.wm-es-wizard .step-nav {
    width: 100% !important;
    max-width: 1068px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

@media (max-width: 1110px) {
    .container-fluid.esignature-form.wm-es-wizard {
        width: 100% !important;
        max-width: 100% !important;
    }

    .wm-es-wizard .section-card,
    .wm-es-wizard .step-indicator,
    .wm-es-wizard .step-nav {
        max-width: 100% !important;
    }
}

/* Keep only active step visible */
.wm-es-wizard .form-step {
    display: none !important;
    background-color: transparent !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

    .wm-es-wizard .form-step.active {
        display: block !important;
        animation: fadeIn 0.25s ease-in;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card shell */
.wm-es-wizard .section-card {
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    background: #fff !important;
    padding: 28px 28px 32px !important;
    box-shadow: none !important;
    margin-bottom: 24px !important;
}

/* Step indicator */
.wm-es-wizard .step-indicator {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 32px !important;
    margin: 6px 0 10px !important;
    flex-wrap: wrap !important;
    padding-top: 5px !important;
}

.wm-es-wizard .step-indicator-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}

    .wm-es-wizard .step-indicator-item.active {
        color: var(--brand-primary) !important;
    }

.wm-es-wizard .step-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50%;
    background: #dfe3e8 !important;
    color: #fff;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
}

.wm-es-wizard .step-indicator-item.active .step-circle,
.wm-es-wizard .step-indicator-item.completed .step-circle {
    background: var(--brand-primary) !important;
}

/* Typography */
.wm-es-wizard .section-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 6px 0 !important;
}

.wm-es-wizard .section-title-icon,
.wm-es-wizard .section-icon {
    color: var(--brand-accent) !important;
    font-size: 18px !important;
    line-height: 1 !important;
}

.wm-es-wizard .section-title-text,
.wm-es-wizard .section-title,
.wm-es-wizard .section-title-text.section-title-text-md {
    color: var(--brand-primary) !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.wm-es-wizard .section-subtitle,
.section-subtitle {
    color: var(--text-muted) !important;
    margin: 0 0 3px 0 !important;
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
}

.wm-es-wizard .group-title,
.wm-es-wizard .amount-label {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #2b2f38 !important;
    line-height: 1.25 !important;
    margin-top: 6px !important;
    margin-bottom: 4px !important;
    padding: 0 !important;
}

/* Grid rhythm */
.wm-es-wizard .form-step .row {
    margin-left: -6px !important;
    margin-right: -6px !important;
}

.wm-es-wizard .form-step .form-data,
.wm-es-wizard .form-step [class*="col-"] {
    padding-left: 6px !important;
    padding-right: 6px !important;
}

.wm-es-wizard .form-data {
    margin-bottom: 8px !important;
}

.wm-es-wizard .row > [class*="col-"] {
    /*padding-top: 6px;
    padding-bottom: 6px;*/
}

/* Labels + inputs */
.wm-es-wizard .form-label,
.wm-es-wizard .form-data label,
.wm-es-wizard label.form-label {
    display: inline-block;
    color: #3a3f47 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    margin-bottom: 4px !important;
    padding-top: 2px !important;
}

.wm-es-wizard .required-label::after,
.wm-es-wizard .required-label:after {
    content: " *";
    color: #e0433c;
    font-weight: 700;
}

.wm-es-wizard input[type='text'],
.wm-es-wizard input[type='email'],
.wm-es-wizard input[type='tel'],
.wm-es-wizard input[type='date'],
.wm-es-wizard input[type='number'],
.wm-es-wizard textarea,
.wm-es-wizard select {
    width: 100% !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    box-shadow: none !important;
    height: 46px;
}

    .wm-es-wizard input[type='text']:focus,
    .wm-es-wizard input[type='email']:focus,
    .wm-es-wizard input[type='tel']:focus,
    .wm-es-wizard input[type='date']:focus,
    .wm-es-wizard textarea:focus,
    .wm-es-wizard select:focus {
        border-color: var(--brand-accent) !important;
        box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.15) !important;
        outline: 0;
    }

.wm-es-wizard select,
.wm-es-wizard .form-data select,
.wm-es-wizard select.form-control {
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    line-height: 1.2 !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    box-sizing: border-box !important;
}

.esignature-form .row .form-data {
    text-align: left;
    padding-right: 0;
    padding-left: 0;
    vertical-align: middle;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    text-align: left;
}

/* Job classification - responsive containment */
.wm-es-wizard .job-classification-list {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

    .wm-es-wizard .job-classification-list table,
    .wm-es-wizard .job-classification-list tbody,
    .wm-es-wizard .job-classification-list tr {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        margin: 0 !important;
    }

    .wm-es-wizard .job-classification-list td {
        display: inline-flex !important;
        align-items: flex-start !important;
        vertical-align: top !important;
        width: 25% !important; /* desktop: 4 columns */
        padding: 6px 10px 6px 0 !important;
        box-sizing: border-box !important;
    }

    .wm-es-wizard .job-classification-list input[type='radio'] {
        margin-right: 8px !important;
        margin-top: 2px !important;
        flex: 0 0 auto !important;
    }

    .wm-es-wizard .job-classification-list label {
        display: inline-block !important;
        max-width: calc(100% - 24px) !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        line-height: 1.3 !important;
    }

/* tablet */
@media (max-width: 991.98px) {
    .wm-es-wizard .job-classification-list td {
        width: 33.3333% !important;
    }
}

/* small */
@media (max-width: 767.98px) {
    .wm-es-wizard .job-classification-list td {
        width: 50% !important;
    }
}

/* very small */
@media (max-width: 420px) {
    .wm-es-wizard .job-classification-list td {
        width: 100% !important;
        padding-right: 0 !important;
    }
}

/* Consent */
.wm-es-wizard .consent-box {
    background: var(--consent-bg) !important;
    border-radius: var(--radius-md) !important;
    padding: 18px 20px !important;
    margin-top: 8px !important;
    margin-bottom: 18px !important;
    border: 0 !important;
}

    .wm-es-wizard .consent-box .form-check {
        display: block !important;
        position: relative !important;
        padding-left: 24px !important;
        margin: 0 !important;
    }

        .wm-es-wizard .consent-box .form-check > input[type='checkbox'],
        .wm-es-wizard .consent-box .form-check > span > input[type='checkbox'],
        .wm-es-wizard .consent-box .form-check .form-check-input {
            position: absolute !important;
            left: 0 !important;
            top: 3px !important;
            margin: 0 !important;
        }

.wm-es-wizard .consent-title {
    display: block !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #2b2f38 !important;
    line-height: 1.4 !important;
    margin: 0 0 4px 0 !important;
}

.wm-es-wizard .consent-text,
.wm-es-wizard .consent-box p,
.wm-es-wizard .consent-list {
    color: var(--text-muted) !important;
    font-size: 14px !important;
    line-height: 1.55 !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

.wm-es-wizard .consent-list {
    padding-left: 20px !important;
}

    .wm-es-wizard .consent-list li {
        margin-bottom: 6px !important;
    }

.wm-es-wizard .cope-consent-box .consent-text {
    margin-top: 0 !important;
}

.wm-es-wizard .consent-box .error-message,
.wm-es-wizard .consent-box span.error-message,
.wm-es-wizard .consent-box div.error-message {
    margin: 4px 0 6px 0 !important;
}

/* Utility: larger checkbox */
.checkbox-lg input[type='checkbox'],
input[type='checkbox'].checkbox-lg {
    width: 17px !important;
    height: 17px !important;
    transform: scale(1.15);
    transform-origin: left top;
    cursor: pointer;
}

/* COPE options */
.wm-es-wizard .rblCopeClass {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
}

    .wm-es-wizard .rblCopeClass input[type='radio'] {
        position: absolute !important;
        opacity: 0 !important;
        pointer-events: none !important;
        left: -9999px !important;
    }

    .wm-es-wizard .rblCopeClass label,
    .wm-es-wizard #rblCope label {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 46px !important;
        padding: 0 10px !important;
        border: 1px solid var(--border-color) !important;
        border-radius: var(--radius-md) !important;
        background: #fff !important;
        color: #3a3f47 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-align: center !important;
        white-space: nowrap !important;
        margin: 0 !important;
        cursor: pointer !important;
    }

        .wm-es-wizard .rblCopeClass label.cope-selected,
        .wm-es-wizard #rblCope label.cope-selected,
        .wm-es-wizard .rblCopeClass input[type='radio']:checked + label {
            background: var(--brand-primary) !important;
            border-color: var(--brand-primary) !important;
            color: #fff !important;
            box-shadow: none !important;
        }

    .wm-es-wizard #rblCope input[type='radio']:focus + label,
    .wm-es-wizard .rblCopeClass input[type='radio']:focus + label {
        box-shadow: none !important;
        outline: none !important;
    }

.wm-es-wizard .cope-other-amount-inline {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    text-align: left !important;
}

.wm-es-wizard .cope-other-amount-label {
    white-space: nowrap;
    color: #3a3f47 !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.wm-es-wizard .cope-other-amount-inline input[type='text'] {
    max-width: 328px !important;
}

/* Buttons */
.wm-es-wizard .step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 8px;
    background-color: transparent !important;
}

.wm-es-wizard .btn-nav {
    min-width: 130px !important;
    border-radius: var(--radius-md) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
}

.wm-es-wizard .btn-next,
.wm-es-wizard .btn-submit {
    background: var(--brand-primary) !important;
    border: 1px solid var(--brand-primary) !important;
    color: #fff !important;
}

    .wm-es-wizard .btn-next:hover,
    .wm-es-wizard .btn-submit:hover {
        background: var(--brand-primary-dark) !important;
        border-color: var(--brand-primary-dark) !important;
        color: #fff !important;
    }

.wm-es-wizard .btn-prev {
    color: var(--brand-primary);
    border: 1px solid var(--border-color);
    background: #fff;
}

    .wm-es-wizard .btn-prev:hover {
        background-color: #eef0f2;
        color: var(--brand-primary);
    }

/* Validation */
.wm-es-wizard .error-message,
.error-message {
    display: block;
    margin-top: 6px;
    color: #c0392b;
    font-size: 12px;
}

/* Submit overlay */
.wm-es-submit-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(52, 58, 64, 0.45);
    z-index: 99999;
    display: none;
}

.wm-es-submit-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    color: #333;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
}

.wm-es-submit-lock {
    cursor: wait !important;
}

/* Signature shell */
.wm-es-wizard .signature-shell,
.signature-shell {
    width: 100% !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

    .wm-es-wizard .signature-shell > #edit_signature.signature-pad--edit-container,
    .signature-shell > #edit_signature.signature-pad--edit-container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        background: #00000000 !important;
        border: 0 !important;
        border-radius: 8px !important;
        padding: 12px !important;
        box-sizing: border-box !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-container,
    .signature-shell #edit_signature .signature-pad--edit-type-container {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 132px !important;
        grid-template-areas:
            "label label"
            "input apply";
        gap: 4px 10px !important;
        width: 100% !important;
        max-width: none !important;
        align-items: center !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-label,
    .signature-shell #edit_signature .signature-pad--edit-type-label {
        grid-area: label;
        width: auto !important;
        margin: 0 !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-content,
    .signature-shell #edit_signature .signature-pad--edit-type-content {
        grid-area: input;
        min-width: 0 !important;
    }

        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-content input[type='text'],
        .signature-shell #edit_signature .signature-pad--edit-type-content input[type='text'] {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            box-sizing: border-box !important;
        }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button,
    .signature-shell #edit_signature .signature-pad--edit-type-button {
        grid-area: apply;
        justify-self: stretch !important;
        float: none !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--or-container,
    .signature-shell #edit_signature .signature-pad--or-container {
        width: 400px !important;
        max-width: 400px !important;
        margin: 2px auto 4px auto !important;
        box-sizing: border-box !important;
    }

    .wm-es-wizard .signature-shell #edit_signature #signature-pad,
    .wm-es-wizard .signature-shell #edit_signature .m-signature-pad,
    .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--body,
    .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer,
    .signature-shell #edit_signature #signature-pad,
    .signature-shell #edit_signature .m-signature-pad,
    .signature-shell #edit_signature .m-signature-pad--body,
    .signature-shell #edit_signature .m-signature-pad--footer {
        width: 400px !important;
        max-width: 400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--body,
    .signature-shell #edit_signature .m-signature-pad--body {
        min-height: 0 !important;
        margin-bottom: 6px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }

        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--body canvas,
        .signature-shell #edit_signature .m-signature-pad--body canvas {
            width: 400px !important;
            max-width: 400px !important;
            height: 100px !important;
            min-height: 100px !important;
            max-height: 100px !important;
            display: block !important;
            box-sizing: border-box !important;
            border-radius: 8px !important;
        }

    .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer,
    .signature-shell #edit_signature .m-signature-pad--footer {
        display: block !important;
        text-align: center !important;
        margin-top: 2px !important;
    }

        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .left,
        .signature-shell #edit_signature .m-signature-pad--footer .left {
            display: none !important;
        }

        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .right,
        .signature-shell #edit_signature .m-signature-pad--footer .right {
            float: none !important;
            width: auto !important;
            display: inline-block !important;
            margin: 0 auto !important;
        }

            .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button input,
            .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button button,
            .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .right input,
            .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .right button,
            .signature-shell #edit_signature .signature-pad--edit-type-button input,
            .signature-shell #edit_signature .signature-pad--edit-type-button button,
            .signature-shell #edit_signature .m-signature-pad--footer .right input,
            .signature-shell #edit_signature .m-signature-pad--footer .right button {
                width: 132px !important;
                min-width: 132px !important;
                height: 38px !important;
                background: var(--brand-primary) !important;
                border: 1px solid var(--brand-primary) !important;
                color: #fff !important;
            }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-draw-container,
    .signature-shell #edit_signature .signature-pad--edit-draw-container {
        width: 400px !important;
        max-width: 400px !important;
        margin: 0 auto 2px auto !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-draw-label,
    .signature-shell #edit_signature .signature-pad--edit-draw-label {
        width: auto !important;
        display: block !important;
        text-align: left !important;
        padding: 0 !important;
        margin: 0 0 2px 0 !important;
    }

/* Canonical mobile layout */
@media (max-width: 991.98px) {
    .wm-es-wizard .rblCopeClass {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767.98px) {
    body > .container,
    body > .container-fluid {
        min-width: 0 !important;
        width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    html,
    body {
        overflow-x: hidden !important;
    }

    .esignature-status-container,
    .esignature-container,
    .esignature-form-container,
    #escontainer,
    #esignpop,
    #esignform {
        width: 100% !important;
        max-width: 100% !important;
    }

    .row1 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .wm-es-wizard {
        max-width: 100% !important;
        padding: 8px 8px 16px !important;
    }

        .wm-es-wizard .section-card {
            padding: 20px 18px 24px !important;
        }

        .wm-es-wizard .form-step .row {
            margin-left: 0 !important;
            margin-right: 0 !important;
        }

        .wm-es-wizard .form-step .form-data,
        .wm-es-wizard .form-step [class*="col-"] {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }

        .wm-es-wizard .step-indicator {
            display: grid !important;
            grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
            gap: 0 !important;
            width: 100% !important;
            margin-bottom: 18px !important;
        }

        .wm-es-wizard .step-indicator-item {
            width: 100% !important;
            justify-content: center !important;
            gap: 0 !important;
            font-size: 13px !important;
        }

            .wm-es-wizard .step-indicator-item .step-circle {
                width: 32px !important;
                height: 32px !important;
                font-size: 0.95rem !important;
                margin: 0 auto !important;
            }

        .wm-es-wizard .step-label {
            display: none;
        }

        .wm-es-wizard .btn-nav {
            min-width: 108px !important;
            padding: 8px 14px !important;
        }

        .wm-es-wizard .cope-other-amount-inline {
            align-items: flex-start !important;
            flex-direction: column !important;
            gap: 6px !important;
        }

            .wm-es-wizard .cope-other-amount-inline input[type='text'] {
                max-width: 100% !important;
                width: 100% !important;
            }

        .wm-es-wizard .rblCopeClass {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }

            .wm-es-wizard .rblCopeClass label {
                min-width: 110px !important;
            }
}

@media (max-width: 440px) {
    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-container,
    .signature-shell #edit_signature .signature-pad--edit-type-container {
        grid-template-columns: minmax(0, 1fr) 110px !important;
        gap: 4px 8px !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button input,
    .signature-shell #edit_signature .signature-pad--edit-type-button input {
        width: 110px !important;
        min-width: 110px !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--or-container,
    .signature-shell #edit_signature .signature-pad--or-container,
    .wm-es-wizard .signature-shell #edit_signature #signature-pad,
    .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--body,
    .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer,
    .signature-shell #edit_signature #signature-pad,
    .signature-shell #edit_signature .m-signature-pad--body,
    .signature-shell #edit_signature .m-signature-pad--footer {
        width: 100% !important;
        max-width: 400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--body canvas,
        .signature-shell #edit_signature .m-signature-pad--body canvas {
            width: 100% !important;
            max-width: 400px !important;
        }
}

@media (max-width: 420px) {
    .wm-es-wizard .rblCopeClass {
        grid-template-columns: 1fr !important;
    }
}

/* Signature layout fix: keep type row + draw area centered together */
.wm-es-wizard .signature-shell {
    margin-top: 10px !important;
    padding: 16px !important;
    border: 1px solid #d9e1ee !important;
    border-radius: 10px !important;
    background: #f8fbff !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

    .wm-es-wizard .signature-shell #edit_signature,
    .wm-es-wizard .signature-shell #current_signature {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

        /* center all signature internals as a single vertical stack */
        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-container,
        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-container,
        .wm-es-wizard .signature-shell #edit_signature .signature-pad--or-container,
        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-draw-container,
        .wm-es-wizard .signature-shell #edit_signature #signature-pad,
        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad,
        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--body,
        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer {
            margin-left: auto !important;
            margin-right: auto !important;
        }

        /* Type Name row */
        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-container {
            width: 100% !important;
            max-width: 400px !important;
            display: grid !important;
            grid-template-columns: minmax(0, 1fr) 132px !important;
            grid-template-areas:
                "label label"
                "input apply";
            gap: 6px 10px !important;
            align-items: center !important;
        }

        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-label {
            grid-area: label;
            margin: 0 !important;
        }

        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-content {
            grid-area: input;
            min-width: 0 !important;
        }

            .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-content input[type='text'] {
                width: 100% !important;
                max-width: 100% !important;
                height: 46px;
            }

        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button {
            grid-area: apply;
            width: 132px !important;
            min-width: 132px !important;
            justify-self: stretch !important;
        }

        /* Draw/sign area centered under type row */
        .wm-es-wizard .signature-shell #edit_signature .signature-pad--or-container,
        .wm-es-wizard .signature-shell #edit_signature #signature-pad,
        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad,
        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--body,
        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer,
        .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-draw-container {
            width: 400px !important;
            max-width: 100% !important;
        }

            .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--body canvas {
                width: 100% !important;
                max-width: 100% !important;
                height: 120px !important;
                border: 1px solid var(--border-color) !important
            }

        /* Keep clear button centered like your preferred version */
        .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer {
            text-align: center !important;
        }

            .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .left {
                display: none !important;
            }

            .wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .right {
                float: none !important;
                display: inline-block !important;
                margin: 0 auto !important;
            }

/* Signature buttons - restore prototype feel */
.wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button input,
.wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button button {
    min-width: 132px !important;
    height: 38px !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
    border: 1px solid #2f3b52 !important;
    background: #2f3b52 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    letter-spacing: 0.1px;
    box-shadow: none !important;
}

/* Clear button: white background, dark text */
.wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .right input,
.wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .right button {
    min-width: 132px !important;
    height: 38px !important;
    padding: 0 18px !important;
    border-radius: 10px !important;
    border: 1px solid #c7d2e5 !important;
    background: #ffffff !important;
    color: #243655 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    box-shadow: none !important;
}

/* Hover states */
.wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button input:hover,
.wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button button:hover {
    background: #232c3d !important;
    border-color: #232c3d !important;
}

.wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .right input:hover,
.wm-es-wizard .signature-shell #edit_signature .m-signature-pad--footer .right button:hover {
    background: #f7f9fc !important;
    border-color: #b8c6dc !important;
}

/* mobile */
@media (max-width: 767.98px) {
    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-container {
        max-width: 400px !important;
        grid-template-columns: minmax(0, 1fr) 110px !important;
        gap: 6px 8px !important;
    }

    .wm-es-wizard .signature-shell #edit_signature .signature-pad--edit-type-button {
        width: 110px !important;
        min-width: 110px !important;
    }
}

/* Fix legacy class leakage and force job-classification block containment */
.wm-es-wizard .job-classification-row {
    clear: both !important;
}

.wm-es-wizard .job-classification-list,
.wm-es-wizard .job-classification-list.mylist {
    float: none !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

    .wm-es-wizard .job-classification-list table {
        margin: 0 !important;
    }