/* Tabs Block Pattern Styles */
.tsg-tabs {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* --- Tab Navigation (wp:buttons) --- */
.tsg-tabs > .tsg-tabs-navigation {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px !important;
    margin-bottom: 16px;
    padding: 0;
}

.tsg-tabs-navigation .wp-block-button {
    margin: 0 !important;
}

.tsg-tabs-navigation .wp-block-button__link {
    padding: 10px 24px !important;
    background: #e9f5ec !important;
    color: #155c2d !important;
    border: none !important;
    border-radius: 999px !important;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: system-ui, sans-serif;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.tsg-tabs-navigation .wp-block-button__link:hover {
    background: #368b46 !important;
    color: #ffffff !important;
}

.tsg-tabs-navigation .wp-block-button.is-active .wp-block-button__link {
    background: #155c2d !important;
    color: #ffffff !important;
}

/* --- Tab Panels (wp:group) --- */
.tsg-tabs > .tsg-tab-panel {
    display: none;
    padding: 24px;
    border: none;
    background: #ffffff;
}

.tsg-tabs > .tsg-tab-panel.is-active {
    display: block;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .tsg-tabs > .tsg-tabs-navigation {
        flex-direction: column;
        gap: 6px !important;
    }

    .tsg-tabs-navigation .wp-block-button__link {
        width: 100%;
        text-align: center;
        display: block;
        border-radius: 999px !important;
    }

    .tsg-tabs > .tsg-tab-panel {
        padding: 16px;
    }
}

/* --- Editor: show all panels so content is editable --- */
.editor-styles-wrapper .tsg-tabs > .tsg-tab-panel {
    display: block;
    opacity: 0.5;
    position: relative;
}

.editor-styles-wrapper .tsg-tabs > .tsg-tab-panel.is-active {
    opacity: 1;
}

.editor-styles-wrapper .tsg-tabs > .tsg-tab-panel::before {
    content: attr(data-tab-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #155c2d;
    background: #e9f5ec;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    width: fit-content;
}
