/* Mobile Pricing 3D Carousel - ReactBits Style Adaptation */

.pricing-carousel-wrapper {
    padding: var(--spacing-md) 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.pricing-carousel-container {
    position: relative;
    width: 100%;
    max-width: 400px; /* Keep it compact like the React component */
    /* ReactBits outer container style */
    border: 1px solid rgba(255, 255, 255, 0.15); /* markenbild adaptation of #555 */
    border-radius: 24px;
    padding: 16px;
    background: transparent;
    overflow: hidden;
    margin-top: var(--spacing-md);
    box-sizing: border-box;
    transform: translateZ(0); /* Hardware accel */
}

.pricing-carousel-track {
    position: relative;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden; 
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 40px; /* Space for indicators */
    perspective: 1000px;
    scrollbar-width: none; 
    -ms-overflow-style: none;
    align-items: stretch;
    box-sizing: border-box;
}

.pricing-carousel-track::-webkit-scrollbar {
    display: none;
}

.pricing-carousel-item {
    position: relative;
    flex: 0 0 calc(100% - 32px); /* Leaves space for gaps */
    margin-right: 16px;
    scroll-snap-align: center; /* Center snap for the reactbits feel */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}

.pricing-carousel-item:first-child {
    margin-left: 16px; /* Offset first item */
}

.pricing-carousel-item:last-child {
    margin-right: 0; /* Remove margin to prevent Safari collapse bug */
}

/* Force scrollable space at the end for Safari so the last item can snap to center */
.pricing-carousel-track::after {
    content: "";
    display: block;
    flex: 0 0 16px;
    min-width: 16px;
}

/* Ensure the inner price-card matches ReactBits .carousel-item */
.pricing-carousel-item .price-card {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 24px; 
    transform: none; 
    opacity: 1 !important;
    position: static;
    
    /* ReactBits inner card style */
    background-color: #0d0716; /* the exact dark purple-black from reactbits */
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 16px !important; 
    
    overflow: hidden !important; 
    -webkit-mask-image: -webkit-linear-gradient(white, white);
    mask-image: linear-gradient(white, white);
    box-sizing: border-box;
    
    transform-origin: center center;
    transform-style: preserve-3d;
    will-change: transform;
    transition: opacity 0.5s ease, border-color 0.4s ease, box-shadow 0.4s ease !important;
}

/* Simulate hover effect when the card is active in the center of the mobile screen */
.pricing-carousel-item.active-card .price-card,
.pricing-carousel-item.active-card .paket-card {
    border-color: var(--tab-color, var(--primary-orange));
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px var(--primary-orange-glow, rgba(255, 107, 0, 0.15));
}

/* Indicators Container matching ReactBits */
.pricing-carousel-indicators-container {
    position: absolute;
    bottom: 16px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.pricing-carousel-indicators {
    display: flex;
    width: auto;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
}

.pricing-carousel-indicator {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background-color: #555; /* Inactive color */
    cursor: pointer;
    transition: background-color 150ms, transform 150ms;
}

.pricing-carousel-indicator.active {
    background-color: var(--tab-color, #fff);
    transform: scale(1.2);
}
