/* ===== FLATPICKR TIME BASE ===== */
.flatpickr-time {
    border-top: 1px solid #e6e6e6;
}

/* ===== NUMBER INPUT (HOURS / MINUTES) ===== */
.flatpickr-time .numInputWrapper {
    flex: 1;
    width: 40%;
    height: 40px;
}

/* Hide arrows by default */
.flatpickr-time .numInputWrapper .arrowUp,
.flatpickr-time .numInputWrapper .arrowDown {
    opacity: 0;
    display: block;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}

/* Show arrows on hover / focus */
.flatpickr-time .numInputWrapper:hover .arrowUp,
.flatpickr-time .numInputWrapper:hover .arrowDown,
.flatpickr-time .numInputWrapper:focus-within .arrowUp,
.flatpickr-time .numInputWrapper:focus-within .arrowDown {
    opacity: 1;
}

/* ===== AM / PM WRAPPER ===== */
.flatpickr-time .tbe-ampm-wrapper {
    position: relative;
    width: 58px;
    height: 40px;
}

/* AM/PM text button */
.flatpickr-time .tbe-ampm-wrapper .flatpickr-am-pm {
    width: 100%;
    height: 100%;
    padding-right: 16px;
    cursor: pointer;
    text-align: center;
    min-width: 58px;
}

/* ===== CUSTOM AM/PM ARROWS ===== */
.flatpickr-time .tbe-ampm-arrow {
    position: absolute;
    right: 0;
    width: 16px;
    height: 50%;
    cursor: pointer;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.2s ease;
}

/* Arrow shape */
.flatpickr-time .tbe-ampm-arrow::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

/* Up arrow */
.flatpickr-time .tbe-ampm-arrow-up {
    top: 0;
}

.flatpickr-time .tbe-ampm-arrow-up::after {
    top: 7px;
    border-bottom: 5px solid rgba(57, 57, 57, 0.65);
}

/* Down arrow */
.flatpickr-time .tbe-ampm-arrow-down {
    bottom: 0;
}

.flatpickr-time .tbe-ampm-arrow-down::after {
    bottom: 7px;
    border-top: 5px solid rgba(57, 57, 57, 0.65);
}

/* Show AM/PM arrows on hover */
.flatpickr-time .tbe-ampm-wrapper:hover .tbe-ampm-arrow,
.flatpickr-time .tbe-ampm-wrapper:focus-within .tbe-ampm-arrow {
    opacity: 1;
}

/* Click animation */
.flatpickr-time .tbe-ampm-arrow:active {
    transform: scale(1.2);
}

/* ===== TEXT STYLING ===== */
.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
    color: var(--tbe-primary-color);
    font-size: 14px;
}