.auth-modal {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.auth-modal .modal-dialog {
    margin: 16px auto;
    max-width: 560px;
    padding: 0 12px;
    width: 100%;
}

#myModal5 .modal-dialog {
    max-width: 680px;
}

.auth-modal__content {
    background: #fff;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(30, 24, 54, .25);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
    overflow: hidden;
}

.auth-modal .modal-dialog-centered.modal-dialog-scrollable .auth-modal__content {
    max-height: calc(100vh - 32px);
}

.auth-modal__content > form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.auth-modal__header {
    align-items: flex-start;
    background: linear-gradient(135deg, #6f52c7 0%, #a14587 55%, #d35473 100%);
    border: 0;
    color: #fff;
    flex-shrink: 0;
    padding: 22px 24px;
}

.auth-modal__heading {
    align-items: center;
    display: flex;
    gap: 14px;
    min-width: 0;
    padding-right: 12px;
}

.auth-modal__icon {
    align-items: center;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 15px;
    display: inline-flex;
    flex: 0 0 46px;
    font-size: 19px;
    height: 46px;
    justify-content: center;
}

.auth-modal__title {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.2px;
    line-height: 1.2;
    margin: 0;
    text-transform: none;
}

.auth-modal__subtitle {
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    line-height: 1.4;
    margin: 4px 0 0;
}

.auth-modal__close {
    align-items: center;
    background: rgba(255, 255, 255, .16) !important;
    border: 1px solid rgba(255, 255, 255, .24) !important;
    border-radius: 50%;
    color: #fff !important;
    display: flex;
    flex: 0 0 38px;
    font-size: 25px;
    height: 38px;
    justify-content: center;
    line-height: 1;
    margin: -2px -2px 0 0 !important;
    opacity: 1;
    padding: 0 0 3px !important;
    text-shadow: none;
    transition: background-color .2s ease, transform .2s ease;
}

.auth-modal__close:hover,
.auth-modal__close:focus {
    background: rgba(255, 255, 255, .28) !important;
    outline: 2px solid rgba(255, 255, 255, .55);
    outline-offset: 2px;
    transform: rotate(5deg);
}

.auth-modal__body {
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
}

.auth-modal__grid {
    display: grid;
    gap: 0 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-modal__field {
    margin-bottom: 16px;
    min-width: 0;
}

.auth-modal__field--wide {
    grid-column: 1 / -1;
}

.auth-modal__field label,
.auth-modal__label-row label {
    color: #3f3854;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

.auth-modal__label-row {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.auth-modal__control {
    align-items: center;
    display: flex;
    position: relative;
}

.auth-modal__control > i {
    color: #8b819e;
    font-size: 14px;
    left: 15px;
    pointer-events: none;
    position: absolute;
    z-index: 2;
}

.auth-modal__input,
.auth-modal__select {
    background: #f8f7fb !important;
    border: 1px solid #ddd8e7 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    color: #312b40;
    font-size: 14px;
    height: 46px;
    line-height: 1.3;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    width: 100%;
}

.auth-modal__input {
    padding: 10px 44px 10px 42px !important;
}

.auth-modal__select {
    padding: 8px 38px 8px 13px;
}

.auth-modal__input:focus,
.auth-modal__select:focus {
    background: #fff !important;
    border-color: #8668d2 !important;
    box-shadow: 0 0 0 3px rgba(111, 82, 199, .13) !important;
    outline: 0;
}

.auth-modal__password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #756b89;
    display: flex;
    height: 38px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 5px;
    width: 38px;
}

.auth-modal__password-toggle:hover,
.auth-modal__password-toggle:focus {
    color: #6f52c7;
    outline: 0;
}

.auth-modal__error {
    color: #d43b59;
    display: block;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 5px;
    min-height: 0;
}

.auth-modal__error:not(:empty) {
    min-height: 16px;
}

.auth-modal__alert {
    border: 0;
    border-radius: 13px;
    font-size: 13px;
    margin-bottom: 16px;
    padding: 11px 13px;
}

.auth-modal__notice {
    align-items: flex-start;
    background: #f1edfb;
    border: 1px solid #dfd6f4;
    border-radius: 13px;
    color: #51426f;
    display: flex;
    font-size: 13px;
    gap: 9px;
    line-height: 1.45;
    margin-bottom: 16px;
    padding: 11px 13px;
}

.auth-modal__notice i {
    color: #795bc8;
    margin-top: 3px;
}

.auth-modal__remember {
    align-items: center;
    color: #5d556d;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    gap: 9px;
    margin: 0 0 18px;
}

.auth-modal__remember input {
    accent-color: #7256c3;
    height: 17px;
    margin: 0;
    width: 17px;
}

.auth-modal__forgot {
    color: #7457c3;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 7px;
    text-decoration: none;
}

.auth-modal__forgot:hover {
    color: #5639a7;
    text-decoration: underline;
}

.auth-modal__privacy {
    color: #81788f;
    font-size: 11px;
    line-height: 1.45;
    margin: -2px 0 13px;
    text-align: center;
}

.auth-modal__submit {
    align-items: center;
    border: 0;
    border-radius: 14px;
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    gap: 10px;
    justify-content: center;
    letter-spacing: .3px;
    min-height: 47px;
    padding: 11px 18px;
    text-transform: uppercase;
    transition: filter .2s ease, transform .2s ease;
    width: 100%;
}

.auth-modal__submit:hover,
.auth-modal__submit:focus {
    color: #fff;
    filter: brightness(.94);
    outline: 0;
    transform: translateY(-1px);
}

.auth-modal__submit:disabled {
    cursor: wait;
    filter: grayscale(.15);
    opacity: .72;
    transform: none;
}

.auth-modal__footer {
    align-items: center;
    background: #faf9fc;
    border-color: #eeeaf3;
    color: #686071;
    display: flex;
    font-size: 13px;
    flex-shrink: 0;
    justify-content: center;
    padding: 14px 20px;
}

.auth-modal__switch {
    background: transparent;
    border: 0;
    color: #6f52c7;
    font-weight: 800;
    padding: 2px 5px;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.auth-modal__switch:hover,
.auth-modal__switch:focus {
    color: #4f359b;
    outline: 0;
}

.guest-registration-summary {
    align-items: flex-start;
    background: linear-gradient(135deg, #f6f2ff, #fff5f7);
    border: 1px solid #e4dafa;
    border-radius: 14px;
    color: #493f67;
    display: flex;
    gap: 11px;
    margin: 0 0 17px;
    padding: 12px 14px;
}

.guest-registration-summary > i {
    color: #f0a52b;
    font-size: 20px;
    margin-top: 2px;
}

.guest-registration-summary strong,
.guest-registration-summary span {
    display: block;
}

.guest-registration-summary span {
    font-size: 12px;
    line-height: 1.4;
    margin-top: 2px;
}

.auth-modal .select2-container {
    max-width: 100%;
    width: 100% !important;
}

.auth-modal .select2-container--classic .select2-selection--single {
    background: #f8f7fb;
    border: 1px solid #ddd8e7;
    border-radius: 14px;
    height: 46px;
}

.auth-modal .select2-container--classic.select2-container--focus .select2-selection--single,
.auth-modal .select2-container--classic.select2-container--open .select2-selection--single {
    background: #fff;
    border-color: #8668d2;
    box-shadow: 0 0 0 3px rgba(111, 82, 199, .13);
}

.auth-modal .select2-container--classic .select2-selection--single .select2-selection__rendered {
    color: #312b40;
    line-height: 44px;
    padding-left: 14px;
    padding-right: 40px;
}

.auth-modal .select2-container--classic .select2-selection--single .select2-selection__arrow {
    background: transparent;
    border: 0;
    border-radius: 0 14px 14px 0;
    height: 44px;
    width: 36px;
}

.select2-dropdown {
    z-index: 1065;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .auth-modal .modal-dialog {
        align-items: flex-end;
        display: flex;
        margin: 0;
        min-height: 100%;
        padding: 0;
    }

    .auth-modal__content {
        border-radius: 22px 22px 0 0;
        max-height: calc(100vh - 8px);
        width: 100%;
    }

    .auth-modal .modal-dialog-centered.modal-dialog-scrollable .auth-modal__content {
        max-height: calc(100vh - 8px);
    }

    .auth-modal__header {
        padding: 17px 16px;
    }

    .auth-modal__heading {
        gap: 10px;
    }

    .auth-modal__icon {
        border-radius: 12px;
        flex-basis: 40px;
        height: 40px;
    }

    .auth-modal__title {
        font-size: 19px;
    }

    .auth-modal__subtitle {
        font-size: 11px;
    }

    .auth-modal__close {
        flex-basis: 36px;
        height: 36px;
    }

    .auth-modal__body {
        padding: 18px 16px;
    }

    .auth-modal__grid {
        display: block;
    }

    .auth-modal__field {
        margin-bottom: 13px;
    }

    .auth-modal__input,
    .auth-modal__select,
    .auth-modal .select2-container--classic .select2-selection--single {
        height: 44px;
    }

    .auth-modal .select2-container--classic .select2-selection--single .select2-selection__rendered,
    .auth-modal .select2-container--classic .select2-selection--single .select2-selection__arrow {
        height: 42px;
        line-height: 42px;
    }

    .auth-modal__footer {
        padding: 12px 14px;
    }
}

@media (max-height: 650px) and (min-width: 576px) {
    .auth-modal .modal-dialog {
        margin-bottom: 8px;
        margin-top: 8px;
    }

    .auth-modal__content {
        max-height: calc(100vh - 16px);
    }

    .auth-modal__header,
    .auth-modal__body {
        padding-bottom: 16px;
        padding-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-modal,
    .auth-modal__close,
    .auth-modal__submit {
        transition: none !important;
    }
}
