/* =========================================
   NEXTGEN TOYS - OFFER REGISTRATION PAGE
   FULL CSS
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;

    font-family: Arial, Helvetica, sans-serif;

    color: #35136b;

    background:
        radial-gradient(
            circle at 3% 8%,
            #ffd83d 0,
            #ffd83d 105px,
            transparent 106px
        ),
        radial-gradient(
            circle at 96% 12%,
            #ff4b91 0,
            #ff4b91 55px,
            transparent 56px
        ),
        radial-gradient(
            circle at 8% 94%,
            #35b9ed 0,
            #35b9ed 75px,
            transparent 76px
        ),
        radial-gradient(
            circle at 100% 100%,
            #6422a4 0,
            #6422a4 110px,
            transparent 111px
        ),
        linear-gradient(
            135deg,
            #fff9e9 0%,
            #fffdf7 48%,
            #fff4fa 100%
        );

    background-attachment: fixed;

    overflow-x: hidden;
}


/* =========================================
   MAIN PAGE
========================================= */

.page {
    width: 100%;
    min-height: 100vh;

    position: relative;

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

    padding: 40px 20px;

    overflow-x: hidden;
    overflow-y: auto;

    background:
        radial-gradient(
            circle at 3% 8%,
            #ffd83d 0,
            #ffd83d 105px,
            transparent 106px
        ),
        radial-gradient(
            circle at 96% 12%,
            #ff4b91 0,
            #ff4b91 55px,
            transparent 56px
        ),
        radial-gradient(
            circle at 8% 94%,
            #35b9ed 0,
            #35b9ed 75px,
            transparent 76px
        ),
        radial-gradient(
            circle at 100% 100%,
            #6422a4 0,
            #6422a4 110px,
            transparent 111px
        ),
        linear-gradient(
            135deg,
            #fff9e9 0%,
            #fffdf7 48%,
            #fff4fa 100%
        );
}


/* =========================================
   DECORATIVE SHAPES
========================================= */

.page::before {
    content: "✦";

    position: absolute;

    top: 17%;
    left: 9%;

    font-size: 30px;
    color: #ffca05;

    transform: rotate(-15deg);

    pointer-events: none;
}

.page::after {
    content: "✦";

    position: absolute;

    right: 10%;
    bottom: 17%;

    font-size: 34px;
    color: #ff4b91;

    transform: rotate(18deg);

    pointer-events: none;
}


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

.page > .offer-card {
    position: relative;

    width: 100%;
    max-width: 620px;

    margin: 0 auto;

    flex: 0 0 auto;

    z-index: 2;

    background: rgba(255, 255, 255, 0.98);

    border: 2px solid #f5dc82;
    border-radius: 30px;

    padding: 28px 38px 25px;

    box-shadow:
        0 20px 55px rgba(74, 29, 111, 0.14),
        0 5px 15px rgba(74, 29, 111, 0.06);

    left: auto;
    right: auto;
    top: auto;
    bottom: auto;

    transform: none;
}


/* =========================================
   TOP HEADER
   LOGO, TAG, AMOUNT - CENTRED
========================================= */

.offer-header {
    width: 100%;

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

    text-align: center;

    margin: 0 0 22px;
    padding: 0 0 18px;

    border-bottom: 1px solid #eee4f5;
}

.header-logo {
    display: block;

    width: 120px;
    max-width: 100%;
    height: auto;

    margin-bottom: 10px;
}

.offer-tag {
    display: inline-block;

    padding: 5px 14px;

    border-radius: 20px;

    background: #fff4bd;
    color: #5a3a00;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.offer-amount {
    margin: 8px 0 2px;

    font-size: 46px;
    line-height: 1.05;
    font-weight: 800;

    color: #fd2e73;
}

.offer-condition {
    font-size: 17px;
    font-weight: 700;

    color: #35136b;
}


/* =========================================
   FORM
========================================= */

#offerForm {
    width: 100%;
}


/* =========================================
   FORM GROUP
========================================= */

.input-group {
    width: 100%;

    margin-bottom: 18px;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 7px;

    font-size: 15px;
    font-weight: 700;

    color: #35136b;

    margin-bottom: 8px;
}

.input-group label b {
    color: #ff1764;
    font-size: 17px;
}

.input-group label span {
    font-size: 13px;
    font-weight: 400;
    color: #93899b;
}


/* =========================================
   FIELD ICONS
========================================= */

.field-icon {
    width: 27px;
    height: 27px;
    min-width: 27px;

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

    border-radius: 50%;

    font-size: 14px;
}

.name-icon {
    background: #ffd83d;
}

.phone-icon {
    background: #cfefff;
}


/* =========================================
   INPUTS
========================================= */

.input-group input {
    width: 100%;
    height: 52px;
    padding: 0 16px;

    border: 2px solid #ded6e8;
    border-radius: 12px;

    background: #ffffff;

    color: #35136b;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.input-group input::placeholder {
    color: #aaa1b3;
}


/* =========================================
   INPUT FOCUS
========================================= */

.input-group input:focus {
    border-color: #7024b5;

    box-shadow:
        0 0 0 4px rgba(112, 36, 181, 0.09);

    background: #fff;
}


/* =========================================
   NAME ERROR
========================================= */

.field-error {
    display: block;
    min-height: 0;

    margin-top: 5px;

    color: #e53935;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.3;
}

.field-error:empty {
    display: none;
}


/* =========================================
   MOBILE MESSAGE
========================================= */

.mobile-message {
    display: none;
    min-height: 18px;

    margin: 0;
    padding: 0;

    font-size: 11px;
    font-weight: 600;
}

.mobile-message.error {
    display: block;

    margin-top: 4px;

    color: #e53935;
}


/* =========================================
   TERMS
========================================= */

.terms-group {
    margin-top: 5px;
    margin-bottom: 12px;
}

.terms-label {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    align-items: start;

    font-size: 11.5px;
    line-height: 1.35;
}

.terms-label .terms-text {
    grid-column: 2;
    margin: 0;
    line-height: 1.4;
}

.terms-error {
    grid-column: 2;

    display: block;
    width: 100%;

    /* Same size and line height as the checkbox text */
    margin-top: 0;

    color: #e53935;

    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.4;
}


/* =========================================
   GET MY OFFER BUTTON
========================================= */

.submit-btn {
    width: 100%;
    height: 62px;
    min-height: 48px;

    border: none;
    border-radius: 35px;

    background: #fd2e73;

    color: #ffffff;

    font-size: 18px;
    font-weight: 800;

    cursor: pointer;

    opacity: 1;

    transition: all 0.25s ease;
}

.submit-btn:not(:disabled) {
    box-shadow: 0 6px 15px rgba(255, 23, 100, 0.22);
}

.submit-btn.form-ready:hover {
    box-shadow:
        0 10px 22px rgba(255, 23, 100, 0.30);
}

.submit-btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.submit-btn:not(:disabled):active {
    transform: translateY(0);
}


/* =========================================
   PRIVACY TEXT
========================================= */

.privacy-text {
    text-align: center;

    margin-top: 17px;
    margin-bottom: 0;

    font-size: 13px;

    color: #81768b;
}


/* =========================================
   SUCCESS SECTION
   Hidden until script.js sets display: flex
========================================= */

.success-section {
    display: none !important;

    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;

    width: 100%;
    max-width: 820px;
    min-height: 100vh;

    margin: 25px auto 0;
    padding: 0 20px;

    text-align: center;
}

.success-section[style*="display: flex"] {
    display: flex !important;
}

.success-section .offer-result-card {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}

.success-section .download-btn,
.success-section .back-btn {
    width: 250px;
    margin: 0;
}


/* =========================================
   SUCCESS CARD
========================================= */

.offer-result-card {
    position: relative;

    overflow: hidden;

    background: #ffffff;

    border: 2px solid #f5dc82;
    border-radius: 30px;

    padding: 28px 28px 24px;

    box-shadow:
        0 15px 40px rgba(70, 35, 100, 0.12);
}


/* =========================================
   SUCCESS CARD DECORATIVE CIRCLES
========================================= */

.offer-result-card::before {
    content: "";

    position: absolute;

    width: 130px;
    height: 130px;

    background: #fff4bd;

    border-radius: 50%;

    top: -70px;
    left: -55px;

    opacity: 0.7;
}

.offer-result-card::after {
    content: "";

    position: absolute;

    width: 100px;
    height: 100px;

    background: #e8f7ff;

    border-radius: 50%;

    bottom: -55px;
    right: -40px;

    opacity: 0.8;
}


/* =========================================
   SUCCESS LOGO
========================================= */

.offer-logo {
    position: relative;

    z-index: 1;

    margin-bottom: 10px;
}

.offer-logo img {
    width: 155px;
    max-width: 100%;
}


/* =========================================
   SUCCESS HEADING
========================================= */

.offer-result-card h2 {
    position: relative;

    z-index: 1;

    margin: 5px 0 8px;

    color: #35136b;

    font-size: 30px;
    font-weight: 800;
}


/* =========================================
   OFFER CODE
========================================= */

.offer-code-label {
    position: relative;

    z-index: 1;

    color: #8c8198;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.5px;

    margin-bottom: 7px;
}

.offer-code {
    position: relative;

    z-index: 1;

    display: inline-block;

    background: #35136b;
    color: #ffffff;

    font-size: 28px;
    font-weight: 800;

    letter-spacing: 3px;

    padding: 13px 24px;

    border-radius: 14px;

    margin-bottom: 16px;
}


/* =========================================
   CUSTOMER MOBILE
========================================= */

.customer-mobile {
    position: relative;

    z-index: 1;

    display: flex;

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

    gap: 7px;

    color: #35136b;

    font-size: 15px;
    font-weight: 700;

    margin-bottom: 22px;
}


/* =========================================
   STORE NOTE
========================================= */

.store-note {
    position: relative;

    z-index: 1;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 105px;
    gap: 12px;
    align-items: center;

    text-align: left;

    background: #f8f4fc;

    border: 1px solid #e7d8f8;

    border-radius: 16px;

    padding: 14px 16px;

    margin-top: 5px;
}

.store-note strong {
    display: block;

    color: #35136b;

    font-size: 14px;

    margin-bottom: 4px;
}


/* =========================================
   SUCCESS FOOTER
========================================= */

.offer-footer {
    position: relative;

    z-index: 1;

    display: flex;

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

    gap: 7px;

    margin-top: 18px;

    color: #35136b;

    font-size: 14px;
    font-weight: 700;
}


/* =========================================
   SUCCESS BUTTONS
========================================= */

.download-btn,
.back-btn {
    border: none;

    border-radius: 14px;

    padding: 14px 20px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: linear-gradient(
        135deg,
        #ff1764,
        #ff4f8a
    );

    color: #ffffff;

    box-shadow:
        0 8px 20px rgba(255, 23, 100, 0.22);
}

.back-btn {
    background: #f2edf7;

    color: #35136b;
}

.download-btn .btn-icon {
    width: 20px;
    height: 20px;

    flex: none;
}

.download-btn:hover {
    transform: translateY(-1px);
}

.back-btn:hover {
    background: #e8def1;
}


/* =========================================
   SUCCESS CARD ENTRANCE
========================================= */

.success-section.show-animation
.offer-result-card {
    animation:
        offerCardPop
        0.7s
        cubic-bezier(.17,.89,.32,1.28)
        forwards;
}

@keyframes offerCardPop {

    0% {
        opacity: 0;

        transform:
            scale(0.75)
            translateY(35px);
    }

    60% {
        opacity: 1;

        transform:
            scale(1.04)
            translateY(-5px);
    }

    100% {
        opacity: 1;

        transform:
            scale(1)
            translateY(0);
    }
}


/* =========================================
   REWARD TEXT
========================================= */

.reward-content {
    min-width: 0;
}

.reward-point {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 1.55;
    color: #6f6878;
}

.reward-point + .reward-point {
    margin-top: 6px;
}

.reward-point .bullet {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e0457b;
    font-size: 0;
    line-height: 0;
    color: transparent;
    margin-top: 6px;
}

#discountText {
    display: inline;
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 400;
    text-wrap: pretty;
}

#discountText strong {
    display: inline;
    font-weight: 700;
    color: #35136b;
}

#discountText .nw {
    display: inline;
    white-space: nowrap;
}

.directions-hint {
    font-size: 12px;
    font-weight: 600;
    color: #f4145f;
}

.directions-hint .bullet {
    width: 8px;
    height: 8px;
    background: #f4145f;
    margin-top: 5px;
}


/* =========================================
   STORE LOCATION MAP
========================================= */

.location-route {
    width: 105px;
    height: 90px;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
}

.location-route svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}


/* =========================================
   TERMS & PRIVACY POLICY MODAL
========================================= */

.policy-modal {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    display: none;

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

    padding: 20px;

    background: rgba(0, 0, 0, 0.45);

    z-index: 99999;
}

.policy-modal.show {
    display: flex;
}

.policy-modal-content {
    position: relative;

    width: 100%;
    max-width: 620px;
    max-height: 80vh;

    background: #ffffff;

    border-radius: 18px;

    padding: 28px 30px;

    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);

    overflow: hidden;

    animation: policyModalOpen 0.2s ease;
}

.policy-modal-content h2 {
    margin: 0 40px 20px 0;

    font-size: 22px;
    font-weight: 800;

    color: #35136b;
}

.policy-close {
    position: absolute;

    top: 14px;
    right: 16px;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: #f3a0bc;
    color: #ffffff;

    font-size: 25px;
    line-height: 30px;

    cursor: pointer;

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

    z-index: 20;

    transition: 0.2s ease;
}

.policy-close:hover {
    background: #f4145f;
}

.policy-scroll {
    max-height: calc(80vh - 90px);

    overflow-y: auto;

    padding-right: 8px;

    color: #444444;

    font-size: 14px;
    line-height: 1.65;
}

.policy-scroll p {
    margin: 0 0 12px;
}

.policy-scroll strong {
    color: #35136b;
}

.policy-section-title {
    margin-top: 28px !important;
    padding-top: 20px;

    border-top: 1px solid #eee4f5;
}

@keyframes policyModalOpen {

    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* =========================================
   IN-APP NOTICE POPUP
   (overlay reuses .policy-modal)
========================================= */

.notice-box {
    width: 100%;
    max-width: 380px;

    padding: 28px 24px 22px;

    background: #ffffff;

    border: 2px solid #f5dc82;
    border-radius: 24px;

    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);

    text-align: center;

    animation: policyModalOpen 0.2s ease;
}

.notice-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 12px;

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

    border-radius: 50%;

    background: #fff4bd;

    font-size: 28px;
}

.notice-box h2 {
    margin-bottom: 8px;

    color: #35136b;

    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
}

.notice-box p {
    margin-bottom: 20px;

    color: #6f6878;

    font-size: 14px;
    line-height: 1.55;
}

.notice-ok {
    width: 100%;
    min-height: 48px;

    border: none;
    border-radius: 25px;

    background: #fd2e73;
    color: #ffffff;

    font-size: 16px;
    font-weight: 800;

    cursor: pointer;
}

.notice-ok:hover {
    background: #e9145b;
}


/* =========================================
   DOWNLOAD IMAGE ONLY
========================================= */

.download-mode .directions-hint {
    display: none !important;
}

.download-mode .store-note {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
}

.download-mode .reward-content {
    width: 100% !important;
}

.download-mode .reward-point {
    width: 100% !important;
}

.download-mode #discountText {
    width: 100% !important;
    display: block !important;
}

.download-mode .location-route {
    width: 150px !important;
    height: 95px !important;
    align-self: center !important;
    justify-self: auto !important;
    margin: 0 auto !important;
    transform: translateY(-6px);
    overflow: visible;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    html,
    body {
        width: 100%;
        min-height: 100%;

        overflow-x: hidden;
    }


    /* PAGE */

    .page {
        width: 100%;

        min-height: 100vh;
        height: auto;

        display: flex;
        flex-direction: column;

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

        padding: 18px 12px 30px;

        overflow-x: hidden;
        overflow-y: auto;
    }


    /* REGISTRATION CARD */

    .page > .offer-card {
        width: 100%;
        max-width: 430px;

        margin: 0 auto;

        padding: 18px 18px 20px;

        border-radius: 24px;
    }


    /* HEADER */

    .offer-header {
        margin-bottom: 16px;

        padding-bottom: 14px;
    }

    .header-logo {
        width: 96px;

        margin-bottom: 8px;
    }

    .offer-tag {
        font-size: 11px;
    }

    .offer-amount {
        font-size: 40px;
    }

    .offer-condition {
        font-size: 15px;
    }


    /* FORM */

    .input-group {
        margin-bottom: 12px;
    }

    .input-group label {
        font-size: 13px;

        margin-bottom: 5px;
    }

    .field-icon {
        width: 23px;
        height: 23px;

        min-width: 23px;

        font-size: 12px;
    }

    .input-group input {
        height: 50px;

        font-size: 14px;

        padding: 11px 12px;

        border-radius: 11px;
    }


    /* PRIVACY */

    .privacy-text {
        font-size: 10px;

        margin-top: 8px;
    }


    /* SUCCESS */

    .success-section {
        gap: 12px;
    }

    .offer-result-card {
        padding: 24px 18px 20px;

        border-radius: 24px;
    }

    .offer-result-card h2 {
        font-size: 25px;
    }

    .offer-code {
        font-size: 23px;

        letter-spacing: 2px;

        padding: 12px 18px;
    }

    .store-note {
        grid-template-columns: minmax(0, 1fr) 90px;
        column-gap: 8px;
    }

    .location-route {
        width: 90px;
        height: 75px;
    }


    /* MODAL */

    .policy-modal-content {
        max-height: 85vh;

        padding: 24px 20px;

        border-radius: 16px;
    }

    .policy-modal-content h2 {
        font-size: 19px;
        margin-bottom: 16px;
    }

    .policy-scroll {
        font-size: 13px;
        line-height: 1.6;
        max-height: calc(85vh - 85px);
        padding-right: 6px;
    }

    .policy-close {
        width: 32px;
        height: 32px;

        top: 12px;
        right: 12px;
    }
}
