﻿@import "../../../Styles/functions.scss";

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

    &.bit-dis {
        .bit-cal-cnt {
            user-select: none;
            pointer-events: none;
            -webkit-user-select: none;
        }

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

        .bit-cal-dbt {
            &.bit-cal-dtd {
                background-color: $clr-bg-dis;
            }
        }
    }
}

.bit-cal-cnt {
    display: flex;
    font-weight: 400;
    top: spacing(4.25);
    outline: transparent;
    box-sizing: border-box;
    font-size: spacing(1.75);
    border-radius: $shp-border-radius;
    font-family: $tg-font-family;
}

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

.bit-cal-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-cal-dgd {
    border-spacing: 0;
    position: relative;
    text-align: center;
    font-size: inherit;
    table-layout: fixed;
    margin-top: spacing(0.5);
    border-collapse: collapse;
}

.bit-cal-dgh,
.bit-cal-dgr {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
}

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

.bit-cal-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-cal-dbs {
    background-color: $clr-bg-sec;

    &::after {
        inset: 0;
        content: "";
        position: absolute;
        border: $shp-border-width $shp-border-style $clr-brd-pri;
    }
}

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

.bit-cal-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-cal-wnm {
    margin: 0;
    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-cal-pkh {
    width: 100%;
    position: relative;
    height: spacing(3.5);
    display: inline-flex;
    line-height: spacing(5.5);
}

.bit-cal-tph {
    justify-content: end;
}

.bit-cal-pkt,
.bit-cal-ptb {
    margin: 0;
    border: none;
    flex-grow: 1;
    cursor: text;
    overflow: hidden;
    font-weight: 600;
    text-align: start;
    position: relative;
    white-space: nowrap;
    align-items: center;
    outline: transparent;
    display: inline-block;
    text-overflow: ellipsis;
    padding: 0 spacing(1.25);
    font-size: spacing(1.75);
    line-height: spacing(3.5);
    animation-fill-mode: both;
    animation-duration: 0.267s;
    animation-name: bit-fade-show;
    background-color: transparent;
    color: $clr-fg-pri;
    border-radius: $shp-border-radius;
    animation-timing-function: cubic-bezier(0.1, 0.25, 0.75, 0.9);
}

.bit-cal-ptb {
    cursor: pointer;

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

.bit-cal-nbc {
    display: flex;
    align-items: center;
    align-self: flex-end;
}

.bit-cal-nbt,
.bit-cal-gtb,
.bit-cal-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-icon,
        .bit-cal-gti {
            color: $clr-fg-dis;
        }
    }
}

.bit-cal-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%;
        aspect-ratio: 1;
        display: inline-block;
    }

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

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

.bit-cal-dvd {
    top: 0;
    border-inline-end: $shp-border-width $shp-border-style $clr-brd-sec;
}

.bit-cal-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;
}

.bit-cal-pkr {
    display: flex;
    gap: spacing(0.5);
    margin-bottom: spacing(2);

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

.bit-cal-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);
    text-overflow: ellipsis;
    line-height: spacing(5.17);
    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-cal-psm {
    font-weight: 600;
    background-color: $clr-bg-sec;

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

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

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

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

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

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

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

.bit-cal-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;
    }

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

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

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

.bit-cal-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-cal-twp {
    margin: 0;
    display: flex;
    overflow: hidden;
    box-shadow: none;
    padding: spacing(1.5);
    box-sizing: content-box;
    flex-flow: column nowrap;
}