.budi-tab-with-form {
    position: relative;
    width: 100%;
    overflow: visible;
}

.budi-tab-with-form__header {
    margin-bottom: 30px;
}

.budi-tab-with-form__subtitle {
    font-family: var(--font-heading);
    letter-spacing: 5%;
    font-weight: 600 !important;
    margin-bottom: 10px;
    color: var(--color-main, #0056b3);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.budi-tab-with-form__headline {
    font-size: 40px;
    margin-top: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.budi-tab-with-form__tabs-container {
    max-width: fit-content;
    margin: 0 auto;
    border-radius: 500px;
    padding: 10px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.budi-tab-with-form__tabs-container::-webkit-scrollbar {
    display: none;
}

.budi-tab-with-form__tabs-inner {
    border-radius: 500px;
    display: flex;
    justify-content: flex-start;
    /* min-width: min-content; */
}

.budi-tab-with-form__tabs {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin: 0;
    padding: 0;
    width: max-content;
    gap: 15px;
}

.budi-tab-with-form__tab-item {
    position: relative;
    z-index: 2;
    list-style: none;
}

/* Tab button — scoped reset to block global button styles */
.budi-tab-with-form .budi-tab-with-form__tab-button {
    background-color: transparent !important;
    border: none !important;
    font-size: 18px !important;
    font-weight: 500;
    line-height: normal;
    padding: 8px 15px !important;
    margin: 0;
    color: var(--body-text-color) !important;
    transition: color 0.3s ease;
    cursor: pointer;
    border-radius: 0 !important;
    outline: none;
    white-space: nowrap;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    text-decoration: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.budi-tab-with-form .budi-tab-with-form__tab-button:hover,
.budi-tab-with-form .budi-tab-with-form__tab-button:focus {
    outline: none;
    box-shadow: none;
    background: transparent;
}

.budi-tab-with-form .budi-tab-with-form__tab-button.active {
    color: #ffffff !important;
    font-weight: 700;
}

/* Animated Pill */
.budi-tab-with-form__pill {
    position: absolute;
    top: 0;
    left: var(--pill-left, 0px);
    width: var(--pill-width, 0px);
    height: 100%;
    background-color: var(--color-main, #333333);
    border-radius: 500px;
    transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1), width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}

.budi-tab-with-form__content-area {
    max-width: 800px;
    margin: 0 auto;
}

.budi-tab-with-form__form-area {
    margin: 45px auto 0;
    padding: 0 4px;
    position: relative;
    z-index: 2;
}

/* Stacked panes — no height glitch */
.budi-tab-with-form .tab-content {
    position: relative;
}

.budi-tab-with-form .tab-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    color: var(--body-text-color);
}

.budi-tab-with-form .tab-pane.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.budi-tab-with-form__actions-area {
    position: relative;
    z-index: 1;
}

.budi-tab-with-form__action-area {
    margin-top: 45px;
}

/* Ensure smooth WPForm reveal */
.budi-tab-with-form__form-container {
    animation: budiTabFadeIn 0.5s ease forwards;
}

@keyframes budiTabFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Nav wrapper */
.budi-tab-with-form__nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

/* Arrows — hidden on desktop */
.budi-tab-with-form__arrow {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none;
    color: var(--color-main, #333);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0 20px !important;
    -webkit-appearance: none;
    appearance: none;
}

/* ====== TABLET + MOBILE ====== */
@media (max-width: 1200px) {
    .budi-tab-with-form__nav-wrapper {
        position: relative;
        padding: 0 38px;
        background: #FFF;
        border-radius: 100px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }

    .budi-tab-with-form__tabs-container {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        box-shadow: unset;
    }

    .budi-tab-with-form__tabs-container::-webkit-scrollbar {
        display: none;
    }

    .budi-tab-with-form__tabs-inner {
        position: static;
        width: max-content;
        min-width: 100%;
        align-items: center;
        padding: 0;
    }

    .budi-tab-with-form__arrow {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 4;
        color: #fff;
        background: transparent !important;
        width: 32px;
        height: 32px;
        padding: 0 !important;
    }

    .budi-tab-with-form__arrow svg {
        color: var(--color-main);
    }

    .budi-tab-with-form__arrow--prev {
        left: 1%;
    }

    .budi-tab-with-form__arrow--next {
        right: 1%;
    }

    .budi-tab-with-form__tabs {
        width: max-content;
        min-width: 100%;
        overflow: hidden;
    }
}

/* ====== MOBILE ====== */
@media (max-width: 768px) {
    .budi-tab-with-form__headline {
        font-size: 32px;
    }

    .budi-tab-with-form__nav-wrapper {
        width: 100%;
        padding: 0;
        box-shadow: unset;
    }

    .budi-tab-with-form__tabs-container {
        flex: 1;
        min-width: 0;
        max-width: none;
        border-radius: 500px;
        overflow-x: visible;
        overflow-y: visible;
        scroll-behavior: auto;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }

    .budi-tab-with-form__tabs-inner {
        position: relative;
        justify-content: center;
        background: var(--color-main);
        width: auto;
        min-width: 240px;
    }

    .budi-tab-with-form__tabs {
        width: 100%;
        justify-content: center;
        gap: 0;
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .budi-tab-with-form__arrow svg {
        color: #FFF;
    }

    /* Arrows inside the frame */
    .budi-tab-with-form__arrow {
        position: static;
        transform: none;
        z-index: auto;
        color: #fff;
        background: transparent !important;
        width: auto;
        height: auto;
        padding: 0 10px !important;
    }

    /* Hide pill on mobile */
    .budi-tab-with-form__pill {
        display: none;
    }

    /* Hide all tabs except active one */
    .budi-tab-with-form__tab-item {
        display: none;
    }

    .budi-tab-with-form__tab-item.mobile-visible {
        display: block;
        min-width: 0;
        overflow: hidden;
    }

    /* Truncate long tab text with ellipsis */
    .budi-tab-with-form .budi-tab-with-form__tab-button.active {
        color: #FFF !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
        max-width: 100%;
        padding: 8px 0 !important;
    }
}