
/* =========================================================
   QR RESULT PANEL
   ========================================================= */

.result {
    min-height: 640px;
    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 20% 50%,
            rgba(18,103,245,.055),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 35%,
            rgba(22,168,107,.035),
            transparent 30%
        ),
        #fff;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty {
    width: 100%;
    min-height: 580px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 55px;

    position: relative;
    padding: 40px 50px;

    text-align: left;
}


/* =========================================================
   ILLUSTRATION AREA
   ========================================================= */

.empty-illustration {
    width: 310px;
    height: 330px;

    position: relative;

    flex: 0 0 310px;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* =========================================================
   PHONE
   ========================================================= */

.empty-phone {
    width: 170px;
    height: 285px;

    position: relative;
    z-index: 5;

    background:
        linear-gradient(
            145deg,
            #ffffff 0%,
            #f6f9ff 100%
        );

    border: 7px solid #dfe8f7;

    border-radius: 30px;

    box-shadow:
        0 25px 55px rgba(34,72,130,.13),
        0 0 0 1px rgba(255,255,255,.8) inset;

    transform: rotate(-3deg);

    animation: emptyPhoneFloat 4s ease-in-out infinite;
}


/* Phone inner border */
.empty-phone::before {
    content: "";

    position: absolute;

    inset: 6px;

    border: 1px solid #edf2fa;

    border-radius: 23px;

    pointer-events: none;
}


/* =========================================================
   PHONE SPEAKER
   ========================================================= */

.phone-speaker {
    position: absolute;

    width: 45px;
    height: 5px;

    top: 12px;
    left: 50%;

    transform: translateX(-50%);

    background: #d6dfec;

    border-radius: 10px;

    z-index: 10;
}


/* =========================================================
   QR INSIDE PHONE
   ========================================================= */

.empty-qr {
    position: absolute;

    width: 108px;
    height: 108px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    background:
        repeating-conic-gradient(
            #202b3e 0 8%,
            #fff 0 16%
        );

    border: 8px solid #fff;

    border-radius: 5px;

    box-shadow:
        0 5px 20px rgba(34,65,110,.10),
        0 0 0 1px #e6edf7;

    overflow: hidden;
}


/* QR pattern */
.empty-qr::before {
    content: "";

    position: absolute;

    inset: 18px;

    background:
        repeating-linear-gradient(
            0deg,
            transparent 0 8px,
            #26354b 8px 13px
        ),
        repeating-linear-gradient(
            90deg,
            transparent 0 9px,
            #26354b 9px 14px
        );

    opacity: .75;
}


/* QR corner blocks */
.empty-qr span {
    position: absolute;

    width: 25px;
    height: 25px;

    background: #fff;

    border: 5px solid #243148;

    z-index: 3;
}

.empty-qr span:nth-child(1) {
    left: 5px;
    top: 5px;
}

.empty-qr span:nth-child(2) {
    right: 5px;
    top: 5px;
}

.empty-qr span:nth-child(3) {
    left: 5px;
    bottom: 5px;
}


/* Small inner squares */
.empty-qr span:nth-child(1)::after,
.empty-qr span:nth-child(2)::after,
.empty-qr span:nth-child(3)::after {
    content: "";

    position: absolute;

    inset: 4px;

    background: #243148;
}


/* =========================================================
   SCANNING LINE
   ========================================================= */

.scan-line {
    position: absolute;

    left: 20px;
    right: 20px;

    top: 72px;

    height: 3px;

    z-index: 8;

    background:
        linear-gradient(
            90deg,
            transparent,
            #35dca8 20%,
            #1267f5 50%,
            #35dca8 80%,
            transparent
        );

    box-shadow:
        0 0 7px rgba(18,103,245,.65),
        0 0 18px rgba(53,220,168,.45);

    opacity: .9;

    animation: emptyScan 2.3s ease-in-out infinite;
}


/* Scan glow */
.scan-line::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    top: -20px;

    height: 45px;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(53,220,168,.16),
            transparent
        );

    filter: blur(5px);
}


/* =========================================================
   PHONE LOGO
   ========================================================= */

.phone-logo {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    width: 34px;
    height: 34px;

    border-radius: 10px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            #1267f5,
            #16a86b
        );

    border: 4px solid #fff;

    color: #fff;

    font-size: 17px;
    font-weight: 950;

    z-index: 10;

    box-shadow:
        0 5px 15px rgba(18,103,245,.22);

    animation: logoPulse 2s ease-in-out infinite;
}


/* =========================================================
   DECORATIVE DOTS
   ========================================================= */

.empty-dots {
    position: absolute;

    width: 75px;
    height: 75px;

    background-image:
        radial-gradient(
            #bcd0ef 1.5px,
            transparent 1.5px
        );

    background-size: 10px 10px;

    opacity: .55;
}


.dots-left {
    left: 0;
    top: 50px;
}


.dots-right {
    right: 5px;
    bottom: 45px;

    opacity: .35;
}


/* =========================================================
   CURVED ARROW
   ========================================================= */

.empty-arrow {
    position: absolute;

    width: 120px;
    height: 75px;

    right: -10px;
    top: 40px;

    color: #7ca5ed;

    animation: arrowFloat 2.8s ease-in-out infinite;
}

.empty-arrow svg {
    width: 100%;
    height: 100%;

    overflow: visible;
}


/* =========================================================
   EMPTY CONTENT
   ========================================================= */

.empty-content {
    position: relative;

    z-index: 5;

    max-width: 310px;
}


.empty-content h2 {
    margin: 0 0 9px;

    color: var(--text);

    font-size: 25px;

    line-height: 1.2;

    letter-spacing: -.7px;

    font-weight: 850;
}


.empty-content p {
    margin: 0;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.7;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes emptyScan {

    0% {
        top: 55px;
        opacity: .25;
    }

    20% {
        opacity: 1;
    }

    50% {
        top: 225px;
        opacity: 1;
    }

    70% {
        opacity: .8;
    }

    100% {
        top: 55px;
        opacity: .25;
    }
}


@keyframes emptyPhoneFloat {

    0%,
    100% {
        transform: rotate(-3deg) translateY(0);
    }

    50% {
        transform: rotate(-3deg) translateY(-8px);
    }
}


@keyframes logoPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.08);
    }
}


@keyframes arrowFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(-2deg);
    }

    50% {
        transform: translate(5px, -7px) rotate(2deg);
    }
}


/* =========================================================
   RESULT CONTENT AFTER QR IS GENERATED
   ========================================================= */

.result.has-result {
    display: block;
    padding: 25px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .empty {
        gap: 25px;
        padding: 35px;
    }

    .empty-illustration {
        width: 270px;
        flex-basis: 270px;
    }

    .empty-phone {
        width: 150px;
        height: 255px;
    }

    .empty-qr {
        width: 95px;
        height: 95px;
    }

    .empty-content h2 {
        font-size: 22px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .result {
        min-height: 540px;
    }

    .empty {
        min-height: 500px;

        flex-direction: column;

        gap: 10px;

        padding: 30px 20px;

        text-align: center;
    }

    .empty-illustration {
        width: 280px;
        height: 290px;

        flex: none;
    }

    .empty-phone {
        width: 150px;
        height: 250px;
    }

    .empty-qr {
        width: 95px;
        height: 95px;
    }

    .empty-arrow {
        right: 0;
        top: 20px;
    }

    .dots-left {
        left: 0;
        top: 45px;
    }

    .dots-right {
        right: 0;
        bottom: 25px;
    }

    .empty-content {
        max-width: 300px;
    }

    .empty-content h2 {
        font-size: 21px;
    }

    .empty-content p {
        font-size: 11px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .result {
        min-height: 500px;
    }

    .empty {
        min-height: 460px;
        padding: 20px 12px;
    }

    .empty-illustration {
        width: 250px;
        height: 260px;
    }

    .empty-phone {
        width: 135px;
        height: 225px;
    }

    .empty-qr {
        width: 85px;
        height: 85px;

        border-width: 6px;
    }

    .phone-logo {
        width: 30px;
        height: 30px;

        font-size: 15px;
    }

    .empty-arrow {
        width: 95px;
        height: 60px;
        right: -2px;
        top: 18px;
    }

    .empty-dots {
        transform: scale(.8);
    }

    .empty-content h2 {
        font-size: 19px;
    }
}



/* =========================================================
   RESULT PANEL
   ========================================================= */

.result {
    min-height: 640px;
    position: relative;
    overflow: hidden;

    background: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 25px;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.result #emptyState {
    width: 100%;
    min-height: 580px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 55px;

    transition:
        opacity .25s ease,
        transform .25s ease;
}


/* =========================================================
   GENERATED RESULT
   ========================================================= */

.result #result {
    width: 100%;
}


/*
   VERY IMPORTANT:

   Once QR is generated, resultPanel receives
   .has-result and the empty illustration disappears.
*/

.result.has-result {
    display: block;
    min-height: 640px;
    padding: 25px;
}


/* Hide empty state after generation */
.result.has-result #emptyState {
    display: none !important;
}


/* Generated result */
.result.has-result #result {
    display: block;
    width: 100%;
}


/* =========================================================
   RESULT HEADER
   ========================================================= */

.result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.result-head h2 {
    font-size: 38px;
    line-height: 1;
    margin: 10px 0 0;
    letter-spacing: -1.5px;
}

.result-head .mini {
    max-width: 180px;
    text-align: right;
    word-break: break-all;
}


/* =========================================================
   QR CODE
   ========================================================= */

.qr-card {
    width: min(330px, 100%);
    aspect-ratio: 1;

    margin: 20px auto;

    padding: 15px;

    border: 1px solid var(--line);
    border-radius: 20px;

    display: grid;
    place-items: center;

    background: #fff;

    box-shadow:
        0 10px 30px rgba(25,60,110,.06);
}

.qr-card img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* =========================================================
   RESULT BUTTON
   ========================================================= */

.result .primary {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 47px;

    margin-top: 17px;

    border: 0;
    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            #1267f5,
            #1987ff
        );

    color: #fff;

    font-weight: 900;

    cursor: pointer;

    box-shadow:
        0 10px 22px rgba(18,103,245,.15);
}


/* =========================================================
   DETAILS
   ========================================================= */

.details {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 7px;

    margin-top: 10px;
}

.details div {
    border: 1px solid var(--line);

    border-radius: 9px;

    padding: 9px;
}

.details span {
    display: block;

    color: var(--muted);

    font-size: 9px;
}

.details strong {
    display: block;

    font-size: 10px;

    word-break: break-all;

    margin-top: 3px;
}


/* =========================================================
   SHARE LINK
   ========================================================= */

.link {
    margin-top: 14px;
}

.link label {
    display: block;

    font-size: 10px;

    color: var(--muted);
}

.link > div {
    display: flex;

    gap: 7px;

    margin-top: 5px;
}

.link input {
    flex: 1;
    min-width: 0;
}

.link button {
    flex: 0 0 auto;

    border: 0;

    background: #10203e;

    color: #fff;

    border-radius: 9px;

    padding: 0 15px;

    cursor: pointer;
}


/* =========================================================
   ACTION BUTTONS
   ========================================================= */

.actions {
    display: flex;

    gap: 6px;

    flex-wrap: wrap;

    margin-top: 8px;
}

.actions button {
    flex: 1;

    min-width: 70px;

    border: 1px solid var(--line);

    background: var(--card);

    color: var(--text);

    border-radius: 9px;

    padding: 8px 11px;

    cursor: pointer;

    font-size: 11px;
}

.actions button:hover {
    border-color: #a8c6f7;

    color: var(--blue);
}


/* =========================================================
   WARNING
   ========================================================= */

.warning {
    margin-top: 15px;

    padding: 11px;

    background: #fff8e8;

    border-radius: 10px;

    font-size: 10px;

    color: #75633a;

    line-height: 1.5;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .result {
        min-height: 540px;
        padding: 18px;
    }

    .result #emptyState {
        min-height: 500px;

        flex-direction: column;

        gap: 10px;

        text-align: center;
    }

    .result.has-result {
        min-height: 540px;

        padding: 18px;
    }

    .result-head h2 {
        font-size: 32px;
    }

    .qr-card {
        width: min(300px, 100%);

        margin: 18px auto;
    }

    .details {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   QR RESULT STATE
   ========================================= */

/* Result is hidden initially */
#result[hidden] {
    display: none !important;
}

/* Empty state visible initially */
#emptyState {
    display: flex;
}

/* When QR is generated:
   hide empty animation completely */
#resultPanel.has-result #emptyState {
    display: none !important;
}

/* Generated result fills the same panel */
#resultPanel.has-result {
    display: block;
    min-height: 640px;
    padding: 25px;
}

#resultPanel.has-result #result {
    display: block;
    width: 100%;
}


/* Mobile */
@media (max-width: 700px) {

    #resultPanel.has-result {
        min-height: 540px;
        padding: 18px;
    }

}


/* =========================================================
   PAYMENT GENERATOR FORM
   ========================================================= */

.generator-panel {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 15px;
    margin-bottom: 15px;
}

.form-group {
    min-width: 0;
}

.generator-panel label {
    display: block;
    margin: 0 0 7px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
}

.generator-panel label em {
    font-style: normal;
    font-weight: 500;
    color: #8b92a0;
    margin-left: 3px;
}

.generator-panel input:not([type="checkbox"]) {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    color: var(--text);
    outline: none;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.generator-panel input:not([type="checkbox"]):focus {
    border-color: #8db7fb;
    box-shadow: 0 0 0 3px rgba(18, 103, 245, .08);
}

.generator-panel input::placeholder {
    color: #9aa5b7;
}

.generator-panel small {
    display: block;
    margin-top: 5px;
    color: #8b92a0;
    font-size: 10px;
    line-height: 1.4;
}


/* Amount */

.amount {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    overflow: hidden;
    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.amount:focus-within {
    border-color: #8db7fb;
    box-shadow: 0 0 0 3px rgba(18, 103, 245, .08);
}

.amount b {
    flex: 0 0 auto;
    padding-left: 13px;
    color: #7d8798;
    font-size: 15px;
}

.amount input {
    width: 100%;
    height: 44px !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}


/* Quick buttons */

.quick {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.quick button {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--card);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition:
        border-color .2s ease,
        background .2s ease,
        color .2s ease,
        transform .15s ease;
}

.quick button:hover {
    border-color: #a8c6f7;
    color: var(--blue);
    background: #f7faff;
}

.quick button:active {
    transform: scale(.97);
}


/* Generate button */

.generator-panel .primary {
    width: 100%;
    min-height: 48px;
    margin-top: 20px;
}


/* Privacy */

.generator-panel .privacy {
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #f1f7ff;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.generator-panel .privacy b {
    color: var(--blue);
    margin-right: 6px;
}


/* Error */

.generator-panel .error {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    background: #fff0f0;
    color: #b42318;
    font-size: 11px;
    line-height: 1.5;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 15px;
    }

    .generator-panel {
        padding: 20px;
    }

    .generator-panel .panel-title {
        margin-bottom: 4px;
    }

    .generator-panel .panel-title h2 {
        font-size: 22px;
    }

    .generator-panel .panel-title p {
        font-size: 11px;
    }

    .generator-panel label {
        font-size: 12px;
    }

    .quick {
        gap: 6px;
    }

    .quick button {
        flex: 0 0 auto;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .generator-panel {
        padding: 17px;
        border-radius: 17px;
    }

    .form-row {
        display: block;
        margin-top: 14px;
    }

    .form-group {
        width: 100%;
        margin-bottom: 14px;
    }

    .form-group:last-child {
        margin-bottom: 0;
    }

    .generator-panel input:not([type="checkbox"]),
    .amount {
        height: 45px;
    }

    .amount input {
        height: 43px !important;
    }

    /*
     * Quick amount section
     * becomes a clean horizontal wrapping row
     */
    .quick {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 7px;
        margin-top: 9px !important;
    }

    .quick button {
        width: 100%;
        min-height: 38px;
        padding: 7px 5px;
        font-size: 11px;
    }

    /*
     * Quick purpose
     * 3 columns on mobile
     */
    .generator-panel > .quick {
        grid-template-columns: repeat(3, 1fr);
    }

    .generator-panel .primary {
        min-height: 50px;
        margin-top: 18px;
        font-size: 13px;
    }

    .generator-panel .privacy {
        font-size: 9.5px;
        padding: 10px 11px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .generator-panel {
        padding: 15px;
    }

    .quick {
        grid-template-columns: repeat(2, 1fr);
    }

    .generator-panel > .quick {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick button {
        min-height: 37px;
        font-size: 10.5px;
    }

    .generator-panel .primary {
        font-size: 12px;
    }
}


/* =========================================================
   DARK MODE
   ========================================================= */

.dark .generator-panel input:not([type="checkbox"]),
.dark .dark .amount {
    background: var(--card);
}

.dark .quick button {
    background: var(--card);
    color: var(--text);
}

.dark .quick button:hover {
    background: #162642;
    border-color: #3c6eb5;
}

.dark .generator-panel .privacy {
    background: #10223d;
}


a.login-link:hover {
    
    color: #1267f5;
}
    
    
 .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-left,
.footer-right {
    width: 50%;
}

.footer-right {
    text-align: right;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        width: 100%;
        text-align: center;
    }
}
