.time-picker-wrapper {
    position: relative;
}

.time-picker-input {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 50px 16px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    color: #2d3748;
}

.time-picker-input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
    outline: none;
}

.time-picker-input:hover {
    border-color: #cbd5e0;
}

.time-picker-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 20px;
    pointer-events: none;
    transition: color 0.3s ease;
}

.time-picker-wrapper:hover .time-picker-icon {
    color: #718096;
}

.time-picker-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 320px;
    padding: 0;
    overflow: hidden;
}

.time-picker-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.time-picker-header {
    background: white;
 padding: 10px 15px 10px;
    border-bottom: 1px solid #f7fafc;
}

.time-picker-title {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
    display: block;
    margin-bottom: 12px;
}

.selected-time-display {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.selected-time-display i {
    color: #a0aec0;
    font-size: 16px;
    margin-right: 8px;
}

.format-toggle {
	display: flex;
	padding: 0 2px 0px;
	gap: 0;
	border-bottom: 1px solid #f7fafc;
	background: #f8f9fa;
	margin: 7px 6px 0px 5px;
	border-radius: 8px;
}

.format-btn {
	background: transparent;
	border: none;
	border-radius: 6px;
	padding: 5px 20px;
	font-size: 13px;
	font-weight: 500;
	color: #6b7280;
	cursor: pointer;
	transition: all 0.2s ease;
	flex: 1;
	text-align: center;
	margin: 4px;
}

.format-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.format-btn.active {
    background: white;
    color: #1f2937;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.time-selectors {
    display: flex;
    padding: 24px;
    gap: 40px;
    justify-content: center;
}

.time-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 80px;
}

.scroll-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 12px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.scroll-btn:hover {
    color: #6b7280;
    background: #f3f4f6;
}

.scroll-btn:active {
    transform: scale(0.95);
}

.scroll-btn.scroll-down {
    margin-bottom: 0;
    margin-top: 8px;
}

.time-list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	height: 160px;
	overflow: hidden;
	padding: 0;
	min-width: 60px;
	position: relative;
	overflow-y: scroll;
}

.time-item {
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-width: 40px;
    text-align: center;
    user-select: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
}

.time-item:hover {
    background: #f3f4f6;
    color: #374151;
}

/* .time-item.active {
    background: #f97316;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
} */

.time-item.active {
    background: #0f89ff;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(76, 167, 233, 0.3);
}

.select-time-btn {
	width: calc(100% - 48px);
	background: #1f2937;
	color: white;
	border: none;
	padding: 10px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	text-transform: capitalize;
	border-radius: 6px;
	margin: 0 24px 24px;
}

.select-time-btn:hover {
    background: #111827;
    transform: translateY(-1px);
}

.select-time-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .time-picker-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-10px);
        min-width: 300px;
        max-width: 90vw;
    }

    .time-picker-dropdown.show {
        transform: translateX(-50%) translateY(0);
    }

    .time-selectors {
        padding: 20px 16px;
        gap: 32px;
    }

    .time-item {
        padding: 6px 10px;
        font-size: 15px;
        min-width: 36px;
        height: 32px;
    }

    .format-toggle {
        margin: 0 16px;
        padding: 0 16px 16px;
    }

    .time-picker-header {
        padding: 16px 20px 12px;
    }

    .select-time-btn {
        width: calc(100% - 32px);
        margin: 0 16px 20px;
    }
}

@media (max-width: 576px) {
    .time-picker-dropdown {
        min-width: 280px;
    }

    .time-selectors {
        gap: 24px;
        padding: 16px 12px;
    }

    .time-column {
        min-width: 70px;
    }

    .time-item {
        min-width: 32px;
        padding: 6px 8px;
        font-size: 14px;
        height: 30px;
    }
}

/* Smooth scrolling animation */
.time-list.scrolling {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced hover effects */
.time-picker-wrapper:hover .time-picker-input {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Focus states for accessibility */
.format-btn:focus,
.scroll-btn:focus,
.time-item:focus,
.select-time-btn:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* Custom scrollbar styling */
.time-list::-webkit-scrollbar {
    display: none;
}

.time-list {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Loading state */
.time-picker-wrapper.loading .time-picker-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Accessibility improvements */
.time-picker-wrapper[aria-expanded="true"] .time-picker-input {
    border-color: #4299e1;
}

.time-item[aria-selected="true"] {
    background: #f97316;
    color: white;
}

/* Print styles */
@media print {
    .time-picker-dropdown {
        display: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .time-picker-input {
        border-width: 3px;
    }

    .time-item.active {
        border: 2px solid #1f2937;
    }
}

/* Smooth transitions for time list items */
.time-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced shadow for dropdown */
.time-picker-dropdown {
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Better visual hierarchy */
.time-picker-title {
    text-transform: capitalize;
    letter-spacing: 0.025em;
}

.selected-time-display {
    letter-spacing: -0.025em;
}

/* Improved button states */
.format-btn:not(.active):hover {
    transform: translateY(-1px);
}

.scroll-btn:hover {
    transform: translateY(-1px);
}

/* Better spacing for mobile */
@media (max-width: 480px) {
    .time-picker-input {
        padding: 14px 45px 14px 16px;
        font-size: 15px;
    }

    .time-picker-icon {
        right: 16px;
        font-size: 18px;
    }

    .time-selectors {
        padding: 16px 8px;
        gap: 20px;
    }

    .time-list {
        height: 140px;
    }
}

/* Time list container positioning */
.time-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Ensure proper spacing and no overlap */
.time-column .scroll-btn:first-child {
    margin-bottom: 12px;
}

.time-column .scroll-btn:last-child {
    margin-top: 12px;
}

/* Visual feedback for time updates */
.time-picker-input.time-updated {
    border-color: #48bb78 !important;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1) !important;
}
