/* =========================================================
   FAQ VARIABLES
========================================================= */

:root {

    --faq-primary-soft:
        rgba( var(--brand-rgb), .10 );

    --faq-container:
        1180px;

    --faq-radius:
        .75rem;

    --faq-shadow:
        0 .5rem 1.5rem
        rgba(0, 0, 0, .07);

}


/* =========================================================
   GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;

}

button,
input,
select {
    font: inherit;
}

.faq-container {
    width: min( var(--faq-container), calc(100% - 40px) );
    margin-inline: auto;
}



/* =========================================================
   SEARCH
========================================================= */

.faq-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min( 720px, 100% );
	margin-top: 30px;
	margin-left: auto;
	margin-right: auto;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    box-shadow: 0 .75rem 2.2rem rgba(0, 0, 0, .08);
    transition:
		border-color .2s ease,
		box-shadow .2s ease;
}

.faq-search:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 .25rem rgba( var(--brand-rgb), .15 );
}

.faq-search__icon {
    padding-left: 1.2rem;
    color: var(--bs-secondary-color);
    font-size: 1.5rem;
    line-height: 1;
}

.faq-search input {
    width: 100%;
    min-height: 58px;
    padding: 0 48px 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--bs-body-color);
}

.faq-search input::placeholder {
    color: var(--bs-secondary-color);
    opacity: .7;
}

.faq-search__clear {
    position: absolute;
    right: 12px;
    display: none;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    cursor: pointer;
}

.faq-search__clear.is-visible {
    display:  block;
}

.faq-search__clear:hover {
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}


/* =========================================================
   FAQ SECTION
========================================================= */

.faq-section {
    padding: 30px 0 90px;
}

.faq-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 50px;
    align-items: start;
}


/* =========================================================
   CATEGORY
========================================================= */

.faq-categories {
    position: sticky;
    top: 100px;
}

.faq-desktop-categories {
    width: 100%;
}

.faq-categories__title {
    margin-bottom: .75rem;
    color: var(--bs-secondary-color);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}


/* =========================================================
   CATEGORY BUTTON
========================================================= */

.faq-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .75rem .8rem;
    margin: 2px 0;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: var(--bs-body-color);
    text-align: left;
    cursor: pointer;
    transition:
		background .2s ease,
        color .2s ease;
}

.faq-category:hover {
    background: var(--bs-tertiary-bg);
}

.faq-category.is-active {
    background: var(--faq-primary-soft);
    color: var(--brand);
    font-weight: 700;
}


/* =========================================================
   CATEGORY COUNTER
========================================================= */

.faq-category small {
    min-width: 25px;
    padding: 2px 6px;
    border-radius: 20px;
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    text-align: center;
    font-size: .72rem;
}

.faq-category.is-active small {
    background: rgba( var(--brand-rgb), .13 );
    color: var(--brand);
}


/* =========================================================
   MOBILE CATEGORY
========================================================= */

.faq-mobile-select {
    display: none;
}

.faq-mobile-select label {
    display: block;
    margin-bottom: .5rem;
    color: var(--bs-secondary-color);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.faq-mobile-select select {
    width: 100%;
    min-height: 50px;
    padding: 0 48px 0 15px;
    border: 1px solid var(--bs-border-color);
    border-radius: .625rem;
    outline: none;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-size: .92rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;

    /*
     * Bootstrap primary untuk
     * custom arrow.
     */

    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            var(--bs-secondary-color) 50%
        ),

        linear-gradient(
            135deg,
            var(--bs-secondary-color) 50%,
            transparent 50%
        );

    background-position:
        calc(100% - 20px) 21px,
        calc(100% - 14px) 21px;

    background-size:
        6px 6px,
        6px 6px;

    background-repeat:
        no-repeat;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}


.faq-mobile-select select:hover {
    border-color:
        var(--brand);
}

.faq-mobile-select select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .25rem rgba( var(--brand-rgb), .15 );
}


/* =========================================================
   RESULT INFORMATION
========================================================= */

.faq-result-info {
    margin-bottom: .75rem;
    color: var(--brand);
    font-size: .88rem;
}


/* =========================================================
   FAQ LIST
========================================================= */

.faq-list {
    border-top: 1px solid var(--bs-border-color);
}

.faq-item {
    border-bottom: 1px solid var(--bs-border-color);
}

.faq-item.is-hidden {
    display: none;
}


/* =========================================================
   QUESTION
========================================================= */

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    padding: 16px 4px;
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.faq-question:hover {
    color: var(--brand);
}


/* =========================================================
   QUESTION ICON
========================================================= */

.faq-question__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    background: var(--bs-body-bg);
    color: var(--brand);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    transition:
        transform .25s ease,
        background .2s ease;
}

.faq-question[aria-expanded="true"]
.faq-question__icon {
    transform: rotate(45deg);
    background: var(--faq-primary-soft);
}


/* =========================================================
   ANSWER
========================================================= */

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .28s ease;
}

.faq-answer__inner {
    overflow: hidden;
    color: var(--bs-secondary-color);
    font-size: .96rem;
}

.faq-question[aria-expanded="true"]
+ .faq-answer {
    grid-template-rows: 1fr;
}

.faq-question[aria-expanded="true"]
+ .faq-answer
.faq-answer__inner {
    padding: 0 55px 25px 4px;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.faq-empty {
    padding: 70px 20px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--faq-radius);
    background: var(--bs-body-bg);
    text-align: center;
}

.faq-empty[hidden] {
    display: none;
}

.faq-empty__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: var(--faq-primary-soft);
    color: var(--brand);
    font-weight: 800;
}

.faq-empty h3 {
    margin: 0 0 5px;
    color: var(--bs-heading-color);
}

.faq-empty p {
    margin: 0 0 18px;
    color: var(--bs-secondary-color);
}

.faq-empty button {
    padding: 10px 17px;
    border: 1px solid var(--brand);
    border-radius: .5rem;
    background: var(--brand);
    color: var(--bs-white);
    cursor: pointer;
}

.faq-empty button:hover {
    filter:
        brightness(.92);
}


/* ---------------------------------------------------------
   CTA ACTIONS
--------------------------------------------------------- */


.faq-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 0 17px;
    border-radius: .5rem;
    font-weight: 700;
    transition: .2s ease;
}


/* ---------------------------------------------------------
   PRIMARY BUTTON
--------------------------------------------------------- */

.faq-button--primary {
    background: var(--bs-white);
    color: var(--brand);
}

.faq-button--primary:hover {
    background: var(--bs-light);
    color: var(--brand);
}


/* ---------------------------------------------------------
   SECONDARY BUTTON — DARK
--------------------------------------------------------- */

[data-bs-theme="dark"] .faq-button--secondary {
    border: 1px solid rgba(255, 255, 255, .45);
    color: var(--bs-white);
}

[data-bs-theme="dark"] .faq-button--secondary:hover {
    background: rgba(255, 255, 255, .1);
}


/* ---------------------------------------------------------
   SECONDARY BUTTON — LIGHT
--------------------------------------------------------- */

[data-bs-theme="light"] .faq-button--secondary {
    border: 1px solid rgba(0, 0, 0, .25);
    color: var(--bs-emphasis-color);
}

[data-bs-theme="light"] .faq-button--secondary:hover {
    background: rgba(0, 0, 0, .06);
}



/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    /* -----------------------------------------------
       FAQ LAYOUT
    ------------------------------------------------ */

    .faq-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    /* -----------------------------------------------
       CATEGORY
    ------------------------------------------------ */

    .faq-categories {
        position: static;
        display: block;
        width: 100%;
        margin-bottom: 25px;
    }

    /*
     * Desktop category disembunyikan.
     * Tidak menggunakan horizontal scroll.
     */

    .faq-desktop-categories {
        display: none;
    }

    /*
     * Mobile menggunakan dropdown.
     */

    .faq-mobile-select {
        display: block;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .faq-container {
        width: min( calc(100% - 28px), var(--faq-container) );
    }



    /* -----------------------------------------------
       SEARCH
    ------------------------------------------------ */

    .faq-search input {
        min-height: 54px;

    }


    /* -----------------------------------------------
       CATEGORY
    ------------------------------------------------ */

    .faq-mobile-select select {
        min-height: 52px;
        border-radius: .625rem;
        font-size: .9rem;
    }


    /* -----------------------------------------------
       QUESTION
    ------------------------------------------------ */

    .faq-question {
        padding: 19px 0;
        font-size: .98rem;
    }

    .faq-question__icon {
        width: 28px;
        height: 28px;
    }


    /* -----------------------------------------------
       ANSWER
    ------------------------------------------------ */

    .faq-question[aria-expanded="true"]
    + .faq-answer
    .faq-answer__inner {
        padding: 0 38px 22px 0;
    }



}
