.tb-toggle-box {
    position: relative;
}

.tb-toggle-box__button {
    display: flex;
    width: 100%;
    padding: config('padding.4');
    align-items: center;

    // If the dropdown is collapsed ...
    &[aria-expanded=false] {
        .c-icon__double-down {
            display: none;
        }
    }

    // If the dropdown is open ...
    &[aria-expanded=true] {
        .tb-toggle-box__icon {
            transform: rotateX(0);
        }
    }
}

.tb-toggle-box__title {
    font-family: config('fonts.sans');
    font-size: config('textSizes.xl');
    text-align: left;
    margin: 0;
    font-weight: bold;
    flex: 1;
}

.tb-toggle-box__icon {
    flex-grow: 0;
    flex-shrink: 0;
    transform: rotateX(180deg);
}

.tb-toggle-box__content {
    height: 0;
    visibility: hidden;
    transform: scaleY(0);
    transform-origin: left top;

    &.is-target {
        height: auto;
        visibility: visible;
        transition: 300ms;
        transform: scaleY(1);
    }
}
