/* Custom time picker for every input[type=time]. */

.tp-field {
    position: relative;
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    box-sizing: border-box;
    border: 1px solid #E7E4F2;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.tp-field:focus-within {
    border-color: #7C6CF2;
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .16);
}

.tp-field.is-fluid {
    display: block;
    width: 100%;
}

.tp-field.is-fluid > input.tp-ready {
    width: 100%;
}

.tp-field > input.tp-ready,
.tp-field > input.tp-ready:focus,
body.design-v2 .tp-field > input.tp-ready,
body.design-v2 .tp-field > input.tp-ready:focus,
body.app-premium .tp-field > input.tp-ready,
body.app-premium .tp-field > input.tp-ready:focus,
body.app-premium .modal .tp-field > input.tp-ready,
body.app-premium .modal .tp-field > input.tp-ready:focus {
    width: calc(100% + 56px) !important;
    max-width: none !important;
    margin-right: -56px !important;
    padding-right: 8px !important;
    cursor: pointer;
    border: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    background-image: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
}

.tp-field.is-compact > input.tp-ready {
    width: calc(100% + 24px) !important;
    margin-right: -24px !important;
    padding-right: 4px !important;
}

.tp-field > input.tp-ready::-webkit-calendar-picker-indicator,
.tp-field > input.tp-ready::picker-icon,
.tp-field > input.tp-ready::-webkit-clear-button,
.tp-field > input.tp-ready::-webkit-inner-spin-button {
    display: none !important;
    content: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
    background: none !important;
    color: transparent !important;
    position: absolute !important;
    right: -64px !important;
}

.tp-open-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #7C6CF2;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}

.tp-field.is-compact .tp-open-btn {
    width: 22px;
    padding: 0;
}

.tp-open-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

.tp-field.is-compact .tp-open-btn svg {
    width: 14px;
    height: 14px;
}

.tp-open-btn:hover,
.tp-field:focus-within .tp-open-btn {
    color: #6858e4;
}

.tp-field:has(input:disabled),
.tp-field:has(input:read-only) {
    background: #F6F5FA;
    border-color: #E7E4F2;
    cursor: not-allowed;
}

.tp-field:has(input:disabled) .tp-open-btn,
.tp-field:has(input:read-only) .tp-open-btn {
    background: #F6F5FA;
    color: #b7b1c9;
    cursor: not-allowed;
}

body.portal-body .tp-field {
    border-color: rgba(232, 213, 255, .28);
    background: rgba(8, 2, 16, .45);
}

body.portal-body .tp-field:focus-within {
    border-color: #c4b5fd;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .2);
}

body.portal-body .tp-open-btn {
    color: #e7d3a1;
    background: #140818;
}

body.portal-body .tp-open-btn:hover,
body.portal-body .tp-field:focus-within .tp-open-btn {
    color: #f3e7c4;
}

.tp-pop {
    position: fixed;
    z-index: 10050;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 292px;
    max-width: calc(100vw - 16px);
    padding: 14px 12px 12px;
    border: 1px solid #E7E4F2;
    border-radius: 16px;
    background: #fff;
    color: #2C2840;
    box-shadow: 0 18px 48px rgba(44, 40, 64, 0.18);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    overflow: hidden;
    user-select: none;
}

.tp-pop::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7C6CF2, #A78BFA, #C084FC);
    pointer-events: none;
}

.tp-pop[hidden] {
    display: none !important;
}

.tp-head,
.tp-foot {
    flex: none;
}

.tp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.tp-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #b7aef0 transparent;
    touch-action: pan-y;
}

.tp-body::-webkit-scrollbar {
    width: 8px;
}

.tp-body::-webkit-scrollbar-thumb {
    background: #c4bdf0;
    border-radius: 8px;
}

.tp-display {
    display: flex;
    align-items: baseline;
    min-width: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.tp-display.is-empty {
    color: #9a94ad;
    font-weight: 600;
}

.tp-colon {
    margin: 0 1px;
    color: #7C6CF2;
}

.tp-now,
.tp-clear,
.tp-done,
.tp-step,
.tp-opt {
    margin: 0;
    border: 0;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
}

.tp-now,
.tp-clear,
.tp-done,
.tp-step {
    border-radius: 10px;
    font-weight: 600;
}

.tp-now {
    padding: 8px 12px;
    background: #F3F1FE;
    color: #6858e4;
}

.tp-now:hover,
.tp-clear:hover,
.tp-step:hover {
    background: #E7E2FC;
}

.tp-section {
    margin-top: 8px;
}

.tp-label {
    display: block;
    margin: 0 2px 6px;
    color: #6f6986;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tp-label.is-active {
    color: #6858e4;
}

.tp-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: #F7F7FC;
}

.tp-grid.is-active {
    background: #F3F1FE;
    box-shadow: inset 0 0 0 1px #DDD6FE;
}

.tp-opt {
    height: 32px;
    padding: 0;
    border-radius: 8px;
    background: transparent;
    color: #2C2840;
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.tp-opt:hover:not(:disabled):not(.is-selected) {
    background: #fff;
    color: #6858e4;
}

.tp-opt.is-selected,
.tp-opt.is-selected:hover {
    background: #7C6CF2;
    color: #fff;
}

.tp-opt:disabled {
    opacity: 0.28;
    cursor: not-allowed;
}

.tp-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    background: #fff;
}

.tp-pop.is-scroll .tp-foot {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #E7E4F2;
}

.tp-clear,
.tp-done,
.tp-step {
    height: 34px;
}

.tp-clear {
    padding: 0 10px;
    background: transparent;
    color: #6f6986;
}

.tp-stepper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tp-step {
    width: 34px;
    padding: 0;
    background: #F3F1FE;
    color: #6858e4;
    font-size: 18px;
}

.tp-exact {
    min-width: 28px;
    color: #2C2840;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.tp-exact.is-precise {
    color: #6858e4;
}

.tp-done {
    padding: 0 14px;
    background: #7C6CF2;
    color: #fff;
}

.tp-done:hover {
    background: #6858e4;
}

.tp-pop button:focus {
    outline: none;
}

.tp-pop button:focus-visible {
    box-shadow: inset 0 0 0 2px #2C2840;
}

.tp-opt.is-selected:focus-visible,
.tp-done:focus-visible {
    box-shadow: inset 0 0 0 2px #fff;
}

body.design-v2 .tp-field {
    border-color: var(--drda-border);
    border-radius: 10px;
    background: #fff;
}

body.design-v2 .tp-field:focus-within {
    border-color: var(--drda-accent);
    box-shadow: 0 0 0 3px rgba(124, 108, 242, .16);
}

body.design-v2 .tp-open-btn {
    color: #5E4B8B;
    background: #fff;
}

body.design-v2 .tp-open-btn:hover,
body.design-v2 .tp-field:focus-within .tp-open-btn {
    color: #C5A66A;
}

body.design-v2 .tp-field:has(input:disabled),
body.design-v2 .tp-field:has(input:read-only),
body.app-premium .tp-field:has(input:disabled),
body.app-premium .tp-field:has(input:read-only) {
    background: #F6F5FA;
    border-color: #E7E4F2;
    cursor: not-allowed;
}

body.design-v2 .tp-field:has(input:disabled) .tp-open-btn,
body.design-v2 .tp-field:has(input:read-only) .tp-open-btn,
body.app-premium .tp-field:has(input:disabled) .tp-open-btn,
body.app-premium .tp-field:has(input:read-only) .tp-open-btn {
    background: #F6F5FA;
    color: #b7b1c9;
    cursor: not-allowed;
}

body.design-v2 .tp-pop {
    border-color: #E7E4F2;
    box-shadow: 0 16px 40px rgba(53, 34, 72, .16);
    font-family: var(--drda-font, "Plus Jakarta Sans", "Segoe UI", sans-serif);
}

body.design-v2 .tp-pop::before {
    background: linear-gradient(90deg, #5E4B8B, #C5A66A, #7C6CF2, #E7D3A1, #5E4B8B);
}

body.design-v2 .tp-colon,
body.design-v2 .tp-label.is-active,
body.design-v2 .tp-exact.is-precise {
    color: #C5A66A;
}

body.design-v2 .tp-now,
body.design-v2 .tp-step {
    background: #F8F4EC;
    color: #5E4B8B;
}

body.design-v2 .tp-now:hover,
body.design-v2 .tp-clear:hover,
body.design-v2 .tp-step:hover,
body.design-v2 .tp-opt:hover:not(:disabled):not(.is-selected) {
    background: #F3E6F1;
    color: #5E4B8B;
}

body.design-v2 .tp-grid.is-active {
    background: #F8F4EC;
    box-shadow: inset 0 0 0 1px #E7D3A1;
}

body.design-v2 .tp-opt.is-selected,
body.design-v2 .tp-opt.is-selected:hover,
body.design-v2 .tp-done {
    background: #5E4B8B;
    color: #fff;
}

body.design-v2 .tp-done:hover {
    background: #46367A;
}

body.portal-body .tp-pop {
    border-color: rgba(231, 211, 161, .45);
    background: #1a1024;
    color: #f6f1e8;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
}

body.portal-body .tp-pop::before {
    background: linear-gradient(90deg, #8a6a32, #e7d3a1, #f3e7c4, #e7d3a1, #8a6a32);
}

body.portal-body .tp-display.is-empty,
body.portal-body .tp-label,
body.portal-body .tp-clear {
    color: rgba(243, 231, 196, .62);
}

body.portal-body .tp-colon,
body.portal-body .tp-label.is-active {
    color: #e7d3a1;
}

body.portal-body .tp-now,
body.portal-body .tp-step,
body.portal-body .tp-grid {
    background: rgba(231, 211, 161, .12);
    color: #f3e7c4;
}

body.portal-body .tp-opt {
    color: #f6f1e8;
}

body.portal-body .tp-opt.is-selected,
body.portal-body .tp-opt.is-selected:hover,
body.portal-body .tp-done {
    background: #e7d3a1;
    color: #2a0a4a;
}

@media (max-height: 720px) {
    .tp-display {
        font-size: 26px;
    }

    .tp-opt,
    .tp-clear,
    .tp-done,
    .tp-step,
    .tp-now {
        height: 28px;
    }

    .tp-section {
        margin-top: 6px;
    }
}
