/* ========================================
   SVG Tabs Widget — Frontend Styles
   ======================================== */

/* Wrapper */
.svg-tabs-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Vertical layout */
.svg-tabs-wrapper.svg-tabs-layout-vertical {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
}

.svg-tabs-wrapper.svg-tabs-layout-vertical .svg-tabs-nav {
    flex-direction: column;
    flex-shrink: 0;
    min-width: 180px;
    border-bottom: none;
    border-right: 1px solid #e0e0e0;
}

.svg-tabs-wrapper.svg-tabs-layout-vertical .svg-tabs-panels {
    flex: 1;
}

/* ----------------------------------------
   Navigation
   ---------------------------------------- */
.svg-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #e0e0e0;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Tab button */
.svg-tabs-nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    outline: none;
    line-height: 1.4;
}

.svg-tabs-nav-item:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.04);
}

.svg-tabs-nav-item.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    background-color: transparent;
}

/* Focus visible for accessibility */
.svg-tabs-nav-item:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: -2px;
}

/* ----------------------------------------
   SVG Icon positioning variants
   ---------------------------------------- */

/* Default: left (row) */
.svg-tabs-nav-item.svg-icon-pos-left {
    flex-direction: row;
}

/* Right */
.svg-tabs-nav-item.svg-icon-pos-right {
    flex-direction: row-reverse;
}

/* Top */
.svg-tabs-nav-item.svg-icon-pos-top {
    flex-direction: column;
}

/* Bottom */
.svg-tabs-nav-item.svg-icon-pos-bottom {
    flex-direction: column-reverse;
}

/* ----------------------------------------
   SVG Icon container
   ---------------------------------------- */
.svg-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.svg-tab-icon svg {
    display: block;
    flex-shrink: 0;
    transition: fill 0.2s ease, stroke 0.2s ease, color 0.2s ease;
    /* Prevent SVGs from inheriting unexpected sizes */
    max-width: 100%;
    max-height: 100%;
}

/* Inherit currentColor for SVGs that use stroke/fill="currentColor" */
.svg-tabs-nav-item .svg-tab-icon svg {
    color: inherit;
}

/* ----------------------------------------
   Panels
   ---------------------------------------- */
.svg-tabs-panels {
    width: 100%;
}

.svg-tabs-panel {
    display: none;
}

.svg-tabs-panel.active,
.svg-tabs-panel[aria-hidden="false"] {
    display: block;
}

/* Remove hidden attr display override */
.svg-tabs-panel:not([hidden]) {
    display: none;
}

.svg-tabs-panel.active {
    display: block !important;
}

/* ----------------------------------------
   Content area
   ---------------------------------------- */
.svg-tabs-content {
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

/* ----------------------------------------
   Tab title text
   ---------------------------------------- */
.svg-tab-title {
    display: inline-block;
}

/* ----------------------------------------
   Responsive
   ---------------------------------------- */
@media (max-width: 767px) {
    .svg-tabs-wrapper.svg-tabs-layout-vertical {
        flex-direction: column;
    }

    .svg-tabs-wrapper.svg-tabs-layout-vertical .svg-tabs-nav {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        min-width: 0;
    }

    .svg-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .svg-tabs-nav-item {
        flex-shrink: 0;
    }
}
