/* ============================================
   MB FAQ Front-end Styles
   ============================================ */

/* Container */
.mbfaq-container {
    margin: 15px 0;
    border-top: 1px solid #e1e1e1;
}

/* CMS wrapper */
.mbfaq-cms-wrapper {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    clear: both;
}

.mbfaq-cms-title {
    margin-bottom: 15px;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Single FAQ item */
.mbfaq-item {
    border-bottom: 1px solid #e1e1e1;
}

.mbfaq-item details {
    border: none;
    margin: 0;
    padding: 0;
}

/* Question (clickable summary) */
.mbfaq-question {
    padding: 15px 10px;
    cursor: pointer;
    font-weight: 600;
    position: relative;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    transition: background-color 0.2s;
    font-size: 1rem;
    line-height: 1.4;
    color: #333;
}

.mbfaq-question:hover {
    background-color: #f7f7f7;
}

/* Remove default marker for webkit */
.mbfaq-question::-webkit-details-marker {
    display: none;
}

/* Remove default marker for Firefox */
.mbfaq-item details > summary {
    list-style-type: none;
}

.mbfaq-question-text {
    flex: 1;
    padding-right: 15px;
}

/* Icon (+/-) */
.mbfaq-icon {
    position: relative;
    width: 16px;
    height: 16px;
    min-width: 16px;
    display: block;
    margin-left: 15px;
    flex-shrink: 0;
}

.mbfaq-icon::before,
.mbfaq-icon::after {
    content: '';
    position: absolute;
    background-color: #333;
    transition: transform 0.3s ease;
    top: 50%;
    left: 50%;
}

.mbfaq-icon::before {
    width: 12px;
    height: 2px;
    margin-left: -6px;
    margin-top: -1px;
}

.mbfaq-icon::after {
    width: 2px;
    height: 12px;
    margin-left: -1px;
    margin-top: -6px;
}

/* Open state */
details[open] .mbfaq-icon::after {
    transform: rotate(90deg);
}

details[open] .mbfaq-question {
    color: #2fb5d2;
}

details[open] .mbfaq-icon::before,
details[open] .mbfaq-icon::after {
    background-color: #2fb5d2;
}

/* Answer */
.mbfaq-answer {
    padding: 10px 15px 20px 15px;
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
    animation: mbfaq-fadein 0.3s ease-in-out;
}

.mbfaq-answer p {
    margin-bottom: 10px;
}

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

.mbfaq-answer a {
    color: #2fb5d2;
    text-decoration: underline;
}

.mbfaq-answer ul,
.mbfaq-answer ol {
    margin: 10px 0;
    padding-left: 25px;
}

@keyframes mbfaq-fadein {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 768px) {
    .mbfaq-question {
        padding: 12px 8px;
        font-size: 0.95rem;
    }
    .mbfaq-answer {
        padding: 8px 10px 15px 10px;
        font-size: 0.9rem;
    }
}
