/* ========== Custom TimePicker ========== */
.tp-input-hidden {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.tp-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.tp-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 0.88rem;
    cursor: pointer;
    transition: border-color var(--transition);
    user-select: none;
}

.tp-display:hover,
.tp-display:focus {
    border-color: var(--accent);
    outline: none;
}

.tp-display::after {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Dropdown */
.tp-dropdown {
    position: fixed;
    background: var(--card-bg, #1a1a1a);
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.06));
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
    width: 200px;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    overflow: hidden;
}

.tp-dropdown.active {
    opacity: 1;
    visibility: visible;
}

/* Selectors */
.tp-selectors {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tp-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tp-column:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.tp-column-label {
    padding: 10px 0;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tp-scroll-box {
    height: 200px;
    overflow-y: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.tp-scroll-box::-webkit-scrollbar {
    width: 3px;
}

.tp-scroll-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.tp-option {
    padding: 8px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition, 0.2s);
}

.tp-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.tp-option.selected {
    background: rgba(48, 92, 222, 0.15);
    color: var(--accent);
    font-weight: 600;
}

/* Actions */
.tp-actions {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
}

.tp-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all var(--transition, 0.2s);
}

.tp-btn-cancel {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.tp-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.tp-btn-ok {
    background: var(--accent);
    color: #fff;
}

.tp-btn-ok:hover {
    opacity: 0.9;
}

/* White Theme */
[data-theme="white"] .tp-display {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.15);
    color: #333;
}

[data-theme="white"] .tp-display::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(0,0,0,0.4)' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
}

[data-theme="white"] .tp-dropdown {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

[data-theme="white"] .tp-column:first-child {
    border-right-color: rgba(0, 0, 0, 0.08);
}

[data-theme="white"] .tp-column-label {
    color: #666;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="white"] .tp-selectors {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="white"] .tp-scroll-box::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="white"] .tp-option {
    color: #666;
}

[data-theme="white"] .tp-option:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #333;
}

[data-theme="white"] .tp-option.selected {
    background: rgba(48, 92, 222, 0.1);
    color: var(--accent);
}

[data-theme="white"] .tp-btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

[data-theme="white"] .tp-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #333;
}

/* Responsive */
@media (max-width: 480px) {
    .tp-dropdown {
        width: 180px;
    }

    .tp-scroll-box {
        height: 180px;
    }

    .tp-option {
        padding: 10px 0;
        font-size: 0.9rem;
    }
}