@use "vars";

@mixin styles {
    .plotly-cloud-dialog {
        font-family: 'Open Sans', verdana, arial, sans-serif; // Because not all contexts have this specified.
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1001;

        display: flex;
        align-items: center;
        justify-content: center;

        background-color: rgba(0, 0, 0, 0.4);

        .plotly-cloud-dialog-box {
            box-sizing: border-box;
            min-width: 300px;
            max-width: 420px;
            padding: 20px 24px;

            background-color: vars.$color-bg-light;
            border: 1px solid vars.$color-bg-darker;
            border-radius: 4px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);

            font-size: 13px;
            color: #2a3f5f;
        }

        .plotly-cloud-dialog-title {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 12px;
        }

        .plotly-cloud-dialog-message {
            line-height: 1.5;
            overflow-wrap: break-word;
            word-wrap: break-word;

            &--hostname {
                font-weight: bold;
                text-decoration: underline;
            }

            &--account {
                margin-top: 16px;
                padding: 8px;
                border-radius: 3px;
                font-size: 0.9em;
                background-color: vars.$color-bg-hint;
            }
        }

        .plotly-cloud-dialog-buttons {
            display: flex;
            justify-content: flex-end;
            margin-top: 20px;
        }

        .plotly-cloud-dialog-btn {
            font-family: inherit;
            font-size: 13px;
            padding: 7px 16px;
            margin-left: 8px;

            border-radius: 3px;
            border: 1px solid transparent;
            cursor: pointer;

            &:focus-visible {
                outline: 2px solid vars.$color-brand-primary;
                outline-offset: 1px;
            }

            &--cancel {
                background-color: vars.$color-bg-base;
                margin-left: auto;
                color: vars.$color-muted-text;

                &:hover {
                    background-color: vars.$color-bg-darker;
                }
            }

            &--confirm {
                background-color: vars.$color-brand-primary;
                color: vars.$color-bg-light;

                &:hover {
                    background-color: vars.$color-brand-accent;
                }
            }
        }
    }
}
