.date-picker {
    width: 100%;
    height: 80px;
    overflow: hidden;
    position: relative;
    background: #fff;
    font-family: var(--serif-font);

}

.date-picker-container {
    display: flex;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, filter 0.4s ease-out;
    /* Prevent scroll chaining to the page and allow horizontal panning only */
    overscroll-behavior: contain;
    touch-action: pan-x;
}

/* Perspective Zoom Transition */
.date-picker-container {
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.date-picker-container.transitioning.forward {
    opacity: 0.2;
    transform: scale(1.3) translateZ(-100px);
}

.date-picker-container.transitioning.backward {
    opacity: 0.2;
    transform: scale(0.7) translateZ(100px);
}

.date-picker-container::-webkit-scrollbar {
    display: none;
}

.timeband-item {
    min-width: 80px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.25s ease-out, transform 0.25s ease-out, opacity 0.25s ease-out;
    position: relative;
    opacity: 1;
}

/* Timeband-specific min-widths */
.timeband-month .timeband-item {
    min-width: 100px;
}

.timeband-year .timeband-item {
    min-width: 120px;
}

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

.timeband-item.selected {
    background-color: #007bff;
    color: white;
}

.timeband-item.in-range {
    background-color: #e3f2fd;
    color: #1976d2;
}

.timeband-item.range-start {
    background-color: #007bff;
    color: white;
}

.timeband-item.range-end {
    background-color: #007bff;
    color: white;
}

.timeband-item.today .day-number {
    text-decoration: underline;
}

.timeband-item.locked.today {
    border-color: #ffc107;
}

.primary-text {
    font-size: 18px;
    font-weight: 500;
    transition: font-size 0.25s ease-out;
}

.secondary-text {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
    transition: font-size 0.25s ease-out, opacity 0.25s ease-out;
}

.tertiary-text {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 1px;
    transition: font-size 0.25s ease-out, opacity 0.25s ease-out;
}

/* Legacy classes for backward compatibility */
.day-number {
    font-size: 18px;
    font-weight: 500;
}

.day-name {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}

.month-year {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 1px;
}

/* Timeband-specific styles */
.timeband-day .primary-text {
    font-size: 18px;
}

.timeband-day .secondary-text {
    font-size: 12px;
}

.timeband-day .tertiary-text {
    font-size: 10px;
}

.timeband-month .primary-text {
    font-size: 16px;
}

.timeband-month .secondary-text {
    font-size: 14px;
}

.timeband-month .tertiary-text {
    font-size: 11px;
}

.timeband-year .primary-text {
    font-size: 20px;
}

.timeband-year .secondary-text {
    font-size: 14px;
}

.timeband-year .tertiary-text {
    font-size: 12px;
}

/* Demo styles */
.demo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.controls button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.controls button:hover {
    background-color: #f5f5f5;
}

.selected-range {
    margin-left: 20px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

/* Range indicators */
.date-picker-range-indicator {
    position: absolute;
    top: 10px;
    transform: translateY(-50%);
    width: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.date-picker-range-indicator.left {
    left: 0;
    border-radius: 0 10px 10px 0;
}

.date-picker-range-indicator.right {
    right: 0;
    border-radius: 10px 0 0 10px;
}

/* Hover info */
.date-picker-hover-info {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
    font-size: 12px;
    text-align: center;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 4px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.date-picker-hover-overlay {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    font-size: 11px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 4px;
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    display: none;
}
