/*
 * Copyright 2025 The Chromium Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

@scope to (devtools-widget > *) {
    /* stylelint-disable-next-line no-invalid-position-declaration */
    display: flex;

    .ai-code-completion-disclaimer {
        gap: 5px;
        display: flex;
        flex-shrink: 0;

        span.link {
            color: var(--sys-color-on-surface-subtle);

            &:focus-visible {
                outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
                outline-offset: 0;
                border-radius: var(--sys-shape-corner-extra-small);
            }
        }

        devtools-spinner {
            margin-top: var(--sys-size-2);
            padding: var(--sys-size-1);
            height: var(--sys-size-6);
            width: var(--sys-size-6);
        }

        devtools-tooltip:popover-open {
            display: flex;
            flex-direction: column;
            align-items: center;

            .disclaimer-tooltip-container {
                padding: var(--sys-size-4) 0;
                max-width: var(--sys-size-30);
                white-space: normal;

                .tooltip-text {
                    color: var(--sys-color-on-surface-subtle);
                    padding: 0 var(--sys-size-5);
                    align-items: flex-start;
                    gap: 10px;
                }

                .link {
                    margin: var(--sys-size-5) var(--sys-size-8) 0 var(--sys-size-5);
                    display: inline-block;
                }
            }
        }
    }
}
