/**
 * FAQ Styles with CSS Custom Properties
 * Modify the root variables to customize colors easily
 */

:root {
    /* FAQ Color Variables - Easy to customize */
    --muro-faq-primary-bg: #f0f6f6;
    --muro-faq-secondary-bg: #C8E6EF;
    --muro-faq-hover-bg: #a1c0c1;
    --muro-faq-active-bg: #a1c0c1;
    --muro-faq-text-color: #000000;
    --muro-faq-border-color: #D3E5E5;
    --muro-faq-search-bg: #f0f6f6;
    --muro-faq-category-bg: #A0C8C7;

    /* Spacing and sizing */
    --muro-faq-spacing: 20px;
    --muro-faq-border-radius: 0; /* No border-radius as requested */
}

/* FAQ Wrapper */
.muro-faq-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

/* Search Input */
.muro-faq-search {
    margin-bottom: calc(var(--muro-faq-spacing) * 2.5);
}

.muro-faq-search input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid var(--muro-faq-border-color);
    border-radius: var(--muro-faq-border-radius);
    background-color: white;
    color: var(--muro-faq-text-color);
    transition: border-color 0.3s ease, background-color 0.3s ease;
    outline: none;
}

.muro-faq-search input:focus {
    border-color: var(--muro-faq-hover-bg);
    background-color: #fff;
}

.muro-faq-search input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* No Results Message */
.muro-faq-no-results {
    padding: var(--muro-faq-spacing);
    background-color: var(--muro-faq-search-bg);
    border: 1px solid var(--muro-faq-border-color);
    border-radius: var(--muro-faq-border-radius);
    text-align: left;
    margin-bottom: var(--muro-faq-spacing);
}

.muro-faq-no-results span{
    font-style: italic;
}

.muro-faq-no-results p {
    margin: 0;
    color: var(--muro-faq-text-color);
}

/* FAQ Category */
.muro-faq-category {
    margin-bottom: calc(var(--muro-faq-spacing) * 2);
}

.muro-faq-category-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--muro-faq-text-color);
    margin: 0 0 var(--muro-faq-spacing) 0;
    padding: 15px 20px;
}

/* FAQ Items Container */
.muro-faq-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* FAQ Item */
.muro-faq-item {
    border: 1px solid var(--muro-faq-border-color);
    border-radius: var(--muro-faq-border-radius);
    overflow: hidden;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
}

.muro-faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* FAQ Question (Accordion Header) */
.muro-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background-color: var(--muro-faq-primary-bg);
    color: var(--muro-faq-text-color);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
    font-weight: 600;
    font-size: 16px;
}

.muro-faq-question:hover {
    background-color: var(--muro-faq-hover-bg);
    color:white; 
}

.muro-faq-question.active {
    background-color: var(--muro-faq-active-bg);
color:white; 
}

.muro-faq-question:focus {
    outline: none
}

#muro-faq-search-input::-webkit-search-cancel-button {
    filter: brightness(0);
}

/* FAQ Icon (+/-) */
.muro-faq-icon {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.muro-faq-question.active .muro-faq-icon {
    transform: rotate(180deg);
}

/* FAQ Answer (Accordion Content) */
.muro-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: white;
}

.muro-faq-answer.open {
    border-top: 1px solid var(--muro-faq-border-color);
}

.muro-faq-answer > div {
    padding: 20px;
    color: var(--muro-faq-text-color);
    line-height: 1.6;
}

.muro-faq-answer p {
    margin: 0 0 15px 0;
}

.muro-faq-answer p:last-child {
    margin-bottom: 0;
}

.muro-faq-answer ul,
.muro-faq-answer ol {
    margin: 0 0 15px 20px;
    padding-left: 20px;
}

.muro-faq-answer li {
    margin-bottom: 8px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .muro-faq-wrapper {
        padding: calc(var(--muro-faq-spacing) / 2);
    }

    .muro-faq-category-title {
        font-size: 20px;
        padding: 12px 15px;
    }

    .muro-faq-question {
        padding: 15px;
        font-size: 15px;
    }

    .muro-faq-answer > div {
        padding: 15px;
    }

    .muro-faq-search input {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* Hide items filtered by search */
.muro-faq-item[style*="display: none"],
.muro-faq-category[style*="display: none"] {
    display: none !important;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .muro-faq-question,
    .muro-faq-answer,
    .muro-faq-icon,
    .muro-faq-search input {
        transition: none;
    }
}

/* Print styles */
@media print {
    .muro-faq-search {
        display: none;
    }

    .muro-faq-answer {
        max-height: none !important;
        display: block !important;
    }

    .muro-faq-icon {
        display: none;
    }
}
