﻿@import "../../../Styles/functions.scss";
@import "../../../Styles/media-queries.scss";

.bit-dtrp {
    margin: 0;
    padding: 0;
    box-shadow: none;
    font-weight: 400;
    position: relative;
    box-sizing: border-box;
    font-size: spacing(2.25);
    font-family: $tg-font-family;

    &.bit-dis {
        .bit-dtrp-lbl {
            color: $clr-fg-dis;
        }

        .bit-dtrp-icn {
            cursor: default;
            pointer-events: none;
            color: $clr-fg-dis;
            background: none $clr-bg-dis;
            border: $shp-border-width $shp-border-style $clr-brd-dis;
        }

        .bit-dtrp-ico {
            cursor: default;
            color: $clr-fg-dis;
        }

        .bit-dtrp-inp {
            cursor: default;
            color: $clr-fg-dis;
            background: none $clr-bg-dis;
        }

        .bit-dtrp-pkt,
        .bit-dtrp-nbt,
        .bit-dtrp-wlb,
        .bit-dtrp-dbt,
        .bit-dtrp-pkb,
        .bit-dtrp-ptb,
        .bit-dtrp-tdv {
            color: $clr-fg-dis;
        }
    }

    &.bit-inv {
        .bit-dtrp-icp {
            border-color: $clr-err;
        }
    }

    &.bit-rtl {
        .bit-dtrp-am-pm {
            order: -1;
            direction: rtl;
        }
    }
}

.bit-dtrp-lbl {
    margin: 0;
    display: block;
    box-shadow: none;
    font-weight: 600;
    box-sizing: border-box;
    padding: spacing(0.5) 0;
    font-size: spacing(1.75);
    overflow-wrap: break-word;
    color: $clr-fg-pri;
}

.bit-dtrp-wrp {
    position: relative;
}

.bit-dtrp-icn {
    margin: 0;
    display: flex;
    gap: spacing(1);
    cursor: pointer;
    box-shadow: none;
    height: spacing(4);
    position: relative;
    align-items: center;
    flex-flow: row nowrap;
    padding: 0 spacing(1);
    box-sizing: border-box;
    border-radius: $shp-border-radius;
    background-color: $clr-bg-pri;
    border: $shp-border-width $shp-border-style $clr-brd-pri;
}

.bit-dtrp-ico {
    padding: 0;
    cursor: pointer;
    color: $clr-fg-sec;
}

.bit-dtrp-clr {
    display: flex;
    width: spacing(3.75);
    height: spacing(3.75);
    justify-content: center;
    align-items: center;
    background-color: $clr-bg-sec;
    cursor: pointer;

    i {
        speak: none;
        width: unset;
        pointer-events: none;
        display: inline-block;
        font-size: spacing(1.5);
        color: $clr-fg-sec;
    }

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }
}

.bit-dtrp-inp {
    margin: 0;
    outline: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
    height: 100%;
    border: none;
    cursor: pointer;
    box-shadow: none;
    font-weight: 400;
    border-radius: 0;
    box-sizing: border-box;
    text-overflow: ellipsis;
    font-size: spacing(1.75);
    background: none transparent;
    color: $clr-fg-pri;
    font-family: $tg-font-family;
}

.bit-dtrp-ein {
    cursor: default;
}

.bit-dtrp-lic {
    .bit-dtrp-icn {
        flex-direction: row-reverse;
    }

    .bit-dtrp-ico {
        padding-left: 0;
        padding-right: spacing(1);
    }
}

.bit-dtrp-foc {
    .bit-dtrp-icn::after {
        content: "";
        position: absolute;
        pointer-events: none;
        inset: spacing(-0.125);
        border-radius: $shp-border-radius;
        border: spacing(0.25) $shp-border-style $clr-pri;
    }
}

.bit-dtrp-cal {
    display: none;
    position: fixed;
    font-weight: 400;
    outline: transparent;
    box-sizing: border-box;
    z-index: $zindex-callout;
    font-size: spacing(1.75);
    animation-fill-mode: both;
    animation-duration: 0.367s;
    font-family: $tg-font-family;
    box-shadow: $box-shadow-callout;
    border-radius: $shp-border-radius;
    animation-name: bit-fade-show, bit-slide-down;
    animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
}

.bit-dtrp-cac {
    height: 100%;
    outline: none;
    position: relative;
    overflow: hidden auto;
    border-radius: $shp-border-radius;
    background-color: $clr-bg-pri;
}

.bit-dtrp-grp {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    outline: none;
    box-shadow: none;
    box-sizing: border-box;
}

.bit-dtrp-sdt {
    height: 0;
    border: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: absolute;
    width: spacing(0.125);
}

.bit-dtrp-dwp {
    margin: 0;
    display: flex;
    box-shadow: none;
    padding: spacing(1.5);
    min-width: spacing(26);
    box-sizing: content-box;
    flex-flow: column nowrap;
}

.bit-dtrp-dgd {
    border-spacing: 0;
    position: relative;
    text-align: center;
    font-size: inherit;
    table-layout: fixed;
    margin-top: spacing(0.5);
    border-collapse: collapse;
    margin-bottom: spacing(1.25);
}

.bit-dtrp-dgh,
.bit-dtrp-dgr {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-evenly;
}

.bit-dtrp-wlb {
    margin: 0;
    padding: 0;
    width: 100%;
    border: none;
    aspect-ratio: 1;
    font-weight: 400;
    color: $clr-fg-pri;
    position: relative;
    text-align: center;
    font-size: spacing(1.5);
    line-height: spacing(3.5);
    animation-fill-mode: both;
    animation-duration: 0.267s;
    animation-name: bit-fade-show;
    animation-timing-function: cubic-bezier(0.1, 0.25, 0.75, 0.9);
}

.bit-dtrp-dbt {
    padding: 0;
    border: none;
    display: flex;
    cursor: pointer;
    overflow: visible;
    position: relative;
    width: spacing(3.5);
    align-items: center;
    height: spacing(3.5);
    outline: transparent;
    font-weight: inherit;
    box-sizing: border-box;
    font-size: spacing(1.5);
    line-height: spacing(3);
    justify-content: center;
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:active {
        background-color: $clr-bg-pri-active;
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;
        color: $clr-fg-dis;
    }
}

.bit-dtrp-dbo {
    font-weight: 400;
    color: $clr-fg-sec;
}

.bit-dtrp-dtd {
    font-weight: 600;
    border-radius: 50%;
    color: $clr-pri-text;
    background-color: $clr-pri;

    @media(hover: hover) {
        &:hover {
            background-color: $clr-pri-hover;
        }
    }

    &:active {
        background-color: $clr-pri-active;
    }
}

.bit-dtrp-dss {
    color: $clr-pri-text;
    background-color: $clr-pri;
    border-end-end-radius: 0;
    border-start-end-radius: 0;
    border-end-start-radius: spacing(1);
    border-start-start-radius: spacing(1);

    @media (hover: hover) {
        &:hover {
            background-color: $clr-pri-hover;
        }
    }
}

.bit-dtrp-dse {
    color: $clr-pri-text;
    background-color: $clr-pri;
    border-end-end-radius: spacing(1);
    border-start-end-radius: spacing(1);
    border-end-start-radius: 0;
    border-start-start-radius: 0;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-pri-hover;
        }
    }
}

.bit-dtrp-dsse {
    border-radius: spacing(1);
}

.bit-dtrp-dsb {
    border-radius: 0;
    color: $clr-fg-pri;
    background-color: $clr-pri-light;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-pri-hover;
        }
    }
}

.bit-dtrp-wnm {
    display: flex;
    font-weight: 400;
    width: spacing(3.5);
    align-items: center;
    height: spacing(3.5);
    box-sizing: border-box;
    font-size: spacing(1.5);
    justify-content: center;
    padding: spacing(0.375) 0 0 0;
    color: $clr-fg-sec;
    background-color: $clr-bg-sec;
    border-inline-end: $shp-border-width $shp-border-style $clr-brd-sec;
}

.bit-dtrp-pkh {
    width: 100%;
    position: relative;
    height: spacing(3.5);
    display: inline-flex;
    line-height: spacing(5.5);
}

.bit-dtrp-tph {
    justify-content: end;
    margin-top: spacing(0.5);
    padding-right: spacing(0.5);
}

.bit-dtrp-pkt,
.bit-dtrp-ptb {
    margin: 0;
    border: none;
    cursor: text;
    flex-grow: 1;
    overflow: hidden;
    font-weight: 600;
    text-align: start;
    color: $clr-fg-pri;
    position: relative;
    align-items: center;
    white-space: nowrap;
    outline: transparent;
    display: inline-block;
    text-overflow: ellipsis;
    padding: 0 spacing(1.25);
    font-size: spacing(1.75);
    line-height: spacing(3.5);
    background-color: transparent;
    border-radius: $shp-border-radius;
}

.bit-dtrp-ptb {
    cursor: pointer;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;

        .bit-dtrp-gti,
        .bit-icon {
            color: $clr-fg-dis;
        }
    }
}

.bit-dtrp-nbc {
    display: flex;
    align-items: center;
}

.bit-dtrp-nbt,
.bit-dtrp-gtb,
.bit-dtrp-gtn {
    padding: 0;
    border: none;
    display: block;
    cursor: pointer;
    overflow: visible;
    position: relative;
    text-align: center;
    width: spacing(3.5);
    height: spacing(3.5);
    outline: transparent;
    font-size: spacing(1.5);
    min-width: spacing(3.5);
    min-height: spacing(3.5);
    line-height: spacing(3.5);
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;

        .bit-dtrp-gti,
        .bit-icon {
            color: $clr-fg-dis;
        }
    }
}

.bit-dtrp-tbt {
    padding: 0;
    border: none;
    cursor: pointer;
    overflow: visible;
    position: relative;
    text-align: center;
    width: spacing(3.75);
    outline: transparent;
    line-height: spacing(3.75);
    font-size: spacing(1.5);
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;
    aspect-ratio: 1;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:active {
        background-color: $clr-bg-pri-hover;
    }

    i {
        speak: none;
        width: 100%;
        display: flex;
        aspect-ratio: 1;
        align-items: center;
        justify-content: center;
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;
        color: $clr-fg-dis;

        i {
            color: $clr-fg-dis;
        }
    }
}

.bit-dtrp-dvd {
    top: 0;
    border-right: $shp-border-width $shp-border-style $clr-brd-sec;
}

.bit-dtrp-mwp {
    margin: 0;
    display: flex;
    overflow: hidden;
    box-shadow: none;
    padding: spacing(1.5);
    min-width: spacing(26);
    box-sizing: content-box;
    flex-flow: column nowrap;
    min-width: spacing(24.5);
}

.bit-dtrp-pkc {
    margin-top: spacing(0.5);
    margin-bottom: spacing(1.5);
}

.bit-dtrp-pkr {
    display: flex;
    margin-bottom: spacing(2);
    justify-content: space-evenly;

    &:last-child {
        margin: 0;
    }
}

.bit-dtrp-pkb {
    padding: 0;
    border: none;
    cursor: pointer;
    overflow: hidden;
    width: spacing(6);
    position: relative;
    white-space: nowrap;
    outline: transparent;
    max-width: spacing(7);
    font-size: spacing(1.5);
    line-height: spacing(5);
    text-overflow: ellipsis;
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }

    &:disabled {
        pointer-events: none;
        background-color: transparent;
        color: $clr-fg-dis;
    }
}

.bit-dtrp-psm {
    font-weight: 600;
    background-color: $clr-bg-sec;

    @media (hover: hover) {
        &:hover {
            background-color: $clr-bg-pri-hover;
        }
    }
}

.bit-dtrp-pcm {
    color: $clr-pri-text;
    background-color: $clr-pri;

    @media (hover: hover) {
        &:hover {
            color: $clr-sec-hover;
            background-color: $clr-pri-hover;
        }
    }
}

.bit-dtrp-tic {
    margin: 0;
    padding: 0 spacing(2.5) spacing(2) spacing(2.5);
}

.bit-dtrp-sic,
.bit-dtrp-eic {
    margin: 0;
    padding: 0;
    flex: 0.85;
    display: flex;
    outline: none;
    direction: ltr;
    gap: spacing(1);
    box-shadow: none;
    align-items: center;
    align-content: center;
    box-sizing: border-box;
    justify-content: center;
}

.bit-dtrp-tpr {
    display: flex;
    gap: spacing(0.25);
    align-items: center;
    align-content: center;
    flex-direction: column;
    justify-content: space-between;
}

.bit-dtrp-tdv {
    display: flex;
    align-items: center;
    align-content: center;
    font-size: spacing(2.5);
    justify-content: center;
    font-weight: $tg-font-weight;
}

.bit-dtrp-am-pm {
    display: flex;
    flex-direction: column;
    padding: spacing(1.6) 0;
    justify-content: space-between;
    margin-inline-start: spacing(2);
}

.bit-dtrp-tin {
    margin: 0;
    padding: 0;
    border: none;
    cursor: pointer;
    text-align: center;
    align-items: center;
    width: spacing(3.75);
    box-sizing: border-box;
    justify-content: center;
    -moz-appearance: textfield; // Firefox
    background-color: $clr-bg-pri;
    font-size: spacing(2.28);
    font-weight: $tg-font-weight;
    overflow: hidden;
    aspect-ratio: 1;

    &::-webkit-inner-spin-button, // Chrome, Safari, Edge, Opera
    &::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    &:focus {
        border: none;
        border-bottom: $shp-border-width $shp-border-style $clr-brd-pri-active;
        outline: none;
    }

    &:disabled {
        cursor: default;
        color: $clr-fg-dis;
    }
}

.bit-dtrp-bam,
.bit-dtrp-bpm {
    font-size: spacing(1.8);
    font-weight: $tg-font-weight;
}

.bit-dtrp-bns {
    color: $clr-pri-text;
    background-color: $clr-pri;

    &:disabled {
        background-color: $clr-bg-dis;
    }

    @media (hover: hover) {
        &:hover {
            background-color: $clr-pri-hover;
        }
    }

    &:active {
        background-color: $clr-pri-active;
    }
}

.bit-dtrp-twp {
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    overflow: hidden;
    box-shadow: none;
    box-sizing: content-box;
    flex-flow: column nowrap;
}

.bit-dtrp-ovl {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    position: fixed;
    z-index: $zindex-overlay;
    background-color: transparent;
}

.bit-dtrp-und {
    .bit-dtrp-wrp {
        width: 100%;
        display: flex;
        border-bottom: $shp-border-width $shp-border-style $clr-brd-pri;
    }

    .bit-dtrp-icn {
        border: none;
        flex: 1 1 0px;
        text-align: left;
    }

    &.bit-dis {
        .bit-dtrp-wrp {
            border-bottom-color: $clr-brd-dis;
        }
    }

    &.bit-dtrp-foc {
        .bit-dtrp-icn::after {
            border: none;
            border-radius: 0;
            border-bottom: spacing(0.25) $shp-border-style $clr-brd-pri;
        }
    }
}

.bit-dtrp-nbd {
    .bit-dtrp-icn {
        border: none;
    }
}

.bit-dtrp-sta {
    width: fit-content;
    display: flex;
    flex-flow: column;
    align-items: flex-start;

    .bit-dtrp-cal {
        display: block;
        z-index: unset;
        animation: none;
        position: relative;
    }
}

.bit-dtrp-req {
    .bit-dtrp-lbl::after {
        content: "*";
        color: $clr-req;
        margin-inline-start: spacing(0.625);
    }
}

.bit-dtrp-res {
    @include lt-sm {
        top: 0;
        left: 0;
        opacity: 0;
        width: 100%;
        display: block;
        overflow: hidden;
        animation-name: unset;
        transform: translateY(-100%);
        box-shadow: $box-shadow-callout;
        transition: transform 200ms ease-out, opacity 100ms linear;

        .bit-dtrp-dwp,
        .bit-dtrp-mwp {
            flex-grow: 1;
        }

        .bit-dtrp-pkh {
            min-height: spacing(5.5);
        }

        .bit-dtrp-pkc {
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-around;
        }

        .bit-dtrp-pkr {
            height: 100%;
        }

        .bit-dtrp-nbt,
        .bit-dtrp-gtb,
        .bit-dtrp-gtn,
        .bit-dtrp-wlb,
        .bit-dtrp-dbt,
        .bit-dtrp-pkb,
        .bit-dtrp-wnm {
            width: 100%;
            height: 100%;
            display: flex;
            aspect-ratio: 1;
            max-width: unset;
            align-items: center;
            justify-content: center;
            font-size: spacing(1.75);
        }

        .bit-dtrp-nbt,
        .bit-dtrp-gtb,
        .bit-dtrp-gtn {
            width: spacing(5.5);
        }

        .bit-dtrp-wlb {
            //font-weight: bold;
        }

        .bit-dtrp-grp {
            justify-content: center;
        }

        .bit-dtrp-tdv {
            //font-size: spacing(7);
        }

        .bit-dtrp-tin {
            width: 100%;
            min-width: spacing(7);
            max-width: spacing(12);
            //font-size: spacing(5);
        }

        .bit-dtrp-tbt {
            width: 100%;
            min-width: spacing(7);
            max-width: spacing(12);
            //font-size: spacing(3);
        }

        .bit-dtrp-bam,
        .bit-dtrp-bpm {
            width: 100%;
            //font-size: spacing(4);
            margin: spacing(0.25);
        }

        .bit-dtrp-tic {
            display: flex;
        }
    }
}
