/* assets/tabs-style.css
 *
 * Styles for the [custom_tabs] shortcode output.
 */

.tabs {
    background-color: #fff;
    border: 1px solid #e2e7e9;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.tabs__tablist {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #d1d5db;
}

.tabs__tab {
    border: none;
    background-color: #f3f4f6;
    border-bottom: 2px solid transparent;
    color: #374151;
    cursor: pointer;
    flex-grow: 1;
    line-height: 1;
    padding: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
    font-size: 1rem;
    font-family: inherit;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-bottom 0.2s ease;
}

.tabs__tab:hover {
    background: #e5e7eb;
}

.tabs__tab[aria-selected="true"] {
    background: #ffffff;
    color: #111827;
    border-bottom: 4px solid #4b5563;
    font-weight: 600;
}

.tabs__tab:focus-visible {
    outline: 2px solid #9ca3af;
    outline-offset: -2px;
}

.tabs__panel {
    padding: 1rem;
}

.tabs__panel[hidden] {
    display: none;
}

/* -------------------------------------------------------
   Responsive: stack tabs vertically on narrow screens
   ------------------------------------------------------- */

@media ( max-width: 600px ) {
    .tabs__tablist {
        flex-direction: column;
    }

    .tabs__tab {
        text-align: left;
        border-bottom: 1px solid #e2e7e9;
        border-left: 3px solid transparent;
    }

    .tabs__tab[aria-selected="true"] {
        border-bottom: 1px solid #e2e7e9;
        border-left: 4px solid #4b5563;
    }
}
