/* FILE: public/frontend.css */

/*
|--------------------------------------------------------------------------
| WRAPPER
|--------------------------------------------------------------------------
*/

.smartfaq-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

/*
|--------------------------------------------------------------------------
| TOOLBAR (SEARCH + FILTER)
|--------------------------------------------------------------------------
*/

.smartfaq-toolbar {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.smartfaq-search-wrap {
    width: 100%;
}

.smartfaq-search {
    width: 100%;
    max-width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    line-height: 1.4;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.smartfaq-search:focus {
    outline: none;
    border-color: #6C63FF;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

.smartfaq-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.smartfaq-filter {
    cursor: pointer;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #333;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.smartfaq-filter:hover {
    border-color: #6C63FF;
    color: #6C63FF;
}

.smartfaq-filter.active {
    background: #6C63FF;
    border-color: #6C63FF;
    color: #fff;
}

body.smartfaq-dark-mode .smartfaq-search {
    background: #1e1e1e;
    border-color: #444;
    color: #eee;
}

body.smartfaq-dark-mode .smartfaq-filter {
    background: #1e1e1e;
    border-color: #444;
    color: #ddd;
}

body.smartfaq-dark-mode .smartfaq-filter.active {
    background: #6C63FF;
    border-color: #6C63FF;
    color: #fff;
}

/*
|--------------------------------------------------------------------------
| ITEM
|--------------------------------------------------------------------------
*/

.smartfaq-item {
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

/*
|--------------------------------------------------------------------------
| QUESTION
|--------------------------------------------------------------------------
*/

.smartfaq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;

    cursor: pointer;

    padding: 24px 20px;

    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;

    color: #6C63FF;

    transition: all 0.3s ease;
}

.smartfaq-question:hover {
    opacity: 0.85;
}

/*
|--------------------------------------------------------------------------
| ICON
|--------------------------------------------------------------------------
*/

.smartfaq-icon {
    font-size: 32px;
    line-height: 1;
    transition: transform 0.3s ease;
}

/*
|--------------------------------------------------------------------------
| ACTIVE ITEM
|--------------------------------------------------------------------------
*/

.smartfaq-item.active .smartfaq-icon {
    transform: rotate(180deg);
}

/*
|--------------------------------------------------------------------------
| ANSWER
|--------------------------------------------------------------------------
*/

.smartfaq-answer {
    display: none;

    padding: 0 20px 24px;

    font-size: 18px;
    line-height: 1.7;

    color: #333;
}

/*
|--------------------------------------------------------------------------
| ANSWER CONTENT
|--------------------------------------------------------------------------
*/

.smartfaq-answer p {
    margin-bottom: 20px;
}

.smartfaq-answer ul,
.smartfaq-answer ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.smartfaq-answer li {
    margin-bottom: 10px;
}

/*
|--------------------------------------------------------------------------
| MEDIA
|--------------------------------------------------------------------------
*/

.smartfaq-answer img,
.smartfaq-answer video,
.smartfaq-answer iframe {
    max-width: 100%;
    height: auto;

    border-radius: 12px;

    margin-top: 20px;
    margin-bottom: 20px;
}

/*
|--------------------------------------------------------------------------
| YOUTUBE / IFRAMES
|--------------------------------------------------------------------------
*/

.smartfaq-answer iframe {
    width: 100%;
    min-height: 400px;
}

/*
|--------------------------------------------------------------------------
| LINKS
|--------------------------------------------------------------------------
*/

.smartfaq-answer a {
    color: #6C63FF;
    text-decoration: underline;
}

/*
|--------------------------------------------------------------------------
| DARK MODE
|--------------------------------------------------------------------------
*/

body.smartfaq-dark-mode .smartfaq-wrapper {
    color: #fff;
}

body.smartfaq-dark-mode .smartfaq-item {
    border-color: #333;
}

body.smartfaq-dark-mode .smartfaq-question {
    color: #9d97ff;
}

body.smartfaq-dark-mode .smartfaq-answer {
    color: #ddd;
}

/*
|--------------------------------------------------------------------------
| CARD LAYOUT READY
|--------------------------------------------------------------------------
*/

.smartfaq-layout-cards .smartfaq-item {
    border: none;

    border-radius: 18px;

    padding: 10px;

    background: #fff;

    box-shadow:
        0 10px 30px rgba(0,0,0,0.05);

    margin-bottom: 20px;
}

/*
|--------------------------------------------------------------------------
| MINIMAL LAYOUT READY
|--------------------------------------------------------------------------
*/

.smartfaq-layout-minimal .smartfaq-question {
    padding-left: 0;
    padding-right: 0;
}

.smartfaq-layout-minimal .smartfaq-answer {
    padding-left: 0;
    padding-right: 0;
}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .smartfaq-wrapper {
        padding: 0 15px;
    }

    .smartfaq-filters {
        gap: 8px;
    }

    .smartfaq-filter {
        padding: 8px 14px;
        font-size: 13px;
    }

    .smartfaq-question {

        font-size: 20px;

        padding:
            18px
            15px;
    }

    .smartfaq-answer {

        font-size: 16px;

        padding:
            0
            15px
            20px;
    }

    .smartfaq-icon {
        font-size: 26px;
    }

    .smartfaq-answer iframe {
        min-height: 240px;
    }
}

/*
|--------------------------------------------------------------------------
| SMALL MOBILE
|--------------------------------------------------------------------------
*/

@media (max-width: 480px) {

    .smartfaq-question {
        font-size: 18px;
    }

    .smartfaq-answer {
        font-size: 15px;
    }
}