﻿/* Container styling */
.dnnfaq-container {
    font-family: 'Segoe UI', sans-serif;
    padding: 1rem;
    max-width: 1000px;
    margin: auto;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 6px;
}

    /* Title */
    .dnnfaq-container h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        padding-bottom: 0.3rem;
    }

/* Controls layout */
.faq-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.faq-group {
    width: 100%;
    background: #f3f3f3;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.faq-group h3 {
    color:#255876;
}
.faq-control-containers {
    display: inline-block;
    width: 45%;
    margin: 0px 0px 15px 0px;
}

label.faq-label {
    width: 100%;
}

.faq-search {
    padding: 0.29rem;
    font-size: 1rem;
    min-width: 250px;
    width: 100%;
    max-width: 500px; /* add this for consistency */
    box-sizing: border-box;
}

.faq-category-filter {
    padding: 0.5rem;
    font-size: 1rem;
    min-width: 200px;
}

.faq-note {
    font-style: italic;
    color: #666;
    margin: 0.75rem 0rem;
}


/* FAQ items */
.faq-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: #fafafa;
    transition: box-shadow 0.2s;
}

    .faq-item:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

.faq-question {
    font-weight: bold;
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

    .faq-question::after {
        content: "▼";
        position: absolute;
        right: 0;
        font-size: 0.8rem;
        transform: rotate(0deg);
        transition: transform 0.2s;
        color: #888;
    }

.faq-item.open .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-left: 3px solid #007acc;
    background-color: #f3faff;
    border-radius: 4px;
    color: #333;
    font-size: 0.95rem;
    display: none; /* toggled by JS */
    transition: all 0.2s ease-in-out;
}

.faq-item.open .faq-answer {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 600px) {
    .faq-header {
        flex-direction: column;
    }

    .faq-search,
    .faq-category-filter {
        width: 100%;
    }

    .faq-control-containers {
        width: 100%;
    }
}

.faq-no-results {
    margin-top: 1rem;
    font-style: italic;
    color: #a33;
    display: none;
}

.faq-edit-link {
    margin-top: 0.5rem;
    display: inline-block;
    font-size: 0.9rem;
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}

.faq-button.cancel {
    margin-left: 1rem;
    background-color: #ccc;
    color: #333;
}

.faq-admin-panel {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid #ccc;
    background: #fafafa;
    border-radius: 4px;
}


.faq-form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

    .faq-form-group.checkbox {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

.faq-input {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.faq-form-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.faq-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #007acc;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

    .faq-button.cancel {
        background-color: #ccc;
        color: #333;
    }
