/******************** Custom Accordion Icon (v6.9) ********************/

/* Base icon styling */
.wp-block-accordion-heading__toggle-icon {

    /* 1. Layout & Size */
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: middle;

    /* 2. Hide text */
    font-size: 0 !important;

    /* 3. Color logic — inherit text color */
    background-color: currentColor;

    /* 4. SVG Mask */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20stroke-width%3D%221.5%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20color%3D%22%23000000%22%3E%3Cpath%20d%3D%22M6%2012H12M18%2012H12M12%2012V6M12%2012V18%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20width%3D%2224px%22%20height%3D%2224px%22%20stroke-width%3D%221.5%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20color%3D%22%23000000%22%3E%3Cpath%20d%3D%22M6%2012H12M18%2012H12M12%2012V6M12%2012V18%22%20stroke%3D%22%23000000%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E");


    -webkit-mask-size: contain;
    mask-size: contain;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    /* 5. Animation */
    transition: transform 0.2s ease;
    transform-origin: center;
}


/* Rotate 180° when accordion is open */
button[aria-expanded="true"] .wp-block-accordion-heading__toggle-icon {
    transform: rotate(-45deg) !important;
}


/* Adjust transition timing if needed */
.wp-block-accordion-item > .wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
    transition: transform 0.2s ease-in-out;
}

/************** Animation for the 6.9 Accordion **************/

/* 1. The Panel: Hidden by default */
.wp-block-accordion-panel {
	display: grid !important;
	grid-template-rows: 0fr !important; /* 0 height */
    padding-bottom: 0 !important;
    opacity: 0 !important;
	transition: grid-template-rows 0.2s ease-out, opacity 0.2s ease-out !important; /* The Smooth Animation */
}

/* 2. The Content Wrapper */
/* We target the direct child of the panel (the <p> tag in your code) */
.wp-block-accordion-panel > * {
	overflow: hidden !important;
}

/* 3. The Active State */
/* When JS adds this class, the grid expands to 1 fraction (full height) */
.wp-block-accordion-panel.is-open {
	grid-template-rows: 1fr !important;
    padding-bottom: 1.5rem !important;
    opacity: 1 !important;
}

/* Editor override: ensure accordion panels are visible in editor */
.editor-styles-wrapper .wp-block-accordion-panel {
    padding-bottom: 1.5rem !important;
    opacity: 1 !important;
    display: block !important;
}