
/* --- FAQ Page: Category Tabs --- */
/* --- FAQ Page: Table of Contents Styling --- */
/* This targets the main wrapper for all the icon list items */
.woven-grace-theme .faq-toc .uagb-icon-list__wrap {
    gap: 2.5rem;
    justify-content: center;
    align-items: center; /* Vertically align items if they wrap on mobile */
}

/* This targets EACH individual list item's container */
.woven-grace-theme .faq-toc .wp-block-uagb-icon-list-child {
    display: inline-flex; /* Helps with alignment */
    align-items: center;
    cursor: pointer; /* Make the whole item look clickable */
    position: relative; /* Needed for the ::after pseudo-element */
}

/* This targets the TEXT SPAN inside each item */
.woven-grace-theme .faq-toc .uagb-icon-list__label {
    font-weight: 600;
    color: var(--wp--preset--color--primary-text);
    transition: color 0.3s ease;
}

/* This targets the ICON inside each item */
.woven-grace-theme .faq-toc .uagb-icon-list__source-wrap svg {
    fill: var(--wp--preset--color--primary-text); /* Use fill for SVG color */
    width: 1em;  /* Control icon size */
    height: 1em;
    transition: fill 0.3s ease;
}

/* --- The Hover Effect --- */

/* When hovering over the entire item container (the <div>) */
.woven-grace-theme .faq-toc .wp-block-uagb-icon-list-child:hover .uagb-icon-list__label {
    color: var(--wp--preset--color--accent); /* Change text color */
}

.woven-grace-theme .faq-toc .wp-block-uagb-icon-list-child:hover .uagb-icon-list__source-wrap svg {
    fill: var(--wp--preset--color--accent); /* Change icon color */
}

/* Create the underline effect on the item's container */
.woven-grace-theme .faq-toc .wp-block-uagb-icon-list-child::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -5px; /* Adjust position of the underline */
    left: 0;
    background-color: var(--wp--preset--color--accent);
    transform: scaleX(0); /* Initially hidden */
    transform-origin: bottom right;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); /* A smoother ease-out animation */
}

/* When hovering, animate the underline in */
.woven-grace-theme .faq-toc .wp-block-uagb-icon-list-child:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- FAQ Page: Elegant Accordion Styling --- */

/* Main container for the FAQ block */
.woven-grace-theme .elegant-faq {
    margin-top: 3rem;
    border: none;
    background: none;
}

/* Each individual FAQ item (Question + Answer) */
.woven-grace-theme .elegant-faq .uagb-faq-item {
    background-color: transparent;
    border: none;
    border-top: 1px solid var(--wp--preset--color--subtle-border); /* Use a top border as a separator */
    margin-bottom: 0;
    padding: 0;
}

/* Make the last item have a bottom border as well for consistency */
.woven-grace-theme .elegant-faq .uagb-faq-item:last-of-type {
    border-bottom: 1px solid var(--wp--preset--color--subtle-border);
}

/* The clickable question part */
.woven-grace-theme .elegant-faq .uagb-faq-questions-button {
    font-family: var(--wp--preset--font-family--serif-display);
    font-size: 1.25rem; /* Slightly larger font */
    font-weight: 600;
    color: var(--wp--preset--color--primary-text);
    padding: 1.5rem 1rem 1.5rem 0; /* Add padding for space */
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}
.woven-grace-theme .elegant-faq .uagb-faq-questions-button:hover {
    color: var(--wp--preset--color--accent); /* Change color on hover */
}

/* The answer content part */
.woven-grace-theme .elegant-faq .uagb-faq-content {
    padding: 0.5rem 1rem 2rem 1.75rem; /* Increase left padding */
    font-size: 1rem;
    line-height: 1.8;
    color: #4A4A4A; /* Slightly lighter than primary text */
    position: relative; /* Needed for the pseudo-element */
    display: none; /* Let's ensure it's hidden by default */
}

/* Add the colored vertical line */
.elegant-faq .uagb-faq-item.uagb-faq-item-active .uagb-faq-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem; /* Align with the first line of text */
    bottom: 2rem; /* Align with the last line of text */
    width: 2px;
    background-color: var(--wp--preset--color--accent);
    border-radius: 2px;
}

/* Ensure the content is visible when active */
.elegant-faq .uagb-faq-item.uagb-faq-item-active .uagb-faq-content {
    display: block;
}

/* Styling the expand/collapse icon (+/-) */
.woven-grace-theme .elegant-faq .uagb-icon-list__source-icon {
    color: var(--wp--preset--color--accent);
    font-size: 1.2rem; /* Can adjust size if needed */
    font-weight: 300;  /* << MAKE THE ICON LINES THINNER */
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1); /* Smoother rotation animation */
    flex-shrink: 0; 
    margin-left: 1rem;
}

/* When the item is open, rotate the '+' icon to 'x' */
.woven-grace-theme .elegant-faq .uagb-faq-item.uagb-faq-item-active .uagb-icon-list__source-icon {
    transform: rotate(135deg);
}

/* Style for the active/open question */
.woven-grace-theme .elegant-faq .uagb-faq-item.uagb-faq-item-active .uagb-faq-questions-button {
    color: var(--wp--preset--color--accent-dark);
}