/* CSS Variables for defaults */
.tbs_faq_container {
    --tbs-transition-duration: 0.3s;
    width: 100%;
    display: flex;
    flex-direction: column;
    /* Gap is handled by Elementor Control */
}

/* Default width for frontend */
.elementor-widget-tbs_faq_accordion {
    width: 100%;
}

/* Aggressive fix specifically for Elementor Editor Preview */
.elementor-editor-active .elementor-widget-tbs_faq_accordion,
.elementor-editor-active .elementor-widget-tbs_faq_accordion .elementor-widget-container {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.tbs_faq_item {
    overflow: hidden;
    transition: background-color var(--tbs-transition-duration) ease, border-color var(--tbs-transition-duration) ease, box-shadow var(--tbs-transition-duration) ease;
    /* Background, Border, Radius, Shadow handled by Elementor Controls */
}

/* Reset Button Styles to override Theme/Elementor Defaults */
button.tbs_faq_question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    margin: 0;
    cursor: pointer;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
    line-height: normal;
    text-decoration: none;
    transition: background-color var(--tbs-transition-duration) ease;
    /* Padding handled by Elementor Control */
}

button.tbs_faq_question:focus {
    outline: none;
}

.tbs_faq_title {
    /* Typography and color handled by Elementor Controls */
    margin: 0; /* Reset margins */
}

.tbs_faq_icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--tbs-transition-duration) ease;
    margin-left: 16px; /* Spacing between text and icon */
    /* Size, Border, Radius, Colors handled by Elementor Controls */
}

.tbs_faq_icon svg {
    transition: transform var(--tbs-transition-duration) ease;
    transform: rotate(180deg); /* Default pointing up (closed) */
    display: block; /* Removes extra space */
    /* Size handled by Elementor Control */
}

/* Active State */
.tbs_faq_item.active .tbs_faq_icon svg {
    transform: rotate(0deg); /* Points down when open */
}

.tbs_faq_answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--tbs-transition-duration) ease-out;
    /* Background handled by Elementor Control */
}

.tbs_answer_content {
    /* Padding, Typography, Color handled by Elementor Control */
}

/* Editor Specific Fixes */
.elementor-editor-active .tbs_faq_answer {
    /* Ensure content is visible/calculable during edit if needed, mainly controlled by JS though */
}
