/* =========================================================
   1. ACCORDION WRAPPER & ALIGNMENT
   ========================================================= */
.cfa-faq-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    max-width: 100%;
}

.cfa-align-center {
    margin-left: auto !important;
    margin-right: auto !important;
}

.cfa-align-left {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.cfa-align-right {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* =========================================================
   2. FAQ ITEM CARDS & SHAPES
   ========================================================= */
.cfa-faq-item {
    box-sizing: border-box;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cfa-shape-rounded .cfa-faq-item {
    border-radius: 14px;
}

.cfa-shape-square .cfa-faq-item {
    border-radius: 0;
}

.cfa-shape-pill .cfa-faq-item {
    border-radius: 9999px;
}
.cfa-shape-pill .cfa-faq-item.is-active {
    border-radius: 24px; /* Expand corner radius smoothly when open */
}

/* Drop Shadows */
.cfa-shadow-none .cfa-faq-item {
    box-shadow: none;
}
.cfa-shadow-subtle .cfa-faq-item {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.cfa-shadow-medium .cfa-faq-item {
    box-shadow: 0 6px 18px -2px rgba(0, 0, 0, 0.08), 0 3px 6px -2px rgba(0, 0, 0, 0.04);
}
.cfa-shadow-deep .cfa-faq-item {
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.16);
}

/* =========================================================
   3. QUESTION BUTTON & EXPAND ICON
   ========================================================= */
.cfa-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: left;
    outline: none;
    font-family: inherit;
    transition: background 0.2s ease;
}

.cfa-question-text {
    flex-grow: 1;
}

/* Animated Plus / Minus SVG Icon */
.cfa-faq-icon {
    width: 22px;
    height: 22px;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.cfa-faq-icon::before,
.cfa-faq-icon::after {
    content: '';
    position: absolute;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

/* Horizontal bar */
.cfa-faq-icon::before {
    top: 10px;
    left: 2px;
    width: 18px;
    height: 2px;
}

/* Vertical bar */
.cfa-faq-icon::after {
    top: 2px;
    left: 10px;
    width: 2px;
    height: 18px;
}

/* Active State: Rotate vertical bar to form minus */
.cfa-faq-item.is-active .cfa-faq-icon::after {
    transform: rotate(90deg);
}

.cfa-faq-item.is-active .cfa-faq-icon {
    transform: rotate(180deg);
}

/* =========================================================
   4. ANSWER CONTENT (SMOOTH SLIDE)
   ========================================================= */
.cfa-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cfa-answer-inner {
    padding: 0 24px 20px;
    line-height: 1.7;
    font-size: 0.98rem;
}

/* Editor Styling */
.cfa-editor-header {
    display: flex;
    align-items: center;
    padding: 10px 16px 0;
}

.cfa-faq-wrapper .components-base-control {
    margin-bottom: 8px;
}