/*
 *  Copyright 2019 Adobe
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

amp-accordion section[expanded] .show-more {
    display: none;
}

amp-accordion section:not([expanded]) .show-less {
    display: none;
}

.cmp-accordion {
    display: block;
    margin: 0;
    padding: 0;

    &__icon {
        position: absolute;
        right: 0;
        width: 20px;
        height: 20px;

        &:after {
            content: '\0203A'; // right arrow
            position: absolute;
            transform: scale(1.5);
        }
    }

    &__item {
        position: relative;
    }

    &__header {
        margin: 0;
        position: relative;
        border: none;
        border-bottom: 1px solid;
        padding: 8px 0;
        background: none;
        color: inherit;
        font: inherit;
        cursor: pointer;
        outline: inherit;
        border-color: #e1e1e1;
        color: #737373;

        &[aria-expanded="true"] {
            .cmp-accordion__icon:after {
                transform: scale(1.5) rotate(90deg);
            }
        }
    }
}