/* ========================================
   01. REGISTRATION — CONFIGURATION
   ======================================== */

.gs-registration {
    --reg-blue: var(--primary-700, #006cff);
    --reg-duration: 8s;

    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 1cqw;
    overflow: hidden;

    background: #eaf0f3;
    color: #0d1014;

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

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


/* ========================================
   REGISTRATION — CARD
   ======================================== */

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

    width: 66%;
    height: 94%;

    padding: 1.5cqw 4cqw 1cqw;

    border-radius: 0.8cqw;
    background: #ffffff;

    box-shadow:
        0 2cqw 5cqw rgba(30, 55, 85, 0.10);
}


/* ========================================
   REGISTRATION — HEADER
   ======================================== */

.gs-registration__header {
    flex-shrink: 0;
    text-align: center;
}

.gs-registration__header h3 {
    margin: 0 0 0.6cqw;

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

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

.gs-registration__header p {
    margin: 0;

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


/* ========================================
   REGISTRATION — PAGES
   ======================================== */

.gs-registration__pages {
    position: relative;

    flex: 1;
    min-height: 0;

    margin-top: 1cqw;
    overflow: hidden;
}

.gs-reg-page {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 1cqw;

    opacity: 0;
    visibility: hidden;

    transform: translateX(1cqw);
}

.gs-reg-page--tariff {
    opacity: 1;
    visibility: visible;
    transform: none;
}


/* ========================================
   REGISTRATION — FORM FIELDS
   ======================================== */

.gs-reg-field {
    display: flex;
    flex-direction: column;

    min-width: 0;
    gap: 0.55cqw;
}

.gs-reg-label {
    display: block;

    font-size: 1.85cqw;
    font-weight: 400;
    line-height: 1.3;
}

.gs-reg-label small {
    font-size: 1.35cqw;
}

.gs-reg-input {
    position: relative;

    display: flex;
    align-items: center;

    min-width: 0;
    height: 4.5cqw;

    padding: 0 1.4cqw;
    overflow: hidden;

    border: 1px solid #95a5ba;
    border-radius: 0.5cqw;

    background: #ffffff;

    font-size: 1.85cqw;

    box-shadow:
        0 0.25cqw 0.5cqw rgba(13, 30, 55, 0.05);
}

.gs-reg-select {
    justify-content: space-between;
    border-radius: 0.8cqw;
}

.gs-reg-select > span {
    font-size: 2.6cqw;
    color: #748499;
}

.gs-reg-eye {
    flex-shrink: 0;

    width: 2.2cqw;
    height: 2.2cqw;

    margin-left: auto;
}

.gs-reg-info {
    margin: 0 0 0.7cqw;

    font-size: 1.85cqw;
    line-height: 1.45;

    text-align: center;
}


/* ========================================
   REGISTRATION — PAYMENT FREQUENCY
   ======================================== */

.gs-reg-frequency {
    display: flex;

    gap: 0.4cqw;
    padding: 0.4cqw;

    border: 1px solid #c2dbff;
    border-radius: 0.8cqw;
}

.gs-reg-frequency span {
    flex: 1;

    padding: 0.8cqw 0;

    border-radius: 0.55cqw;

    color: var(--reg-blue);

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

    text-align: center;
}

.gs-reg-frequency .is-selected {
    background: #dcebff;
}


/* ========================================
   REGISTRATION — TARIFF PRICE
   ======================================== */

.gs-reg-price {
    display: flex;
    flex-direction: column;

    gap: 0.7cqw;
    padding: 1.4cqw 1.6cqw;

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

    background: #e8f2ff;
}

.gs-reg-price__caption {
    font-size: 1.5cqw;
    font-weight: 600;

    color: #748499;
}

.gs-reg-price__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 0.5cqw;
}

.gs-reg-price__row > div:first-child {
    display: flex;
    flex-direction: column;

    gap: 0.2cqw;
}

.gs-reg-price__row span {
    font-size: 1.6cqw;
    color: #424b57;
}

.gs-reg-price__total {
    flex-shrink: 0;

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

.gs-reg-price__total strong {
    font-size: 3.2cqw;
    color: var(--reg-blue);
}


/* ========================================
   REGISTRATION — RECURRING PAYMENT
   ======================================== */

.gs-reg-recurring {
    display: flex;
    align-items: center;

    gap: 1.5cqw;

    font-size: 1.8cqw;
}

.gs-reg-toggle {
    display: inline-flex;
    align-items: center;

    gap: 0.9cqw;
    padding: 0.3cqw 1cqw 0.3cqw 0.3cqw;

    border-radius: 999px;

    background: #edf1f7;
    color: #748499;

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

.gs-reg-toggle i {
    width: 2.5cqw;
    height: 2.5cqw;

    border-radius: 50%;
    background: #ffffff;

    box-shadow:
        0 0.2cqw 0.5cqw rgba(0, 0, 0, 0.12);
}


/* ========================================
   REGISTRATION — BUTTONS
   ======================================== */

.gs-reg-button {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 2cqw;

    min-height: 5.2cqw;
    padding: 0.9cqw 1.5cqw;

    border-radius: 0.7cqw;

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

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

.gs-reg-button > span {
    font-size: 2.8cqw;
    line-height: 1;
}

.gs-reg-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1cqw;
}

.gs-reg-buttons .gs-reg-button {
    width: 48%;
}

.gs-reg-back {
    color: var(--reg-blue);

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


/* ========================================
   REGISTRATION — FINISH BUTTON
   ======================================== */

.gs-reg-button--finish {
    position: relative;
    overflow: hidden;
}

.gs-reg-button--finish .gs-reg-button__label {
    display: block;

    font-size: inherit;
    line-height: inherit;

    opacity: 1;
}

.gs-reg-button__loader {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 2.6cqw;
    height: 2.6cqw;

    border: 0.35cqw solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;

    opacity: 0;

    transform: translate(-50%, -50%);
}


/* ========================================
   REGISTRATION — COMPANY INFORMATION
   ======================================== */

.gs-reg-page--company {
    gap: 0.5cqw;
}

.gs-reg-page--company .gs-reg-field {
    gap: 0.2cqw;
}

.gs-reg-page--company .gs-reg-input {
    height: 3cqw;
    font-size: 1.65cqw;
}

.gs-reg-page--company .gs-reg-label {
    font-size: 1.5cqw;
}

.gs-reg-page--company .gs-reg-info {
    margin-bottom: 0.3cqw;
    font-size: 1.6cqw;
}

.gs-reg-page--company .gs-reg-button {
    min-height: 3.8cqw;
}

.gs-reg-row {
    display: grid;

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

    gap: 0.9cqw;
}

.gs-reg-row--address {
    grid-template-columns:
        minmax(0, 2fr)
        minmax(0, 1fr)
        minmax(0, 1fr);
}


/* ========================================
   REGISTRATION — TYPING AND AUTO-FILL
   ======================================== */

.gs-reg-typed {
    display: block;

    width: max-content;
    max-width: 100%;

    overflow: hidden;

    clip-path: inset(0 100% 0 0);

    white-space: nowrap;
}

.gs-reg-autofill {
    opacity: 0;
}


/* ========================================
   REGISTRATION — PROGRESS INDICATOR
   ======================================== */

.gs-reg-progress {
    position: relative;

    flex-shrink: 0;

    width: 100%;
    height: 3.8cqw;

    margin-top: 0.8cqw;
}

.gs-reg-progress__state {
    position: absolute;
    inset: 0;

    opacity: 0;
    visibility: hidden;
}

.gs-reg-progress__state--1 {
    opacity: 1;
    visibility: visible;
}

.gs-reg-dots {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 50%;
    height: 1.6cqw;

    margin: 0 auto;
}

.gs-reg-dots::before {
    content: "";

    position: absolute;

    top: 50%;
    right: 0;
    left: 0;

    height: 1px;

    background: #c2dbff;

    transform: translateY(-50%);
}

.gs-reg-dot {
    position: relative;
    z-index: 1;

    flex-shrink: 0;

    width: 1.4cqw;
    height: 1.4cqw;

    border: 1px solid var(--reg-blue);
    border-radius: 50%;

    background: #ffffff;
}

.gs-reg-dot.is-done {
    background: var(--reg-blue);
}

.gs-reg-progress__count {
    display: block;

    margin-top: 0.6cqw;

    font-size: 1.5cqw;
    line-height: 1.2;

    text-align: center;

    color: #95a5ba;
}


/* ========================================
   REGISTRATION — FOOTER
   ======================================== */

.gs-registration__footer {
    flex-shrink: 0;

    margin-top: 0.5cqw;

    font-size: 1.5cqw;
}

.gs-registration__footer strong {
    color: var(--reg-blue);
    text-decoration: underline;
}


/* ========================================
   REGISTRATION — PAGE ANIMATIONS
   ======================================== */

.getting-laptop__view.is-active .gs-reg-page--tariff {
    animation: gs-reg-phase-1 var(--reg-duration) linear both;
}

.getting-laptop__view.is-active .gs-reg-page--email {
    animation: gs-reg-phase-2 var(--reg-duration) linear both;
}

.getting-laptop__view.is-active .gs-reg-page--password {
    animation: gs-reg-phase-3 var(--reg-duration) linear both;
}

.getting-laptop__view.is-active .gs-reg-page--company {
    animation: gs-reg-phase-4 var(--reg-duration) linear both;
}


/* Phase 1 — Tariff */

@keyframes gs-reg-phase-1 {
    0%, 19% {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    23%, 100% {
        opacity: 0;
        visibility: hidden;
        transform: translateX(-1cqw);
    }
}


/* Phase 2 — Email */

@keyframes gs-reg-phase-2 {
    0%, 19% {
        opacity: 0;
        visibility: hidden;
    }

    23%, 44% {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    48%, 100% {
        opacity: 0;
        visibility: hidden;
        transform: translateX(-1cqw);
    }
}


/* Phase 3 — Password */

@keyframes gs-reg-phase-3 {
    0%, 44% {
        opacity: 0;
        visibility: hidden;
    }

    48%, 63% {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    67%, 100% {
        opacity: 0;
        visibility: hidden;
        transform: translateX(-1cqw);
    }
}


/* Phase 4 — Company */

@keyframes gs-reg-phase-4 {
    0%, 63% {
        opacity: 0;
        visibility: hidden;
    }

    67%, 100% {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}


/* ========================================
   REGISTRATION — PROGRESS ANIMATIONS
   ======================================== */

.getting-laptop__view.is-active .gs-reg-progress__state--1 {
    animation:
        gs-reg-progress-1
        var(--reg-duration)
        steps(1, end)
        both;
}

.getting-laptop__view.is-active .gs-reg-progress__state--2 {
    animation:
        gs-reg-progress-2
        var(--reg-duration)
        steps(1, end)
        both;
}

.getting-laptop__view.is-active .gs-reg-progress__state--3 {
    animation:
        gs-reg-progress-3
        var(--reg-duration)
        steps(1, end)
        both;
}

.getting-laptop__view.is-active .gs-reg-progress__state--4 {
    animation:
        gs-reg-progress-4
        var(--reg-duration)
        steps(1, end)
        both;
}


@keyframes gs-reg-progress-1 {
    0% {
        opacity: 1;
        visibility: visible;
    }

    21%, 100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes gs-reg-progress-2 {
    0% {
        opacity: 0;
        visibility: hidden;
    }

    21% {
        opacity: 1;
        visibility: visible;
    }

    46%, 100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes gs-reg-progress-3 {
    0% {
        opacity: 0;
        visibility: hidden;
    }

    46% {
        opacity: 1;
        visibility: visible;
    }

    65%, 100% {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes gs-reg-progress-4 {
    0% {
        opacity: 0;
        visibility: hidden;
    }

    65%, 100% {
        opacity: 1;
        visibility: visible;
    }
}


/* ========================================
   REGISTRATION — TYPING ANIMATIONS
   ======================================== */

.getting-laptop__view.is-active .gs-reg-typed--email {
    animation: gs-reg-typing 0.85s steps(16, end) 2s both;
}

.getting-laptop__view.is-active .gs-reg-typed--password {
    animation: gs-reg-typing 0.65s steps(12, end) 4s both;
}

.getting-laptop__view.is-active .gs-reg-typed--ico {
    animation: gs-reg-typing 0.65s steps(8, end) 5.6s both;
}

@keyframes gs-reg-typing {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}


/* ========================================
   REGISTRATION — AUTO-FILL ANIMATIONS
   ======================================== */

.getting-laptop__view.is-active .gs-reg-autofill {
    animation: gs-reg-autofill 0.45s ease 6.4s both;
}

.getting-laptop__view.is-active
.gs-reg-input:has(.gs-reg-autofill) {
    animation: gs-reg-autofill-background 0.5s ease 6.4s both;
}

@keyframes gs-reg-autofill {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes gs-reg-autofill-background {
    from {
        background: #ffffff;
    }

    50% {
        background: #dcebff;
        border-color: #7db4ff;
    }

    to {
        background: #edf5ff;
        border-color: #95a5ba;
    }
}


/* ========================================
   REGISTRATION — BUTTON PRESS ANIMATIONS
   ======================================== */

.getting-laptop__view.is-active
.gs-reg-page--tariff .gs-reg-button {
    animation: gs-reg-press 0.3s ease 1.2s;
}

.getting-laptop__view.is-active
.gs-reg-page--email .gs-reg-button {
    animation: gs-reg-press 0.3s ease 3.15s;
}

.getting-laptop__view.is-active
.gs-reg-page--password .gs-reg-button {
    animation: gs-reg-press 0.3s ease 4.7s;
}

@keyframes gs-reg-press {
    50% {
        transform: scale(0.97);
        background: #005ee0;
    }
}


/* ========================================
   REGISTRATION — FINISH ANIMATIONS
   ======================================== */

.getting-laptop__view.is-active .gs-reg-button--finish {
    animation: gs-reg-finish-press 0.3s ease 7.3s both;
}

.getting-laptop__view.is-active
.gs-reg-button--finish .gs-reg-button__label {
    animation: gs-reg-hide-label 0.2s ease 7.6s forwards;
}

.getting-laptop__view.is-active
.gs-reg-button--finish .gs-reg-button__loader {
    animation:
        gs-reg-show-loader 0.2s ease 7.6s forwards,
        gs-reg-spin 0.7s linear 7.6s 2;
}

@keyframes gs-reg-finish-press {
    0%, 100% {
        transform: scale(1);
        background: var(--reg-blue);
    }

    50% {
        transform: scale(0.96);
        background: #005ee0;
    }
}

@keyframes gs-reg-hide-label {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes gs-reg-show-loader {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes gs-reg-spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


/* ========================================
   ACCESSIBILITY — REDUCED MOTION
   ======================================== */

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

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

    .gs-reg-typed {
        clip-path: none;
    }

    .gs-reg-autofill,
    .gs-reg-button__label {
        opacity: 1;
    }

    .gs-reg-button__loader {
        opacity: 0;
    }
}
