/* General
   ---- */

.tipcg_countdown,
.tipcg_countdown *,
.tipcg_countdown *::before,
.tipcg_countdown *::after {
    box-sizing: border-box;
}

.tipcg_countdown {
    display: grid;
    --tipcg-cell-width: 80px;
    --tipcg-clock-width: 72px;
    --tipcg-clock-height: 88px;
    --tipcg-adaptive-card-width: 0px;
    grid-template-columns: repeat(4, minmax(var(--tipcg-cell-width), max-content));
    grid-template-rows: 1fr;
    grid-column-gap: 10px;
    line-height: 1;
    letter-spacing: 0;
    text-indent: 0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.tipcg_countdown.tipcg-is-pending {
    visibility: hidden;
}

.tipcg_countdown .time-unit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: auto;
    min-width: var(--tipcg-cell-width);
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 8px;
    text-align: center;
    line-height: 1;
    letter-spacing: 0;
    text-indent: 0;
}

.tipcg_countdown span.value,
.tipcg_countdown span.label {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    text-align: center;
    letter-spacing: 0;
    word-spacing: 0;
    text-indent: 0;
    text-shadow: none;
    font-style: normal;
}

.tipcg_countdown span.value {
    color: #333;
    font-size: 40px;
    font-weight: bold;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.tipcg_countdown span.label {
    color: #666;
    font-size: 10px;
    line-height: 1.2;
    text-transform: uppercase;
}

.tipcg_countdown .time-unit.days { grid-area: 1 / 1 / 2 / 2; }
.tipcg_countdown .time-unit.hours { grid-area: 1 / 2 / 2 / 3; }
.tipcg_countdown .time-unit.minutes { grid-area: 1 / 3 / 2 / 4; }
.tipcg_countdown .time-unit.seconds { grid-area: 1 / 4 / 2 / 5; }

.tipcg_countdown .tipcg-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    min-width: .35em;
    height: 40px;
    margin: 10px 0 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: #333;
    font-size: 40px;
    font-weight: bold;
    line-height: 1;
    letter-spacing: 0;
    word-spacing: 0;
    text-indent: 0;
    text-transform: none;
    text-shadow: none;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
}

.tipcg_countdown .tipcg-separator-dots {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .18em;
    width: .35em;
    line-height: 0;
}

.tipcg_countdown .tipcg-separator-dots span {
    display: block;
    width: .13em;
    height: .13em;
    flex: 0 0 auto;
    border-radius: 50%;
    background: currentColor;
}

.tipcg_countdown .tipcg-separator-text {
    display: block;
    line-height: 1;
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-separator-text {
    display: none;
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-separator-dots {
    display: flex;
}

.tipcg_countdown.tipcg-no-separators .tipcg-separator {
    display: none !important;
}

.tipcg_countdown.tipcg-has-separators {
    grid-template-columns: minmax(var(--tipcg-cell-width), max-content) auto minmax(var(--tipcg-cell-width), max-content) auto minmax(var(--tipcg-cell-width), max-content) auto minmax(var(--tipcg-cell-width), max-content);
}

.tipcg_countdown.tipcg-has-separators .time-unit.days { grid-area: 1 / 1 / 2 / 2; }
.tipcg_countdown.tipcg-has-separators .tipcg-separator-days-hours { grid-area: 1 / 2 / 2 / 3; }
.tipcg_countdown.tipcg-has-separators .time-unit.hours { grid-area: 1 / 3 / 2 / 4; }
.tipcg_countdown.tipcg-has-separators .tipcg-separator-hours-minutes { grid-area: 1 / 4 / 2 / 5; }
.tipcg_countdown.tipcg-has-separators .time-unit.minutes { grid-area: 1 / 5 / 2 / 6; }
.tipcg_countdown.tipcg-has-separators .tipcg-separator-minutes-seconds { grid-area: 1 / 6 / 2 / 7; }
.tipcg_countdown.tipcg-has-separators .time-unit.seconds { grid-area: 1 / 7 / 2 / 8; }

.tipcg_countdown.tipcg-days-hidden.tipcg-no-separators {
    grid-template-columns: repeat(3, minmax(var(--tipcg-cell-width), max-content));
}

.tipcg_countdown.tipcg-days-hidden.tipcg-no-separators .time-unit.hours { grid-area: 1 / 1 / 2 / 2; }
.tipcg_countdown.tipcg-days-hidden.tipcg-no-separators .time-unit.minutes { grid-area: 1 / 2 / 2 / 3; }
.tipcg_countdown.tipcg-days-hidden.tipcg-no-separators .time-unit.seconds { grid-area: 1 / 3 / 2 / 4; }

.tipcg_countdown.tipcg-days-hidden.tipcg-has-separators {
    grid-template-columns: minmax(var(--tipcg-cell-width), max-content) auto minmax(var(--tipcg-cell-width), max-content) auto minmax(var(--tipcg-cell-width), max-content);
}

.tipcg_countdown.tipcg-days-hidden .tipcg-separator-days-hours {
    display: none !important;
}

.tipcg_countdown.tipcg-days-hidden.tipcg-has-separators .time-unit.hours { grid-area: 1 / 1 / 2 / 2; }
.tipcg_countdown.tipcg-days-hidden.tipcg-has-separators .tipcg-separator-hours-minutes { grid-area: 1 / 2 / 2 / 3; }
.tipcg_countdown.tipcg-days-hidden.tipcg-has-separators .time-unit.minutes { grid-area: 1 / 3 / 2 / 4; }
.tipcg_countdown.tipcg-days-hidden.tipcg-has-separators .tipcg-separator-minutes-seconds { grid-area: 1 / 4 / 2 / 5; }
.tipcg_countdown.tipcg-days-hidden.tipcg-has-separators .time-unit.seconds { grid-area: 1 / 5 / 2 / 6; }

.tipcg_countdown.tipcg-template-flip_clock {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
}

.tipcg_countdown.tipcg_countdown_left_alignment {
    justify-content: flex-start;
}

.tipcg_countdown.tipcg_countdown_center_alignment {
    justify-content: center;
}

.tipcg_countdown.tipcg_countdown_right_alignment {
    justify-content: flex-end;
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-separator {
    align-self: flex-start;
    height: var(--tipcg-clock-height);
    margin-top: 0;
    padding-top: 0;
}

.tipcg_countdown.tipcg-template-flip_clock .time-unit {
    position: relative;
    width: auto;
    min-width: var(--tipcg-clock-width);
    padding: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-clock-card {
    position: relative;
    min-width: var(--tipcg-clock-width);
    width: max(var(--tipcg-clock-width), var(--tipcg-adaptive-card-width));
    height: var(--tipcg-clock-height);
    perspective: 200px;
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-clock-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-clock-front,
.tipcg_countdown.tipcg-template-flip_clock .tipcg-clock-back {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: .18em;
    background: #1a1a2e;
    border-radius: 8px;
    color: #e8d5b7;
    font-size: 40px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    word-spacing: 0;
    text-indent: 0;
    text-transform: none;
    text-shadow: none;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-clock-back {
    transform: rotateX(180deg);
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-clock-card.is-flipping .tipcg-clock-front {
    animation: tipcg-clock-flip-down .25s ease-in forwards;
}

.tipcg_countdown.tipcg-template-flip_clock .tipcg-clock-card.is-flipping .tipcg-clock-back {
    animation: tipcg-clock-flip-up .25s ease-out .25s forwards;
}

.tipcg_countdown.tipcg-template-flip_clock span.label {
    margin-top: 6px;
    letter-spacing: .08em;
}

@keyframes tipcg-clock-flip-down {
    from {
        transform: rotateX(0deg);
    }

    to {
        transform: rotateX(-90deg);
    }
}

@keyframes tipcg-clock-flip-up {
    from {
        transform: rotateX(90deg);
    }

    to {
        transform: rotateX(0deg);
    }
}

@media screen and (min-width: 0) and (max-width: 480px) {
    .tipcg_countdown {
        --tipcg-cell-width: 72px;
        --tipcg-clock-width: 64px;
        --tipcg-clock-height: 78px;
    }

    .tipcg_countdown span.value {
        font-size: 30px;
    }

    .tipcg_countdown span.label {
        font-size: 10px;
    }

    .tipcg_countdown .tipcg-separator {
        height: 30px;
        margin-top: 10px;
        padding-top: 0;
        font-size: 30px;
    }

    .tipcg_countdown.tipcg-template-flip_clock {
        flex-wrap: wrap;
        gap: 12px;
    }

    .tipcg_countdown.tipcg-template-flip_clock .tipcg-separator {
        align-self: flex-start;
        height: 78px;
        margin-top: 0;
        padding-top: 0;
    }
}
