/* Time Picker Gallery Widget Styles */
.tpge-gallery {
    font-family: Arial, sans-serif;
    height: 500px;
    overflow: hidden;
}

.tpge-gallery .tpge-container {
    display: flex !important;
    height: 100%;
    gap: 20px;
    flex-direction: row !important; /* Image on left, text on right */
}

.tpge-gallery .tpge-links-section {
    flex: 0 0 55% !important;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tpge-gallery .tpge-images-section {
    flex: 0 0 45% !important;
    position: relative;
}

.tpge-gallery .tpge-selection-indicator {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 50px;
    background: rgba(11, 22, 81, 0.1);
    border: 2px solid #0B1651;
    z-index: 1;
    pointer-events: none;
}

.tpge-gallery .tpge-scroll-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    z-index: 2;
    cursor: pointer;
    background: rgba(11, 22, 81, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tpge-gallery .tpge-scroll-arrow.tpge-top {
    top: 45px;
}

.tpge-gallery .tpge-scroll-arrow.tpge-bottom {
    bottom: 45px;
}

.tpge-gallery .tpge-scroll-arrow::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}

.tpge-gallery .tpge-scroll-arrow.tpge-top::before {
    border-bottom: 10px solid white;
}

.tpge-gallery .tpge-scroll-arrow.tpge-bottom::before {
    border-top: 10px solid white;
}

.tpge-gallery .tpge-links-container {
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    height: 100%;
    padding: 60px 0;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tpge-gallery .tpge-links-container::-webkit-scrollbar {
    display: none;
}

.tpge-gallery .tpge-links-container:active {
    cursor: grabbing;
}

.tpge-gallery .tpge-links-wrapper {
    position: relative;
    padding: 170px 0; /* Add padding for scroll snap */
}

.tpge-gallery .tpge-link {
    scroll-snap-align: center;
    scroll-margin: 170px; /* Match the padding */
    margin: 5px 0;
    height: 60px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    transform-origin: center;
    transition: all 0.5s ease;
}

.tpge-gallery .tpge-link a {
    display: flex;
    padding: 15px 20px;
    background: #0B1651;
    color: white;
    text-decoration: none;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.5s ease !important;
    position: relative;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
}

.tpge-gallery .tpge-link a:hover {
    background: #1a2a5a;
    border-color: white;
}

/* Force the time picker effect to be visible */
.tpge-gallery .tpge-link:not(.selected) a {
    opacity: 0.3 !important;
    filter: blur(2px) !important;
    transform: scale(0.8) !important;
}

.tpge-gallery .tpge-link.selected a {
    background: white !important;
    border-color: #0B1651 !important;
    color: #0B1651 !important;
    opacity: 1 !important;
    filter: blur(0) !important;
    transform: scale(1.05) !important;
    z-index: 10;
    font-weight: bold;
    box-shadow: 0 0 20px rgba(11, 22, 81, 0.3);
}

.tpge-gallery .tpge-link.blurred a {
    opacity: 0.15 !important;
    filter: blur(3px) !important;
    transform: scale(0.7) !important;
}

.tpge-gallery .tpge-link.blurred-top a,
.tpge-gallery .tpge-link.blurred-bottom a {
    opacity: 0.35 !important;
    filter: blur(1.5px) !important;
    transform: scale(0.85) !important;
}

/* Ensure proper z-index for selected item */
.tpge-gallery .tpge-link.selected {
    z-index: 10;
    position: relative;
}

.tpge-gallery .tpge-image-container {
    height: 100%;
    position: relative;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.tpge-gallery .tpge-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: all 0.5s ease;
    transform: scale(1.1);
}

.tpge-gallery .tpge-image.active {
    opacity: 1;
    transform: scale(1);
}

/* Mobile styles */
@media (max-width: 768px) {
    .tpge-gallery {
        height: auto;
        min-height: 400px;
    }

    .tpge-gallery .tpge-container {
        flex-direction: column;
        gap: 10px;
    }

    .tpge-gallery .tpge-links-section {
        flex: none;
        height: 150px !important;
        max-height: 150px !important;
        min-height: 150px !important;
        overflow: hidden;
        order: 2; /* Put links below image on mobile */
    }

    .tpge-gallery .tpge-images-section {
        flex: none;
        height: 250px;
        order: 1; /* Put image above links on mobile */
    }

    .tpge-gallery .tpge-links-container {
        height: 150px !important;
        max-height: 150px !important;
        min-height: 150px !important;
        overflow: hidden;
        padding: 30px 0;
    }

    .tpge-gallery .tpge-links-wrapper {
        padding: 50px 0; /* Reduce padding on mobile */
    }

    .tpge-gallery .tpge-link {
        height: 45px;
        margin-bottom: 8px;
        scroll-margin: 50px; /* Adjust scroll margin for mobile */
    }

    .tpge-gallery .tpge-link a {
        padding: 10px 14px;
        font-size: 13px;
    }

    .tpge-gallery .tpge-selection-indicator {
        height: 45px;
    }

    .tpge-gallery .tpge-scroll-arrow {
        width: 24px;
        height: 24px;
    }

    .tpge-gallery .tpge-scroll-arrow.tpge-top {
        top: 8px;
    }

    .tpge-gallery .tpge-scroll-arrow.tpge-bottom {
        bottom: 8px;
    }

    .tpge-gallery .tpge-scroll-arrow::before {
        width: 8px;
        height: 8px;
        border-width: 2px;
    }

    .tpge-gallery .tpge-link.selected a {
        transform: scale(1.05);
    }

    .tpge-gallery .tpge-link.blurred a {
        opacity: 0.1;
        filter: blur(4px);
        transform: scale(0.6);
    }

    .tpge-gallery .tpge-link.blurred-top a,
    .tpge-gallery .tpge-link.blurred-bottom a {
        opacity: 0.25;
        filter: blur(2px);
        transform: scale(0.8);
    }
	
	.link.selected {
    width: 302px !important;
    height: 47px;
}
}
