@import '../../styles/colors', '../../styles/fonts', '../../styles/fontSizeCalculator';

.ui.time-picker {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: flex-start;
    position: relative;
    .time-picker-input { width: 100%; }
    .time-picker-zone-dropdown { margin-top: 11px; min-width: 0; width: 100%; }
    .time-picker-popover {
        background-color: color(backgroundColor);
        border: rem(3px);
        box-shadow: 0 4px 4px 0 rgba(0, 0, 0, .24);
        border: 1px solid color(borderColorSecondary);
        margin-top: 0;
        padding: 11px;
        position: absolute;
        top: 64px;
        width: 260px;
        z-index: 1;
        .cmui.select { margin-top: 0; }
        > div {
            align-items: center;
            display: flex;
            justify-content: flex-start;
            > div { margin-right: 11px; }
            > div:first-child, > div:last-child { margin-right: 0; }
        }
        .label {
            margin-bottom: em(8px);
            &:last-of-type { margin-top: 11px; }
        }
        .colon { font-size: rem(24px); margin: -5px rem(1.5px) 0 rem(2.5px); }
        &::before, &::after {
            content: '';
            height: 0;
            position: absolute;
            width: 0;
        }
        &::before {
            border-bottom: 9px solid color(borderColorSecondary);
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            left: 60px;
            top: -9px;
        }
        &::after {
            border-bottom: 8px solid color(backgroundColor);
            border-left: 9px solid transparent;
            border-right: 9px solid transparent;
            left: 61px;
            top: -8px;
        }
    }
    &.time-picker-nest .time-picker-popover {
        box-shadow: 0 4px 4px 0 rgba(0, 0, 0, .24);
        &::before { border-bottom-color: color(backgroundColor); }
        &::after { display: none; }
    }
    // &.time-picker-range {
    //     .time-picker-popover {
    //         display: block;
    //     }
    // }
}

@media only screen and (min-width: 480px) {
    .ui.time-picker {
        display: inline-flex;
        flex-direction: row;
        .time-picker-input { margin: 0 11px 11px 0; width: 121px; }
        &.time-picker-range .time-picker-input { width: 230px; }
        .time-picker-zone-dropdown { margin-top: 0; min-width: 326px; width: auto; }
    }
}
