.time-picker {
    position: absolute;
    width: 207px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 9999;
}

.time-picker-header {
	position: relative;
    padding: 0.5rem 0.79rem;
    border-bottom: 1px solid #e0e0e0;

    .icons-alpytransfers.icn-arrow-left::before{
    	color: black;
    	font-weight: bold !important;
    }
}

.time-picker-label {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
}

.time-picker-selected {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.time-picker-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px 0;
}

.time-slot {
    padding: 0.4rem 0.79rem;
    font-size: 14px;
    color: #333333;
    cursor: pointer;
    transition: background-color 0.2s;
}

.time-slot:hover {
    background-color: #3fc8eb;
    font-weight: bold;
    color: white;
}

.time-slot.selected {
    background-color: #E8F4FD;
    color: #0066CC;
    font-weight: 600;
}

/* Custom scrollbar */
.time-picker-list::-webkit-scrollbar {
    width: 6px;
}

.time-picker-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.time-picker-list::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 10px;
}

.time-picker-list::-webkit-scrollbar-thumb:hover {
    background: #3fc8eb;
    font-weight: bold;
}

/* Mobile fullscreen datepicker */
@media (max-width: 1000px) {
    /* Prevent body scroll when datepicker is open */
    html.datepicker-open,
    body.datepicker-open {
        overflow: hidden;
        width: 100%;
    }

    /* Backdrop */
    body.datepicker-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 9998;
    }

    /* Wrapper for the datepicker modal */
    .datepicker-modal-wrapper {
        position: fixed;
        top: 20px;
        background: white;
        border-radius: 16px;
        padding: 24px;
        z-index: 9999;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        width: 100vw;
        height: 100vh;
        transform: translateY(100vh); /* Start below screen */
        transition: transform 0.2s ease-out;
	}

	.datepicker-modal-wrapper.open {
        transform: translateY(0);
    }

	.datepicker-modal-header {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 16px;
        border-bottom: 1px solid #e5e5e5;
    }

    .datepicker-modal-title {
        font-size: 20px;
        font-weight: bolder;
        color: black;
		margin-bottom: 0;
    }

    .datepicker-modal-close {
        background: none;
        border: none;
        font-size: 32px;
        color: #666;
        position: absolute;
        left: 0;
        transform: translateX(100%);
    }

    .datepicker-modal-close:hover {
        background: #f5f5f5;
    }

    /* Center datepicker */
    .ui-datepicker {
        position: absolute !important;
        top: auto !important;
        left: 50% !important;
        transform: translateX(-50%);
        width: 100%;
        max-width: 380px !important;
        z-index: 9999 !important;
        border: none !important;
        box-shadow: none;
    }
}

/* Mobile timepicker */
@media (max-width: 1000px) {
	html.timepicker-open,
	body.timepicker-open {
		overflow: hidden;
		width: 100%;
	}

	/* Backdrop */
	body.timepicker-open::before {
		content: '';
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.6);
		z-index: 9998;
	}

    .time-picker--mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100vw;
        z-index: 9999 !important;
        background: white;
        border-radius: 12px;
        padding: 5px 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

		.time-picker-header {
			display: flex;
			padding: 0.79rem;
		}

        .time-picker-label {
        	position: absolute;
        	top: 50%;
        	left: 50%;
        	transform: translate(-50%, -50%);
        	font-size: 1rem;
        	text-wrap-mode: nowrap;
        }
    }

	.time-picker-wheel {
        display: flex;
        gap: 10px;
        position: relative;
        margin-bottom: 20px;
    }

    .time-column {
        flex: 1;
        height: 180px;
        overflow-y: scroll;
        position: relative;
        scrollbar-width: none;
    }

    .time-column::-webkit-scrollbar {
        display: none;
    }

    .time-column-wrapper {
        position: relative;
        flex: 1;
    }

    .time-column::before,
    .time-column::after {
        content: '';
        display: block;
        height: 60px;
    }

    .time-item {
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: #ccc;
        transition: all 0.2s ease;
        cursor: pointer;
        user-select: none;
        position: relative;
    }

    .time-item.active {
        color: #333;
        font-weight: 500;
        transform: scale(1.05);
        font-size: 2rem;
    }

    .time-item.near-active {
        color: #999;
    }

    .time-separator {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32px;
        color: #333;
        font-weight: 500;
        width: 20px;
        margin-top: -10px;
    }

    .selector-overlay {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 60px;
        transform: translateY(-50%);
        pointer-events: none;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
        background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.9) 100%);
    }

    .time-picker-submit {
        width: 100%;
        padding: 14px;
        background: #d6293d;
        color: white;
        border: none;
        border-radius: 4px;
        font-size: 1.214rem;
        font-weight: bolder;
        cursor: pointer;
        letter-spacing: 0.5px;
        transition: all 0.2s ease;
        box-shadow: 0 2px 5px rgba(233, 30, 99, 0.3);
        margin-bottom: 30px;
    }

    time-picker-submit:hover {
        background: linear-gradient(90deg, #d81b60 0%, #ad1457 100%);
        box-shadow: 0 4px 8px rgba(233, 30, 99, 0.4);
        transform: translateY(-1px);
    }

    .time-picker-submit:active {
        transform: translateY(0);
        box-shadow: 0 1px 3px rgba(233, 30, 99, 0.3);
    }

    .selected-time-display {
        text-align: center;
        margin-bottom: 15px;
        font-size: 1rem;
        color: #666;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .time-picker-container {
        animation: fadeIn 0.4s ease;
    }

    .time-picker--desktop {
        display: none !important;
    }
}