/* =====================================================
   Custom Scrollable Time Picker
   3-column layout: Hours | Minutes | AM/PM
   ===================================================== */

/* Wrapper around the input — positioned relative so the
   dropdown can anchor to it */
.custom-timepicker-wrap {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
}
/* same sizing as bootstrap .input-group > .form-control (Gijgo wrapper parity) */
.custom-timepicker-wrap > input {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

/* The dropdown panel that appears on click */
.custom-timepicker-dropdown {
    display: none;
    position: absolute;
    z-index: 10500;
    top: 0;
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 2px solid #1a73e8;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    padding: 0;
    font-family: inherit;
    overflow: hidden;
}
.custom-timepicker-dropdown.open {
    display: block;
}

/* ── Header row: shows current selection ── */
.ctp-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: #fff;
    border-bottom: 2px solid #1a73e8;
    padding: 8px 0 6px;
    font-weight: 700;
    font-size: 14px;
    color: #333;
}
.ctp-header .ctp-hdr-cell {
    flex: 1;
    text-align: center;
    padding: 0 2px;
}
.ctp-header .ctp-hdr-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 2px;
}
.ctp-header .ctp-hdr-val {
    display: inline-block;
    min-width: 36px;
    padding: 3px 8px;
    border: 2px solid #1a73e8;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font-size: 16px;
    font-weight: 700;
}
.ctp-header .ctp-hdr-ampm .ctp-hdr-val {
    border-color: #1a73e8;
    background: #1a73e8;
    color: #fff;
}

/* ── Columns (scrollable lists) ── */
.ctp-columns {
    display: flex;
    border-top: none;
}
.ctp-col {
    flex: 1;
    max-height: 200px;
    overflow-y: auto;
    border-right: 1px solid #eee;
    scrollbar-width: thin;
}
.ctp-col:last-child {
    border-right: none;
}
/* Custom scrollbar */
.ctp-col::-webkit-scrollbar {
    width: 4px;
}
.ctp-col::-webkit-scrollbar-track {
    background: #f9f9f9;
}
.ctp-col::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

/* Individual option in a column */
.ctp-col .ctp-option {
    display: block;
    width: 100%;
    padding: 8px 0;
    text-align: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #444;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    border: none;
    background: none;
    line-height: 1.4;
}
.ctp-col .ctp-option:hover {
    background: #f0f6ff;
    color: #1a73e8;
}
.ctp-col .ctp-option.selected {
    background: #1a73e8;
    color: #fff;
    font-weight: 700;
}

/* ── Footer ── */
.ctp-footer {
    display: none; /* hidden by default; we auto-apply on selection */
}

/* ── Mobile responsive ── */
@media (max-width: 480px) {
    .custom-timepicker-dropdown {
        min-width: 190px;
        left: 0;
        right: auto;
    }
}
