/* MOL-GOD v1.8.0-rc.2: Tabs → Accordion visual transformation */

/* Override tab header layout: flex column stack */
.molgod-widget .molgod-tab-header.molgod-as-accordion,
.molgod-widget .ms-tab-header.molgod-as-accordion {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: 100%;
}

.molgod-widget .molgod-tab-pair {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    margin: 6px 0;
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s;
}
.molgod-widget .molgod-tab-pair:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(60,80,140,0.08);
}

/* Tab button = accordion header */
.molgod-widget .molgod-as-accordion .ms-tab-btn,
.molgod-widget .molgod-tab-pair > .ms-tab-btn {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1px !important;
    color: #334155 !important;
    background: linear-gradient(180deg,#ffffff,#f8fafc) !important;
    border: none !important;
    border-bottom: 0 !important;
    cursor: pointer !important;
    transition: background .18s, color .18s !important;
    text-align: left !important;
    position: relative;
    gap: 10px;
}
.molgod-widget .molgod-tab-pair > .ms-tab-btn:hover {
    background: linear-gradient(180deg,#eff6ff,#dbeafe) !important;
    color: #1e40af !important;
}
.molgod-widget .molgod-tab-pair > .ms-tab-btn.active {
    background: linear-gradient(180deg,#eff6ff,#dbeafe) !important;
    color: #1e40af !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

/* Chevron */
.molgod-widget .molgod-tab-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: auto;
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    color: #64748b;
    flex-shrink: 0;
}
.molgod-widget .molgod-tab-pair > .ms-tab-btn.active .molgod-tab-chevron {
    transform: rotate(180deg);
    color: #1e40af;
}

/* Tab body — accordion content */
.molgod-widget .molgod-tab-pair > .ms-tab-body {
    display: none !important;
    padding: 14px 16px !important;
    background: #fafbfc;
    animation: molgod-tab-acc-fade .22s cubic-bezier(.4,0,.2,1);
    border-top: 1px solid #e2e8f0;
}
.molgod-widget .molgod-tab-pair > .ms-tab-body.active {
    display: block !important;
}

@keyframes molgod-tab-acc-fade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide original underline indicators from widget-upgrade.css */
.molgod-widget .molgod-as-accordion .ms-tab-btn::after {
    content: none !important;
}

/* Mobile tweaks */
@media (max-width: 500px) {
    .molgod-widget .molgod-tab-pair > .ms-tab-btn {
        padding: 10px 12px !important;
        font-size: 12px !important;
    }
    .molgod-widget .molgod-tab-pair > .ms-tab-body {
        padding: 10px 12px !important;
    }
}
