/* 🕰️ Premium Glassmorphic Grid Time Picker */

.time-picker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 90px;
}

.time-picker-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

.time-picker-btn:active {
    transform: translateY(1px);
}

.time-picker-btn svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Popover Wrapper */
.time-picker-popover {
    position: absolute;
    z-index: 10000;
    width: 320px;
    background: rgba(20, 20, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform-origin: top center;
    transform: scale(0.95) translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s;
    overflow: hidden;
}

.time-picker-popover.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

/* Header */
.tp-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.tp-header-val {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
}

.tp-header-val:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tp-header-val.active {
    color: #fff;
    background: rgba(var(--blue-rgb), 0.15);
}

.tp-separator {
    font-size: 24px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
}

/* Grids Container */
.tp-views-container {
    position: relative;
    height: 180px; /* Fixed height for consistent layout */
}

.tp-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.tp-view.active {
    display: block;
}

/* Grid Layouts */
.tp-grid {
    display: grid;
    gap: 8px;
    height: 100%;
}

.tp-grid-hours {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
}

.tp-grid-minutes {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
}

/* Grid Items */
.tp-grid-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text2);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.tp-grid-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(1.05);
}

.tp-grid-item:active {
    transform: scale(0.95);
}

.tp-grid-item.selected {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(var(--blue-rgb), 0.4);
    transform: scale(1.05);
}
