.custom-timepicker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    direction:ltr;
    margin-inline-start:-10px;
}

    .custom-timepicker-wrapper input[type="text"] {
        width: 100%;
        color: transparent;
        position: relative;
        direction: ltr;
        user-select: none;
        pointer-events: none;
    }

[dir="ltr"] .custom-timepicker-wrapper input[type="text"] {
    padding-left: 5px;
}

[dir="rtl"] .custom-timepicker-wrapper input[type="text"] {
    padding-right: 5px;
}

.custom-timepicker-wrapper .timepicker-popup {
    position: absolute;
    top: 100%;
    display: none;
    background-color: #fff;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    margin-top: 5px;
}

[dir="ltr"] .custom-timepicker-wrapper .timepicker-popup {
    left: 0;
}

[dir="rtl"] .custom-timepicker-wrapper .timepicker-popup {
    left: 0;
}

.custom-timepicker-wrapper .popup-label {
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

.custom-timepicker-wrapper .popup-grid {
    display: grid;
    gap: 5px;
    overflow:scroll;
}

.custom-timepicker-wrapper .timepicker-popup-hour .popup-grid {
    grid-template-columns: repeat(6, 1fr);
}

.custom-timepicker-wrapper .timepicker-popup-minute .popup-grid,
.custom-timepicker-wrapper .timepicker-popup-second .popup-grid {
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(6, auto);
}

.custom-timepicker-wrapper .timepicker-popup button {
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    background-color: #f0f0f0;
    transition: background-color 0.3s ease;
    border: none;
}

    .custom-timepicker-wrapper .timepicker-popup button:hover {
        background-color: #ddd;
    }

.custom-timepicker-wrapper .timepicker-popup .active {
    background-color: #000;
    color: white;
}

.custom-timepicker-wrapper .timepicker-spans {
    position: absolute;
    top: 0;
    left: 5px;
    display: flex;
    justify-content: space-between;
    max-width: 180px;
    height: 100%;
    align-items: center;
    color: #333;
    font-size: 16px;
    z-index: 2;
}

[dir="ltr"] .custom-timepicker-wrapper .timepicker-spans {
    left: 5px;
}

[dir="rtl"] .custom-timepicker-wrapper .timepicker-spans {
    right: 5px;
}

.timepicker-spans span {
    display: inline-block;
    width: auto;
    padding: 0 5px;
    font-size: 18px;
    cursor: pointer;
}

.custom-timepicker-wrapper .colon {
    width: auto;
    text-align: center;
}