/* Accordion */
.accordion {
    .card {
        margin-top: 5px;
        background: none;
        &:first-child  {
            margin-top: 0;
        }
    }
    .card-title {
        font-size: 16px;
    }
    .card-header {
        padding: 0;
        border-bottom: 0;
        a {
            display: block;
            padding: 10px 20px;
            color: var(--porto-primary-color);
            i {
                display: inline-block;
                margin-#{$right}: 8px;
                position: relative;
                top: 1px;
                color: inherit;
                &.icon-image {
                    max-width: 20px;
                    position: relative;
                    top: -1px;
                }
            }
            [class*="fa-"] {
                top: -1px;
            }
        }
    }
    .card-body {
        > *:last-child {
            margin-bottom: 0;
        }
    }
    &.card-title-dark .card-title a {
        color: inherit;
    }
    &.card-title-bold .card-title {
        font-weight: $font-weight-bold;
    }
    &.accordion-sm {
        .card-header {
            a {
                padding: 5px 15px;
                font-size: 0.9em;
            }
        }
        .card-body {
            font-size: 0.9em;
        }
    }
    &.accordion-lg {
        .card-header {
            a {
                padding: 15px 15px;
                font-size: 1em;
                font-weight: 600;
            }
        }
    }
    &.panel-modern {
        .card {
            border: 4px solid var(--porto-gray-7);
        }
        .card-header {
            background-color: var(--porto-gray-7);
            border-radius: 0;
        }
        &.gray-scale-1 {
            .card {
                border-color: #ededed;
            }
            .card-header {
                background-color: #ededed;
            }
        }
    }
    &.without-bg {
        .card-default {
            background: transparent !important;
            > .card-header {
                background: transparent !important;
            }
        }
        .card-body {
            padding-top: 0;
            padding-bottom: 0;

            p {
                margin-bottom: 20px !important;
            }
        }
    }
    &.without-borders {
        .card {
            border: 0;
            box-shadow: none;
            border-bottom: 1px solid var(--porto-gray-5);
            border-radius: 0;
        }
        .card-header a {
            padding-left: 0;
            padding-right: 0;
        }
        .card-body {
            padding: 0;

            p {
                margin-bottom: 20px !important;
            }
        }
    }
}

.section-default .accordion.panel-modern {
    .card-header {
        background: none;
    }
    .card {
        border-color: #ededed;
    }
}

/* theme colors */
/* primary, secondary, tertiary, quaternary, dark, light */
@each $state in $color_states {
    .accordion.accordion-#{nth($state,1)} .card-header {
        background-color: var(--porto-#{nth($state,1)}-color) !important;

        a {
            color: var(--porto-#{nth($state,1)}-color-inverse, #{nth($state,3)});
        }
    }
}
