/* =============================================================================
   PXL Inline Tabs — widget-inline-tabs.css
   Compact tabs with image and text inline (side-by-side)
   ============================================================================= */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.pxl-inline-tabs {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.pxl-inline-tabs.pxl-inline-tabs--vertical {
    flex-direction: row;
    align-items: flex-start;
}

/* ── Nav (tab headers) ───────────────────────────────────────────────────── */
.pxl-inline-tabs-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    align-items: stretch;
}

.pxl-inline-tabs--vertical .pxl-inline-tabs-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    margin: 0 16px 0 0;
    flex-shrink: 0;
    align-items: flex-start;
}

/* ── Individual tab header button ───────────────────────────────────────── */
.pxl-inline-tab-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    width: auto;
    /* shrink to content */
    cursor: pointer;
    background: #f5f5f5;
    border: 1px solid #dddddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #666666;
    transition: all .2s ease;
    white-space: nowrap;
}

.pxl-inline-tab-header:hover {
    background-color: #ececec;
}

/* ── Image/Icon inside tab header ────────────────────────────────────────── */
.pxl-inline-tab-img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity .2s ease;
}

.pxl-inline-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    flex-shrink: 0;
    opacity: 0.75;
    color: inherit;
    transition: all .2s ease;
    font-size: 24px;
}

.pxl-inline-tab-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.pxl-inline-tab-header:hover .pxl-inline-tab-img,
.pxl-inline-tab-header:hover .pxl-inline-tab-icon {
    opacity: 0.9;
}

/* Empty image placeholder */
.pxl-inline-tab-img.pxl-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #e8e8e8;
}

/* ── Tab text label ──────────────────────────────────────────────────────── */
.pxl-inline-tab-text {
    display: block;
    color: inherit;
    font-weight: 500;
    /* Allow labels to wrap to multiple lines instead of truncating */
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
    transition: color .2s ease;
}

/* ── Active state ────────────────────────────────────────────────────────── */
.pxl-inline-tab-header.is-active {
    background-color: #ffffff;
    border-color: #000000;
    color: #000000;
}

.pxl-inline-tab-header.is-active .pxl-inline-tab-img,
.pxl-inline-tab-header.is-active .pxl-inline-tab-icon {
    opacity: 1;
}

.pxl-inline-tab-header.is-active .pxl-inline-tab-text {
    color: inherit;
    font-weight: 600;
}

/* ── Content area ────────────────────────────────────────────────────────── */
.pxl-inline-tabs-content {
    flex: 1;
    min-width: 0;
}

.pxl-inline-tab-content-pane {
    display: none;
    padding: 20px;
    background-color: #ffffff;
}

.pxl-inline-tab-content-pane.is-active {
    display: block;
}

/* ── Transition animation ────────────────────────────────────────────────── */
@keyframes pxlInlineTabFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pxl-inline-tab-content-pane.is-active {
    animation: pxlInlineTabFadeIn .2s ease forwards;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {

    /* Force horizontal layout on mobile */
    .pxl-inline-tabs.pxl-inline-tabs--vertical {
        flex-direction: column;
    }

    .pxl-inline-tabs--vertical .pxl-inline-tabs-nav {
        flex-direction: row;
        flex-wrap: wrap;
        margin: 0 0 12px;
    }

    /* Smaller on mobile */
    .pxl-inline-tab-img {
        width: 36px;
        height: 36px;
    }

    .pxl-inline-tab-text {
        font-size: 13px;
        /* Allow wrapping on small screens */
        white-space: normal;
        word-break: break-word;
    }
}