/**
 * Copyright (c) Microblink Ltd. All rights reserved.
 */

:host {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;

    visibility: hidden;

    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
    overflow-y: auto;
    padding: 24px;

    .mb-modal {
        width: 100%;

        border-radius: var(--mb-modal-border-radius);

        position: relative;
        background-color: var(--mb-modal-background);
        color: var(--mb-component-font-color);

        .inner {
            padding: 24px;
        }

        .footer {
            padding: 24px;
            background-color: rgba(116, 116, 128, 0.08);
        }

        .close-wrapper {
            position: absolute;
            right: 24px;
            top: 24px;
            cursor: pointer;

            svg {
                width: 20px;
                height: 20px;
            }
        }

        .back-wrapper {
            position: absolute;
            left: 24px;
            top: 20px;
            cursor: pointer;

            svg {
                width: 20px;
                height: 20px;
            }
        }

        .title {
            text-align: center;
            font-weight: 400;
            font-size: var(--mb-modal-title-font-size);
            line-height: var(--mb-modal-title-line-height);
        }

        .content {
            margin: 24px 0;
            font-weight: 400;
            font-size: var(--mb-modal-content-font-size);
            line-height: var(--mb-modal-content-line-height);

            &.centered {
                text-align: center;
            }
        }

        .actions {
            display: flex;
            justify-content: center;

            button {
              width: 126px;
              height: 32px;
              border-radius: 0;
              border: 0;
              background: #48B2E8;
              color: #ffffff;
              cursor: pointer;
            }
        }
    }
}

:host(.visible) {
    visibility: visible;
    opacity: 1;
}

:host(.elevated) {
    .mb-modal {
        box-shadow: 0px 2px 24px 0px #0000001A;
        box-shadow: 0px 2px 8px 0px #0000000D;
    }
}

:host(.centered) {
    align-items: center;
    justify-content: center;
}