/**
 * FAQ Accordion Styles
 * Compatible with Bott Hydraulik Theme
 */

/* Accordion Wrapper */
.bott-faq-accordion-wrapper {
    width: 100%;
    margin: 2rem 0;
}

/* Accordion List */
.bott-faq-accordion {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* FAQ Item */
.bott-faq-accordion .faq-item {
    margin-bottom: -1px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.bott-faq-accordion .faq-item:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.bott-faq-accordion .faq-item:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* FAQ Title Wrapper */
.bott-faq-accordion .faq-title-wrapper {
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    user-select: none;
}

.bott-faq-accordion .faq-title-wrapper:hover {
    background-color: #e9ecef;
}

.bott-faq-accordion .faq-item.brx-open .faq-title-wrapper {
    background-color: #003383;
    color: #ffffff;
}

/* FAQ Title */
.bott-faq-accordion .faq-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* FAQ Question */
.bott-faq-accordion .faq-question {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.5;
    flex: 1;
    color: inherit;
}

/* FAQ Icon */
.bott-faq-accordion .faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.bott-faq-accordion .faq-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Icon States */
.bott-faq-accordion .faq-item .icon-closed {
    display: block;
}

.bott-faq-accordion .faq-item .icon-open {
    display: none;
}

.bott-faq-accordion .faq-item.brx-open .icon-closed {
    display: none;
}

.bott-faq-accordion .faq-item.brx-open .icon-open {
    display: block;
}

/* FAQ Content Wrapper */
.bott-faq-accordion .faq-content-wrapper {
    overflow: hidden;
    transition: height 0.3s ease;
}

.bott-faq-accordion .faq-item:not(.brx-open) .faq-content-wrapper {
    display: none;
}

/* FAQ Answer */
.bott-faq-accordion .faq-answer {
    padding: 1.5rem;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    font-size: 16px;
    line-height: 1.6;
    color: #333333;
}

.bott-faq-accordion .faq-answer p {
    margin: 0 0 1rem 0;
}

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

/* Accessibility: Focus States */
.bott-faq-accordion .faq-title-wrapper:focus {
    outline: 2px solid #003383;
    outline-offset: -2px;
}

.bott-faq-accordion .faq-title-wrapper:focus:not(:focus-visible) {
    outline: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .bott-faq-accordion .faq-title-wrapper {
        padding: 1rem 1.25rem;
    }

    .bott-faq-accordion .faq-question {
        font-size: 1rem;
    }

    .bott-faq-accordion .faq-answer {
        padding: 1.25rem;
        font-size: 0.9375rem;
    }
}

@media screen and (max-width: 480px) {
    .bott-faq-accordion .faq-title-wrapper {
        padding: 0.875rem 1rem;
    }

    .bott-faq-accordion .faq-title {
        gap: 0.75rem;
    }

    .bott-faq-accordion .faq-question {
        font-size: 0.9375rem;
    }

    .bott-faq-accordion .faq-answer {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .bott-faq-accordion .faq-icon {
        width: 20px;
        height: 20px;
    }
}

/* Editor Styles */
.bott-faq-accordion-editor {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.bott-faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #003383;
}

.bott-faq-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #003383;
}

.bott-faq-item-editor {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.bott-faq-item-editor:last-child {
    margin-bottom: 0;
}

.bott-faq-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.bott-faq-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bott-faq-item-number {
    font-weight: 500;
    color: #003383;
}

.bott-faq-item-actions {
    display: flex;
    gap: 0.25rem;
}

.bott-faq-item-content {
    padding: 1rem;
}

.bott-faq-field {
    margin-bottom: 1rem;
}

.bott-faq-field:last-child {
    margin-bottom: 0;
}

.bott-faq-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333333;
}

.bott-faq-question-input,
.bott-faq-answer-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out;
}

.bott-faq-question-input:focus,
.bott-faq-answer-input:focus {
    outline: none;
    border-color: #003383;
    box-shadow: 0 0 0 3px rgba(0, 51, 131, 0.1);
}

.bott-faq-answer-input {
    min-height: 100px;
}

/* Animation for smooth expand/collapse */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bott-faq-accordion .faq-item.brx-open .faq-content-wrapper {
    animation: slideDown 0.3s ease;
}
