/* Accordion Container */
.thha-accordion {
    overflow: hidden;
}
i.thha-icon{
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('../img/accordion.svg');
    background-repeat: no-repeat;
    background-size: contain;
}
i.hugeicon-accordion{
    background-image: url('../img/accordion.svg');
}

/* Accordion Item */
.thha-accordion .thha-accordion-item {
    border: 1px solid #ddd;
    margin-bottom: 10px; 
}

.thha-accordion .thha-accordion-item:last-child {
    margin-bottom: 0; 
}

/* Accordion Title */
.thha-accordion .thha-accordion-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    transition: background-color 0.3s ease;
    position: relative;
}

.thha-accordion .thha-accordion-title:hover {
    background-color: #e9e9e9;
}

.thha-accordion .thha-accordion-icon {
    width: 16px; 
    height: 16px;
    margin-left: 10px;
    position: absolute;
    right: 15px;
    top: 50%; 
    transform: translateY(-50%); 
    display: flex; 
    align-items: center;
    justify-content: center;
    
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0s 0.3s;
}

/* Specific state for the closed icon */
.thha-accordion .thha-accordion-icon.accordion-icon-closed {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) rotate(0deg); 
    z-index: 2; 
}

/* Specific state for the open icon */
.thha-accordion .thha-accordion-icon.accordion-icon-open {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) rotate(-90deg); 
    z-index: 1; 
}


/* Hide the closed icon when active */
.thha-accordion .thha-accordion-item.active .thha-accordion-icon.accordion-icon-closed {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) rotate(90deg); 
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0s 0.3s;
}

/* Show the open icon when active */
.thha-accordion .thha-accordion-item.active .thha-accordion-icon.accordion-icon-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) rotate(0deg); 
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Accordion Content */
.thha-accordion .thha-accordion-content {
    max-height: 0;
    overflow: hidden;
    font-size: 14px;
    color: #555;
    background-color: #fff;
    transition: max-height 0.3s ease-in-out;
}


/* Active Content Display */
.thha-accordion .thha-accordion-item.active .thha-accordion-content {
    padding: 15px;
    max-height: 1000px;
}

/* SVG Icons */
.thha-accordion .thha-accordion-icon svg {
    width: 100%; 
    height: 100%;
    fill: currentColor;
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .thha-accordion .thha-accordion-title {
        font-size: 14px;
        padding: 12px;
    }
    .thha-accordion .thha-accordion-icon {
        right: 12px;
    }
}