/* Phone selector styling for both desktop and mobile views */
/* Desktop view - grid layout */
.phone-selector-carousel.desktop-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    width: 100%;
}

.phone-selector-carousel.desktop-view .phone-brand-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mobile view - Swiper carousel */
.phone-selector-carousel.mobile-view {
    position: relative;
    overflow: hidden;
    padding-bottom: 40px; /* Space for pagination */
    max-height: 80vh; /* Limit height on mobile to enable proper scrolling */
    height: auto;
    touch-action: pan-y; /* Enable vertical scrolling on touch devices */
}

/* Swiper pagination bullets styling */
.phone-selector-carousel.mobile-view .swiper-pagination {
    position: absolute;
    bottom: 0;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
    z-index: 10;
}

.phone-selector-carousel.mobile-view .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d1d1;
    opacity: 1;
    margin: 0 5px;
    transition: all 0.2s ease;
}

.phone-selector-carousel.mobile-view .swiper-pagination-bullet-active {
    background: #000000;
    transform: scale(1.2);
}

/* Navigation arrows styling */
.phone-selector-carousel.mobile-view .swiper-button-next,
.phone-selector-carousel.mobile-view .swiper-button-prev {
    color: #000;
    background: rgba(255, 255, 255, 0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.phone-selector-carousel.mobile-view .swiper-button-next:after,
.phone-selector-carousel.mobile-view .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.phone-selector-carousel.mobile-view .swiper-button-next:hover,
.phone-selector-carousel.mobile-view .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.8);
}

.phone-selector-carousel.mobile-view .swiper-button-disabled {
    opacity: 0.3;
    cursor: auto;
    pointer-events: none;
}

/* Hover state for pagination bullets */
.phone-selector-carousel.mobile-view .swiper-pagination-bullet:hover {
    background: #888888;
}

/* Phone Brand Item Styling */
.phone-brand-item {
    padding: 10px;
    transition: all 0.3s ease;
}

.phone-brand-bubble {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.phone-brand-bubble:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.phone-brand-bubble img.brand-logo {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
}

.phone-brand-bubble .brand-name {
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

/* Responsive grid layout for larger screens */
@media (min-width: 768px) {
    .phone-selector-carousel:not(.mobile-view) {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 20px;
    }
}

/* Model Selection Dialog Styles */
.model-selection-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.model-selection-content {
    background: #fff;
    border-radius: 8px;
    max-width: 90%;
    width: 600px;
    max-height: 80vh;
    overflow-y: auto; /* Enable vertical scrolling */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding: 20px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.model-selection-content .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
}

.model-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.model-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    transition: all 0.3s ease;
    border-radius: 8px;
    cursor: pointer;
}

.model-item:hover {
    background-color: #f5f5f5;
    transform: translateY(-5px);
}

.model-item img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.model-item .model-name {
    font-weight: 600;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    .model-selection-content {
        width: 95%;
        max-height: 70vh;
        padding: 15px;
    }
    
    .model-selection-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }
}