.demat-form-wrapper {
    width: 100%;
    margin: 0 auto;
}

footer .section .demat-form-wrapper {
    display: none;
}

.demat-form {
    max-width: 424px;
}

.demat-form form {
    display: flex;
    align-items: stretch;
    background: var(--color-white);
    padding: 8px;
    border-radius: 8px;
    width: 100%;
    box-shadow: var(--primary-boxshadow);
    flex-direction: column;
}

.demat-form .field-wrapper {
    margin: 0;
}

.demat-form .field-wrapper.number-wrapper {
    flex: 1;
    display: flex;
}

.demat-form .field-wrapper input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px 0 0 6px;
    border: 1px solid var(--color-neutral-200);
    background-color: var(--color-white);
    color: var(--color-text-primary);
    font-size: 14px;
    line-height: 16px;
    outline: none;
}

.demat-form .field-wrapper input[type="number"]::-webkit-outer-spin-button,
.demat-form .field-wrapper input[type="number"]::-webkit-inner-spin-button {
    appearance: none;
    margin: 0;
}

.demat-form .field-wrapper.submit-wrapper {
    flex-shrink: 0;
    display: flex;
}

.demat-form .field-wrapper button.button {
    padding: 12px 8px;
    border: none;
    border-radius: 0 6px 6px 0;
    background-color: var(--color-primary);
    box-shadow: var(--primary-boxshadow);
    text-transform: uppercase;
    color: var(--btn-primary-color);
    font-size: 12px;
    line-height: 16px;
    white-space: nowrap;
    cursor: pointer;
    min-height: 42px;
}

.demat-form .error-message {
    padding-left: 4px;
    color: var(--color-error-medium);
    font-size: 12px;
    display: none;
}

.demat-form .form-fields-wrapper{
    display: flex;
}

@media (width <=1024px) {
    main > .section .demat-form-wrapper,
    footer .section .demat-form-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        padding: 0;
        z-index: 10;
    }

    footer .section .demat-form-wrapper {
        display: block;
        z-index: 9;
    }

    main > .section .banner-card .demat-form-wrapper {
        position: static;
    }

    .demat-form .field-wrapper input[type="number"] {
        border-radius: 4px 0 0 4px;
    }

    .demat-form .field-wrapper button.button {
        border-radius: 0 4px 4px 0;
        background-color: var(--color-primary);
        box-shadow: var(--primary-boxshadow);
        color: var(--color-white);
        width: 100%;
    }

    .demat-form form {
        background: var(--brand-blue-dark);
        border-radius: 8px 8px 0 0;
    }

    .demat-form {
        max-width: 100%;
    }

     footer.footer-wrapper {
        padding-bottom: 58px;
    }

    .stock-page main > .section .demat-form-wrapper {
        z-index: 8;
    }

    .demat-form .field-wrapper.submit-wrapper {
        flex: 1;
    }

    .learning-centre footer{
        padding-bottom: 0;
    }
}


@media (width <= 768px) {
    .demat-form .error-message {
        color: var(--color-error-medium);
    }

    .demat-form .field-wrapper.submit-wrapper {
        flex: unset;
    }
}
