/* ========================================
   04. TARIFF UPGRADE — CONFIGURATION
   ======================================== */

.gs-tariffs {
    --tariffs-blue: var(--primary-700, #006cff);
    --tariffs-border: var(--primary-200, #c2dbff);
    --tariffs-duration: 10s;

    position: relative;

    display: flex;
    flex-direction: column;

    width: 100%;
    height: 100%;

    gap: 2cqw;
    padding: 1.5cqw;

    overflow: hidden;

    background: #ffffff;
    color: #272e38;

    font-family: var(--navbar-font, Roboto, sans-serif);
    font-size: 1.45cqw;
    line-height: 1.4;

    pointer-events: none;
    user-select: none;
}


/* ========================================
   TARIFFS — SECTION HEADER
   ======================================== */

.gs-tariffs__header {
    flex-shrink: 0;

    padding: 1.3cqw 1.5cqw;

    border-radius: 0.8cqw;

    background: linear-gradient(
        90deg,
        #edf5ff,
        #f4f8fa
    );

    font-size: 1.6cqw;
    font-weight: 700;
}


/* ========================================
   TARIFFS — PAYMENT FREQUENCY
   ======================================== */

.gs-tariffs__frequency {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    gap: 1.6cqw;
    padding-inline: 1.1cqw;

    font-size: 1.35cqw;
}

.gs-tariffs__frequency-options {
    position: relative;

    display: flex;

    gap: 0.3cqw;
    padding: 0.35cqw;

    border: 1px solid var(--tariffs-border);
    border-radius: 0.9cqw;
}

.gs-tariffs__frequency-option {
    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 7.2cqw;

    padding: 1.15cqw 1cqw;

    border-radius: 0.7cqw;

    color: var(--tariffs-blue);

    font-size: 1.4cqw;
    font-weight: 600;
}

.gs-tariffs__frequency-option--monthly {
    background: #e8f2ff;
}


/* ========================================
   TARIFFS — CARDS GRID
   ======================================== */

.gs-tariffs__grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    flex: 1;
    min-height: 0;

    gap: 3.8cqw;

    padding: 0 3cqw 2cqw;
}


/* ========================================
   TARIFF CARD
   ======================================== */

.gs-tariff {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;

    gap: 1.6cqw;

    padding: 1.4cqw 1.7cqw 2cqw;

    border: 1px solid var(--tariffs-border);
    border-radius: 1.4cqw;

    background: #ffffff;
}

.gs-tariff--free {
    border-color: var(--tariffs-blue);

    background: #f2f7fd;

    box-shadow:
        inset 0 0 0 0.12cqw var(--tariffs-blue);
}


/* ========================================
   TARIFF — DISCOUNT
   ======================================== */

.gs-tariff__discount {
    position: relative;

    flex-shrink: 0;

    height: 2.3cqw;

    color: #117e00;

    font-size: 1.15cqw;
    font-weight: 600;

    text-align: center;
}

.gs-tariff__discount > span {
    position: absolute;

    inset: 0;

    opacity: 0;
}


/* ========================================
   TARIFF — NAME
   ======================================== */

.gs-tariff__name {
    margin: 0;

    font-size: 3.5cqw;
    font-weight: 700;
    line-height: 1.2;

    text-align: center;

    color: var(--tariffs-blue);
}


/* ========================================
   TARIFF — PRICES
   ======================================== */

.gs-tariff__prices {
    position: relative;

    flex-shrink: 0;

    height: 5.2cqw;

    margin: 0.8cqw 0 0.6cqw;
}

.gs-tariff__price {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: baseline;
    justify-content: center;

    gap: 0.4cqw;

    opacity: 0;

    white-space: nowrap;
}

.gs-tariff__price--monthly {
    opacity: 1;
}

.gs-tariff__price strong {
    color: #272e38;

    font-size: 2.65cqw;
    font-weight: 700;
}

.gs-tariff__price > span {
    color: #748499;

    font-size: 1.15cqw;
}


/* ========================================
   TARIFF — FEATURES
   ======================================== */

.gs-tariff__features {
    display: flex;
    flex-direction: column;

    gap: 1.15cqw;

    margin: 0;
    padding: 0;

    list-style: none;
}

.gs-tariff__features li {
    display: flex;
    align-items: flex-start;

    gap: 0.9cqw;

    font-size: 1.4cqw;
    line-height: 1.4;
}

.gs-tariff__check {
    display: grid;
    place-items: center;

    flex-shrink: 0;

    width: 1.8cqw;
    height: 1.8cqw;

    border-radius: 50%;

    background: var(--tariffs-blue);
    color: #ffffff;
}

.gs-tariff__check svg {
    display: block;

    width: 1.2cqw;
    height: 1.2cqw;
}


/* ========================================
   TARIFF — ACTIONS
   ======================================== */

.gs-tariff__actions {
    position: relative;

    flex-shrink: 0;

    height: 4.7cqw;

    margin-top: auto;
}

.gs-tariff__button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 0.7cqw 1cqw;

    border-radius: 0.6cqw;

    background: var(--tariffs-blue);
    color: #ffffff;

    font-size: 1.3cqw;
    font-weight: 600;

    text-align: center;
}

.gs-tariff__button--current {
    background: #e0f5dc;
    color: #117e00;
}

.gs-tariff__button--activated {
    position: absolute;

    inset: 0;

    background: #e0f5dc;
    color: #117e00;

    opacity: 0;
}


/* ========================================
   TARIFFS — ANIMATED CURSOR
   ======================================== */

.gs-tariffs__pointer {
    position: absolute;
    z-index: 4;

    top: 0;
    left: 0;

    opacity: 0;
}

.gs-tariffs__cursor {
    display: block;

    width: 2.7cqw;
    height: 3.1cqw;

    filter: drop-shadow(
        0 0.2cqw 0.2cqw rgba(0, 0, 0, 0.2)
    );
}


/* ========================================
   TARIFFS — SUCCESS NOTIFICATION
   ======================================== */

.gs-tariffs__success {
    position: absolute;
    z-index: 10;

    right: 3cqw;
    bottom: 3cqw;

    display: flex;
    align-items: center;

    gap: 1cqw;

    padding: 1.3cqw 1.6cqw;

    border: 1px solid #ccebc6;
    border-radius: 0.8cqw;

    background: #ffffff;

    box-shadow:
        0 0.7cqw 2.2cqw rgba(13, 30, 55, 0.12);

    opacity: 0;
    visibility: hidden;
}

.gs-tariffs__success-icon {
    display: grid;
    place-items: center;

    flex-shrink: 0;

    width: 3.8cqw;
    height: 3.8cqw;

    border-radius: 50%;

    background: #e0f5dc;
    color: #117e00;

    font-size: 2cqw;
    font-weight: 700;
}

.gs-tariffs__success > div:last-child {
    display: flex;
    flex-direction: column;

    gap: 0.3cqw;
}

.gs-tariffs__success strong {
    color: #117e00;

    font-size: 1.45cqw;
}

.gs-tariffs__success span {
    color: #748499;

    font-size: 1.15cqw;
}


/* ========================================
   TARIFFS — FREQUENCY ANIMATIONS
   ======================================== */

.getting-laptop__view.is-active
.gs-tariffs__frequency-option--monthly {
    animation:
        gs-tariffs-monthly-selected
        var(--tariffs-duration)
        steps(1, end)
        both;
}

.getting-laptop__view.is-active
.gs-tariffs__frequency-option--quarterly {
    animation:
        gs-tariffs-quarterly-selected
        var(--tariffs-duration)
        steps(1, end)
        both;
}

.getting-laptop__view.is-active
.gs-tariffs__frequency-option--yearly {
    animation:
        gs-tariffs-yearly-selected
        var(--tariffs-duration)
        steps(1, end)
        both;
}


/* ========================================
   TARIFFS — PRICE ANIMATIONS
   ======================================== */

.getting-laptop__view.is-active
.gs-tariff__price--monthly {
    animation:
        gs-tariffs-monthly-price
        var(--tariffs-duration)
        steps(1, end)
        both;
}

.getting-laptop__view.is-active
.gs-tariff__price--quarterly,
.getting-laptop__view.is-active
.gs-tariff__discount--quarterly {
    animation:
        gs-tariffs-quarterly-price
        var(--tariffs-duration)
        steps(1, end)
        both;
}

.getting-laptop__view.is-active
.gs-tariff__price--yearly,
.getting-laptop__view.is-active
.gs-tariff__discount--yearly {
    animation:
        gs-tariffs-yearly-price
        var(--tariffs-duration)
        steps(1, end)
        both;
}


/* ========================================
   TARIFFS — MONTHLY FREQUENCY
   ======================================== */

@keyframes gs-tariffs-monthly-selected {
    0% {
        background: #e8f2ff;
    }

    20%, 100% {
        background: transparent;
    }
}

@keyframes gs-tariffs-monthly-price {
    0% {
        opacity: 1;
    }

    20%, 100% {
        opacity: 0;
    }
}


/* ========================================
   TARIFFS — QUARTERLY FREQUENCY
   ======================================== */

@keyframes gs-tariffs-quarterly-selected {
    0% {
        background: transparent;
    }

    20% {
        background: #e8f2ff;
    }

    40%, 100% {
        background: transparent;
    }
}

@keyframes gs-tariffs-quarterly-price {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    40%, 100% {
        opacity: 0;
    }
}


/* ========================================
   TARIFFS — YEARLY FREQUENCY
   ======================================== */

@keyframes gs-tariffs-yearly-selected {
    0% {
        background: transparent;
    }

    40%, 100% {
        background: #e8f2ff;
    }
}

@keyframes gs-tariffs-yearly-price {
    0% {
        opacity: 0;
    }

    40%, 100% {
        opacity: 1;
    }
}


/* ========================================
   TARIFFS — CURSOR MOVEMENT
   ======================================== */

.getting-laptop__view.is-active
.gs-tariffs__pointer {
    animation:
        gs-tariffs-pointer
        var(--tariffs-duration)
        linear
        both;
}

@keyframes gs-tariffs-pointer {
    0%, 5% {
        opacity: 0;
        transform: translate(12cqw, 18cqw);
    }

    10% {
        opacity: 1;
        transform: translate(15cqw, 14cqw);
    }

    18% {
        opacity: 1;
        transform: translate(29cqw, 10.5cqw);
    }

    20% {
        opacity: 1;
        transform: translate(29cqw, 10.5cqw) scale(0.85);
    }

    23%, 30% {
        opacity: 1;
        transform: translate(29cqw, 10.5cqw);
    }

    38% {
        opacity: 1;
        transform: translate(37cqw, 10.5cqw);
    }

    40% {
        opacity: 1;
        transform: translate(37cqw, 10.5cqw) scale(0.85);
    }

    43%, 48% {
        opacity: 1;
        transform: translate(37cqw, 10.5cqw);
    }

    56% {
        opacity: 1;
        transform: translate(50cqw, 54cqw);
    }

    58% {
        opacity: 1;
        transform: translate(50cqw, 54cqw) scale(0.85);
    }

    60% {
        opacity: 1;
        transform: translate(50cqw, 54cqw);
    }

    63%, 100% {
        opacity: 0;
        transform: translate(50cqw, 54cqw);
    }
}


/* ========================================
   TARIFFS — ACTIVATION BUTTON CLICK
   ======================================== */

.getting-laptop__view.is-active
.gs-tariff__button--activate {
    animation:
        gs-tariffs-press 0.3s ease 5.65s,
        gs-tariffs-hide 0.25s ease 6s forwards;
}

@keyframes gs-tariffs-press {
    50% {
        transform: scale(0.96);

        background: #005ee0;
    }
}

@keyframes gs-tariffs-hide {
    to {
        opacity: 0;
    }
}


/* ========================================
   TARIFFS — SELECTED TARIFF
   ======================================== */

.getting-laptop__view.is-active
.gs-tariff--stavebnice {
    animation:
        gs-tariffs-activate-card
        0.45s
        ease
        6s
        forwards;
}

@keyframes gs-tariffs-activate-card {
    to {
        border-color: var(--tariffs-blue);

        background: #f2f7fd;

        box-shadow:
            inset 0 0 0 0.12cqw var(--tariffs-blue),
            0 0.7cqw 2cqw rgba(0, 108, 255, 0.08);
    }
}

.getting-laptop__view.is-active
.gs-tariff__button--activated {
    animation:
        gs-tariffs-show
        0.3s
        ease
        6s
        forwards;
}

@keyframes gs-tariffs-show {
    to {
        opacity: 1;
    }
}


/* ========================================
   TARIFFS — SUCCESS ANIMATION
   ======================================== */

.getting-laptop__view.is-active
.gs-tariffs__success {
    animation:
        gs-tariffs-success
        var(--tariffs-duration)
        linear
        both;
}

@keyframes gs-tariffs-success {
    0%, 63% {
        opacity: 0;
        visibility: hidden;

        transform: translateY(1cqw);
    }

    67%, 100% {
        opacity: 1;
        visibility: visible;

        transform: none;
    }
}


/* ========================================
   TARIFFS — REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {

    .gs-tariffs *,
    .gs-tariffs *::before,
    .gs-tariffs *::after {
        animation: none !important;
        transition: none !important;
    }

    .gs-tariffs__pointer,
    .gs-tariffs__success {
        opacity: 0;
        visibility: hidden;
    }

}


/* ========================================
   TARIFFS — CURRENT TARIFF TRANSITION
   ======================================== */

.gs-tariff__button--previous {
    position: absolute;
    inset: 0;

    opacity: 0;
}


/* Deactivate Free tariff */

.getting-laptop__view.is-active
.gs-tariff--free {
    animation:
        gs-tariffs-deactivate-card
        0.45s
        ease
        6s
        forwards;
}

@keyframes gs-tariffs-deactivate-card {
    to {
        border-color: var(--tariffs-border);
        background: #ffffff;
        box-shadow: none;
    }
}


/* Hide previous current tariff button */

.getting-laptop__view.is-active
.gs-tariff--free .gs-tariff__button--current {
    animation:
        gs-tariffs-hide
        0.25s
        ease
        6s
        forwards;
}


/* Restore activation button on Free tariff */

.getting-laptop__view.is-active
.gs-tariff__button--previous {
    animation:
        gs-tariffs-show
        0.3s
        ease
        6s
        forwards;
}
