// .swell-block-accordion {}

.swell-block-accordion__item {

    & + & {
        margin-top: .5em;
    }
}

.swell-block-accordion__title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em;
    background: var(--color_gray);
}

.swell-block-accordion__label {
    flex: 1 1 auto;
    padding-right: 1em;
    word-break: break-all;
}

.swell-block-accordion__icon {
    flex: 0 0 auto;
    width: 1.25em;
    // height: 1em;
    font-size: 1.25em;
    text-align: right;
}

.swell-block-accordion__body {
    height: auto;
    padding: 1em;
    overflow: hidden;
    opacity: 1;
    transition: .25s;

    &[aria-hidden="true"] {
        height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        opacity: 0;
    }
}


.swell-block-accordion.is-style-simple,
.swell-block-accordion.is-style-border {

    .swell-block-accordion__title {
        background: none;
    }

    .swell-block-accordion__body {
        margin: 0 .5em;
        padding: 1em .5em;
        border-top: 1px dashed var(--color_border);
    }
}

.is-style-border {

    > .swell-block-accordion__item {
        border: 1px solid var(--color_border);
    }
}


.is-style-simple {

    > .swell-block-accordion__item {
        margin-bottom: 0;
        border-bottom: 1px solid var(--color_border);

        &:first-child {
            border-top: 1px solid var(--color_border);
        }
    }

    > .swell-block-accordion__item + .swell-block-accordion__item {
        margin-top: 0;
    }
}

.swell-block-accordion.is-style-main {

    .swell-block-accordion__title {
        color: #fff;
        background-color: var(--color_main);
    }

    .swell-block-accordion__body {
        border: solid 1px var(--color_main);
        border-top: none;
    }
}


// icon部分
.c-switchIconBtn,
.c-switch_icon_btn {
    position: relative;
    display: block;

    %__icon {
        display: block;
        width: 100%;
        font-size: inherit;
        line-height: 1;
        transition: transform .25s, opacity .25s;
    }

    .__icon--closed,
    .__icon_closed {

        @extend %__icon;
        transform: scale(1) rotate(0);
    }

    .__icon--opened,
    .__icon_opened {

        @extend %__icon;
        position: absolute;
        top: 0;
        left: 0;
        transform: scale(.5) rotate(-180deg);
        opacity: 0;
    }

    &[data-opened="true"] {

        > .__icon--closed,
        > .__icon_closed {
            transform: scale(.5) rotate(180deg);
            opacity: 0;
        }

        > .__icon--opened,
        > .__icon_opened {
            transform: scale(1) rotate(0);
            opacity: 1;
        }
    }
}
