// (C) 2020-2025 GoodData Corporation
@use "variables";

.gd-description-panel-bubble-overlay {
    &.hidden {
        display: none;
    }
}

.gd-description-panel-bubble {
    &.bubble-light {
        max-width: 220px;

        .bubble-content {
            padding: 0;
        }
    }

    &.hidden {
        display: none;
    }
}

.gd-icon-circle-question-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    cursor: help;
    color: variables.$gd-color-state-blank;

    &:hover {
        color: variables.$gd-color-text;
    }
}

.gd-description-panel {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: variables.$gd-color-white;
    font-family: variables.$gd-font-primary;
    max-height: 510px;
    overflow: hidden;
    padding: 15px 0;

    &-title {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 5px;
        flex-shrink: 0;
        font-size: 14px;
        line-height: 23px;
        color: variables.$gd-color-text;
        margin: 0 15px;
        overflow: hidden;
        overflow-wrap: break-word;
    }

    &-content {
        display: flex;
        flex-direction: column;
        gap: 15px;
        overflow: auto;
        overscroll-behavior: contain;
        padding: 0 15px;
    }
}

.truncated {
    .gd-description-panel-bubble,
    .bubble-content,
    .content,
    .gd-description-panel.zoomed {
        height: 100%;
        max-height: 100%;
    }
}

.gd-ellipsis-text {
    display: flex;
    flex-direction: column;

    &-content {
        font-size: 13px;
        line-height: 18px;
        color: variables.$gd-medium-gray;
        overflow-wrap: break-word;
        white-space: pre-wrap;
    }

    &-fixed {
        width: 188px;
    }

    &-button {
        background: none;
        border: none;
        padding: 0;
        font: inherit;
        cursor: pointer;
        outline: inherit;
        font-size: 12px;
        line-height: 27px;
        color: variables.$gd-medium-gray;
        text-decoration: underline;
        width: fit-content;
    }

    &-button:hover {
        color: variables.$gd-color-text;
    }
}

.gd-metadata-list {
    display: flex;
    flex-direction: column;
    gap: 3px;

    &-title {
        font-size: 10px;
        line-height: 14px;
        color: variables.$gd-color-state-blank;
        text-transform: uppercase;
    }

    &-element {
        display: flex;
        flex-direction: row;
        align-items: center;
        font-size: 12px;
        line-height: 19px;
        color: variables.$gd-color-text;
        overflow: hidden;
        white-space: nowrap;

        span {
            overflow: hidden;
            text-overflow: ellipsis;
        }
    }

    &-icon {
        color: variables.$gd-color-state-blank;
        cursor: help;
        flex-shrink: 0;
        margin-left: 5px;
    }
}
