/*
 Theme Name:   Eduma Child
 Theme URI:    http://educationwp.thimpress.com/
 Description:  Eduma Child Theme
 Author:       ThimPress
 Author URI:   http://thimpress.com
 Template:     eduma
 Version:      1.0.1
 Text Domain:  eduma-child
*/


/* Accordion Styles */
.accordion-container {
    margin: 2em auto;
}

.ac {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.ac:not(:last-child) {
    border-bottom: 1px solid var(--thim-font-title-color,#ffb606);
}

.ac .ac-header {
    margin: 0;
}


.ac-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 1em 2em 1em 1em;
    color: var(--thim-font-title-color);
    font-weight: 400;
    text-align: left;
    background-color: transparent !important;
    border: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ac-trigger:hover {
    background-color: var(--thim-body-primary-color,#ffb606) !important;
}

.ac-trigger:hover::after {
    color: #fff;
}

/* Chevron icon */

.ac-trigger::after {
    content: '+';
    position: absolute;
    left: 1em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1em;
    color: var(--thim-body-primary-color,#ffb606);
    transition: transform 0.2s ease;
}

.ac.is-active > .ac-header > .ac-trigger::after {
    content: '−';
}

.ac-panel {
    overflow: hidden;
    height: 0;
    transition: height 0.2s ease-in-out;
}

.ac-text {
    padding: 1em;
    margin: 0;
}

/* Remove border from connected accordions */
.ac:not(:first-child) {
    border-top: 0;
}

/* Editor Styles */
.wp-block-eduma-child-accordion {
    margin-bottom: 1rem;
}

.editor-styles-wrapper .ac {
    margin-top: 0.5em;
    border: 1px solid #ddd;
    background-color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.editor-styles-wrapper .ac-trigger {
    position: relative;
    display: block;
    width: 100%;
    padding: 1em 2em 1em 1em;
    color: #111;
    font-weight: 400;
    text-align: left;
    background-color: transparent;
    border: 0;
}

.editor-styles-wrapper .ac-trigger::after {
    content: '';
}

.editor-styles-wrapper .ac-panel {
    display: block !important;
    height: auto !important;
}

.editor-styles-wrapper .ac-text {
    padding: 1em;
    margin: 0;
}

/* Hide the collapse/expand functionality in editor */
.editor-styles-wrapper .ac-panel {
    overflow: visible;
}


.wp-block-eduma-child-accordion .ac:hover .remove-accordion-item {
    opacity: 1;
}

.wp-block-eduma-child-accordion .ac-trigger {
    padding-left: 3em;
}

/* Ensure the plus/minus icon doesn't overlap with remove button in editor */
.editor-styles-wrapper .ac-trigger::after {
    left: 3em;
}

/* Editor wrapper styles */
.accordion-editor-wrapper {
    border: 2px dashed #ccc;
    padding: 20px;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 20px;
}

.accordion-editor-wrapper:before {
    content: 'Accordion';
    display: block;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Make sure the add button is properly spaced */
.accordion-editor-wrapper .add-accordion-item {
    margin-top: 15px;
}

/* Ensure accordion items are properly spaced in editor */
.accordion-editor-wrapper .accordion-container {
    margin: 0;
}

.accordion-editor-wrapper .ac:first-child {
    margin-top: 0;
}

[id]::before {
    display: none;
}