.d4p-ctrl-tabs {
    box-sizing: border-box;

    div[role="tablist"] {
        border-bottom: 1px solid var(--d4p-ctrl-color-tabs-border);
        position: relative;
        margin: 0;
        display: flex;
        box-sizing: border-box;

        button[role="tab"] {
            color: var(--d4p-ctrl-color-tabs-text);
            border: 1px solid var(--d4p-ctrl-color-tabs-border);
            border-radius: var(--d4p-ctrl-layout-tabs-border-radius) var(--d4p-ctrl-layout-tabs-border-radius) 0 0;
            background: transparent;
            border-bottom-color: transparent;
            display: inline-block;
            margin: 0 .5em 0 0;
            padding: .5em 1.5em .5em;
            line-height: 1.7;
            font-size: 1.1em;
            font-weight: normal;
            bottom: -1px;
            cursor: pointer;
            position: relative;
            vertical-align: top;

            i.d4p-icon {
                vertical-align: sub;
                margin: 0 .2em 0 0;
                font-size: 1.2em;
            }
        }

        button[role="tab"][aria-selected="true"] {
            background: var(--d4p-ctrl-color-tabs-background);
            border-bottom-color: var(--d4p-ctrl-color-tabs-background);
            font-weight: bold;
        }
    }

    .d4p-ctrl-tabs-content {
        border-radius: 0 0 var(--d4p-ctrl-layout-tabs-border-radius) var(--d4p-ctrl-layout-tabs-border-radius);
        background: var(--d4p-ctrl-color-tabs-background);
        color: var(--d4p-ctrl-color-tabs-text);
        border: 1px solid var(--d4p-ctrl-color-tabs-border);
        width: 100%;
        padding: 1.5em;
        border-top: 0;
        margin: 0;
        box-sizing: border-box;
    }

    &.d4p-tabs-have-icons {
        @media screen and (max-width: 768px) {
            button[role="tab"] span {
                display: none;
            }
        }
    }

    &.d4p-tabs-in-group {
        margin: -15px !important;

        div[role="tablist"] {
            justify-content: space-evenly;

            button[role="tab"] {
                background: transparent;
                border-radius: 0;
                border: 0;
                opacity: .6;
            }

            button[role="tab"][aria-selected="true"] {
                opacity: 1;
            }
        }

        .d4p-ctrl-tabs-content {
            border: 0;
            border-radius: 0;
            padding: 15px;
        }
    }

    &.d4p-tabs-in-dialog {
        margin: -16px;

        div[role="tablist"] {
            background-color: var(--d4p-ctrl-color-tabslist-background);

            button[role="tab"] {
                border-radius: 0;
                border: 0;
            }
        }

        .d4p-ctrl-tabs-content {
            border-radius: 0;
            border-bottom: 0;
        }
    }
}
