/* ==============================
   Yiontech Accordion Widget
   Handle: yiontech-accordion
   ============================== */

/* Base accordion styles - fallback for when Tailwind is not available */
.yiontech-accordion {
   
    position: relative;
    display: block;
    box-sizing: border-box;
}



.accordion-item {
    width: 100%;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.accordion-item:last-child {
    margin-bottom: 0;
}

.accordion-button {
    width: 100%;
    padding: 15px 20px;
    font-weight: 600;
    color: #333;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    position: relative;
    z-index: 2; /* Higher z-index to prevent border from being covered */
}

.accordion-button:hover {
    background: #f0f0f0;
}

.accordion-button:focus {
    outline: none;
    box-shadow: none;
}

.accordion-content {
    width: 100%;
    padding: 20px;
    background: white;
    color: #666;
    display: none;
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* Lower z-index than button */
}

.accordion-item.active .accordion-content {
    display: block;
}

.accordion-button .accordion-icon {
    margin-right: 10px;
    flex-shrink: 0;
}

.accordion-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.accordion-item.active .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-button-custom {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.accordion-button-custom:hover {
    background: #0056b3;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .accordion-button {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .accordion-content {
        padding: 15px;
    }
}

/* Animation for content */
.accordion-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}