:root {
    --base_back_color: white;
    --base_text_color: #000000;
    --gray_text_color: #787878;
    --dark_text_color: #404040;
    --main_font_family: 'Segoe UI';
    --header_back_color: #EE7D0A;
    --footer_back_color: #E0E8F1;
    --primary_back_color: #f7931e;
    --primary_text_color: white;
    --accent_color: #0077B6;
    --success_color: #6cb14e;
    --error_color: #dd3c4c;
    --inactive_color: #aaa;
    --button_color: #5D8B93;
    --process_font_family: 'Verdana';
    --message1_font_family: Arial;
}

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

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: var(--main_font_family), sans-serif;
    color: var(--base_text_color);
    background-color: var(--base_back_color);
    align-items: center;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}


/* -------- BACKGROUND -------- */
.background-container {
    position: absolute;
    top: 200px;
    left: 0;
    width: 100%;
    height: calc(100vh - 350px);
    z-index: -1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.65);
    z-index: 1;
}


@media screen and (max-width: 960px) {
    .background-container {
        top: 150px;
        height: calc(100vh - 280px);
    }
}


/* -------- HEADER -------- */
.main-title-container {
    background-color: var(--header_back_color);
    width: 100%;
    height: 64px;
    padding-right: 1em;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
}

.main-title {
    color: white;
    background-color: var(--header_back_color);
    padding-left: 20rem;
    font-size: x-large;
    font-weight: bold;
    white-space: nowrap;
}

.mode-icon {
    background-color: var(--header_back_color);
    width: 64px;
    height: 64px;
}


.page-title {
    display: flex;
    justify-content: flex-start;
}

#pageTitle {
    background: white;
    color: black;
    align-self: flex-start;
    margin-top: -1rem;
    margin-left: 20rem;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: xx-large;
    font-weight: bold;
    z-index: 1;
}


.home-link-container {
    position: absolute;
    top: 124px;
    left: 20px;
    z-index: 10;
}

.home-link-icon {
    width: 50px;
    height: 50px;
    cursor: pointer;
}

.home-link-caption {
    font-family: var(--process_font_family), sans-serif;
    font-size: small;
    text-align: center;
    color: var(--gray_text_color);
}


@media screen and (max-width: 960px) {
    .main-title {
        padding-left: 1rem;
    }

    #pageTitle {
        font-size: 1.4rem;
        margin-left: 1rem;
        padding: 0.4rem 1rem;
        z-index: 1;
    }

    .home-link-container {
        top: 90px;
        left: 20px;
    }

    .home-link-icon {
        width: 40px;
        height: 40px;
    }

    .home-link-caption {
    }
}

@media screen and (max-width: 1200px) {
    .home-link-caption{
        display: none;
    }
    .home-link-icon {
        display: none;
    }
}


/* -------- PROGRESS BAR -------- */
.page-section {
    padding: 3rem 1rem;
    width: 100%;
}

#progressSection {
    width: 100vw;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 1rem;
    background: var(--base_back_color);
    overflow-x: visible;
    z-index: 1;
    position: relative;
}

#progressSection::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100vw;
    background: var(--base_back_color);
    z-index: -1;
}


.progress-bar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4rem;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}


.step-label {
    font-family: var(--process_font_family), sans-serif;
    font-size: small;
    color: var(--dark_text_color);
    text-align: center;
    line-height: 1.2;
    min-height: 2rem;
    margin-top: 0.3rem;
    width: clamp(60px, 12vw, 80px);
}

.step-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.step {
    width: clamp(30px, 8vw, 55px);
    height: clamp(30px, 8vw, 55px);
    border-radius: 50%;
    background: transparent;
    border: 3px solid var(--inactive_color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.8rem, 1.8vw, 1.2rem);
    font-weight: bold;
    color: var(--base_text_color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.step.completed {
    background: var(--success_color);
    border-color: var(--success_color);
    color: #fff;
}

.step.completed::before {
    content: '✓';
    font-size: clamp(0.9rem, 2vw, 1.4rem);
}

.step.error {
    background: var(--error_color);
    border-color: var(--error_color);
    color: #fff;
}

.step.error::before {
    content: '✖';
    font-size: clamp(0.9rem, 2vw, 1.4rem);
}

.step.active {
    background-color: #fff;
    border-color: var(--primary_back_color);
    position: relative;
}

.step.active::before {
    content: '';
    position: absolute;
    width: 40%;
    height: 40%;
    background-color: var(--primary_back_color);
    border-radius: 50%;
    z-index: 2;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.buttons button {
    padding: 1rem 2rem;
    background: var(--accent_color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.buttons button:hover {
    background: #005f87;
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


@media screen and (max-width: 960px) {
    .progress-bar {
        gap: 0.9rem;
        padding: 0 1rem;
    }

    .step-label {
        width: clamp(50px, 10vw, 70px);
    }

    .step {
        width: clamp(28px, 10vw, 40px);
        height: clamp(28px, 10vw, 40px);
        font-size: clamp(0.7rem, 1.6vw, 1rem);
    }

    .step.completed::before,
    .step.error::before {
        font-size: clamp(0.8rem, 1.8vw, 1.1rem);
    }
    #progressSection {
        padding: 0.7rem 1rem;
    }
}


/* -------- FOOTER -------- */
.main-footer {
    background-color: var(--footer_back_color);
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000;
}

.footer-logo-left {
    position: absolute;
    left: 5rem;
    bottom: 0.01rem;
    height: 96px;
}

.footer-logo-right {
    position: absolute;
    right: 6rem;
    height: 24px;
    bottom: 8px;
}

.wallet-footer-logo-right {
    position: absolute;
    right: 1rem;
    height: 24px;
    bottom: 8px;
}

#logoRdeBig {
}

#logoRdeLow {
    height: 48px;
    display: none;
}


@media screen and (max-width: 1600px) {
    #logoRdeBig {
        display: none;
    }
    #logoRdeLow {
        display: unset;
    }
}

@media screen and (max-width: 800px) {
    .main-footer {
        height: 48px;
        padding: 0 10px;
        justify-content: space-between;
    }

    .footer-logo-left {
        left: 1em; !important
    }

    .footer-right-part {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .footer-right-part img {
        height: 22px;
        width: auto;
        object-fit: contain;
    }
}


/* -------- MAIN -------- */
.main-container {
}


main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 80px;
    overflow-y: auto;
}


.message-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.message-text-box {
}

.message-image-box {
    height: 100%;
    display: flex;
    align-items: center;
}

.messageText {
    color: var(--primary_text_color);
    background-color: var(--primary_back_color);
    font-size: large;
    padding-bottom: 16px;
    text-align: justify;
}

.message-icon {
    width: 64px;
    height: 64px;
}


.base-card {
    color: var(--primary_text_color);
    background-color: var(--primary_back_color);
    max-width: 560px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.info-card {
    max-width: 480px;
}

.success-card {
    background-color: var(--success_color);
    max-width: 480px;
}

.error-card {
    background-color: var(--error_color);
    max-width: 480px;
}


.qrCode {
    width: 160px;
    height: 160px;
}


.photo {
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#personPhoto {
    width: 160px;
    height: 160px;
    text-align: center;
}


.large-button {
    font-family: var(--process_font_family), sans-serif;
    font-size: large;
    background-color: var(--button_color);;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.dialog-button {
    width: 132px;
}


@media screen and (max-width: 800px) {
    .message-container {
        flex-direction: column;
        align-items: center;
        gap: 1em;
    }

    .messageText {
        font-size: medium;
    }

    .message-icon {
        width: 48px;
        height: 48px;
    }

    .qrCode  {
        max-width: 120px;
        max-height: 120px;
    }

    .photo {
        max-width: 120px;
        max-height: 120px;
    }
    #personPhoto {
        width: 120px;
        height: 120px;
    }

    .base-card,
    .info-card,
    .success-card,
    .error-card {
        max-width: 350px;
        padding: 20px;
    }

    .large-button {
        font-size: medium;
        padding: 0.75rem;
    }

    #paymentLogo {
        height: 40px;
    }
}


/* -------- STEP-0 -------- */
.step0-background {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    height: 50vh;
    overflow: hidden;
    z-index: 0;
}

.step0-background-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.step0-logo {
    display: block;
    margin: 0 auto 1rem auto;
    max-width: 200px;
    height: auto;
    z-index: 1;
    position: relative;
    filter: brightness(0) invert(1);
    margin-top: 5vh;
}

.step0-content {
    margin-top: 50vh;
    background-color: #E0E8F1;
    margin: 1vh auto 2rem auto;
    padding: 2rem 4rem 2rem 4rem;
    border-radius: 12px;
    max-width: 1350px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.step0-content-left {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
}

.step0-content-left p {
    white-space: pre-line;
    color: #000;
    line-height: normal;
}

.step0-content-right {
    flex: 0.8;
    align-self: flex-end;
    transform: translateY(40px);
    z-index: 2;
}

.step0-content h2 {
    font-size: xx-large;
    color: #000;
    line-height: normal;
    margin-bottom: 0.5rem;
}

.step0-content h3 {
    color: #000;
    line-height: normal;
    margin-bottom: 1rem;
}

.step0-content p {
    color: #000;
    line-height: normal;
    margin-bottom: 1rem;
}

.step0-button-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.step0-content-image {
    height: 250px;
    width: 210px;
    object-fit: cover;
    border: 4px solid white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    align-self: flex-end;
    margin-left: 70px;
    transform: translateY(30px);
}

.step0-text {
    text-align: justify;
}

.device-mode-button {
    width: 328px;
    display: none;
}


@media screen and (max-width: 800px) {
    .step0-background {
        height: 40vh;
        top: 60px;
    }

    .step0-logo {
        max-width: 150px;
        margin-bottom: -1rem;
        margin-top: 10vh;
    }

    .step0-content {
        flex-direction: column;
        margin-top: 30vh;
        padding: 1rem;
        max-width: 90vw;
    }

    .step0-content-left,
    .step0-content-right {
        width: 100%;
    }

    .step0-content-left {
        padding-top: 0.5rem;
    }

    .step0-content-right {
        align-items: center;
        justify-content: center;
        bottom: 0;
        position: relative;
        right: auto;
        transform: none;
    }

    .step0-content-image {
        height: 200px;
        width: 200px;
        max-width: 80%;
        margin-top: 1.5rem;
        margin-left: 4rem;
        align-self: center;
    }

    .step0-button-bar {
        gap: 1rem;
    }
}


/* -------- STEP-1 -------- */
#step1 {
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: center;
    background-size: cover;
    box-sizing: border-box;
}


.ticket-type-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    flex-wrap: wrap;
}


.ticket-type {
    background-color: var(--primary_back_color);
    color: white;
    border-radius: 12px;
    padding: 25px;
    width: 260px;
    height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: left;
    cursor: pointer;
}

.ticket-type:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}


.ticket-row-1 {
    font-size: x-large;
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.ticket-row-2 {
    opacity: 0.95;
    margin-bottom: 1rem;
}

.ticket-row-2 strong {
    font-weight: bold;
}

.ticket-row-3 {
    font-size: large;
    font-weight: bold;
    text-align: right;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    padding-top: 0.8rem;
}

.ticket-row-1x {
    width: 20px;
    height: 20px;
}


/* -------- STEP-2 -------- */
#step2 {
    width: 100%;
    padding: 2rem;
}

.step2-card {
}

#step2Message1 {
    font-family: var(--message1_font_family), sans-serif;
}

#step2Message3 {
    font-size: smaller;
    margin-top: 4px;
    padding-top: 4px;
    border-color: white;
    border-top-width: 1px;
    border-top-style: solid;
}


/* -------- STEP-3 -------- */
#step3 {
    width: 100%;
    padding: 2rem;
}

.step3-card {
    padding: 24px 0 0 0;
    flex-direction: column;
}

.step3-message-container {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

#step3Message1 {
    font-family: var(--message1_font_family), sans-serif;
}

.step3-button-bar {
    background-color: white;
    width: 100%;
    padding: 1.25rem;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    z-index: 3;
}


@media screen and (max-width: 800px) {
    .step3-card {
        max-width: 328px;
    }

    #step3Message1,
    #step3Message2 {
        padding-bottom: 8px;
    }

    .step3-button-bar {
        gap: 1rem;
    }
}


/* -------- STEP-4 -------- */
#step4 {
    width: 100%;
    padding: 2rem;
}

.step4-card {
    max-width: 440px;
    padding: 24px 0 0 0;
    flex-direction: column;
}

.step4-message-container {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

#step4Message1 {
    font-family: var(--message1_font_family), sans-serif;
    text-transform: uppercase;
    background-color: var(--success_color);
}

#step4Message2 {
    font-family: var(--message1_font_family), sans-serif;
    background-color: var(--success_color);
}

.step4-button-bar {
    background-color: white;
    width: 100%;
    padding: 1.25rem;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    z-index: 3;
}


@media screen and (max-width: 800px) {
    #step4Message1,
    #step4Message2 {
        padding-bottom: 8px;
    }

    .step4-button-bar {
        gap: 1rem;
    }
}


/* -------- STEP-5 -------- */
#step5 {
    width: 100%;
    padding: 2rem;
}

.step5-card {
}

#step5Message1 {
    font-family: var(--message1_font_family), sans-serif;
}

#step5Message2 {
}


@media screen and (max-width: 800px) {
    #step5Message1,
    #step5Message2 {
        padding-bottom: 8px;
    }
}


/* -------- STEP-6 -------- */
#step6 {
    width: 100%;
    padding: 2rem;
}

.step6-card {
    padding: 24px 0 0 0;
    max-width: 480px;
    flex-direction: column;
}

.step6-message-container {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}

#step6Message1 {
    font-family: var(--message1_font_family), sans-serif;
    background-color: var(--success_color);
}

#step6Message2 {
    background-color: var(--success_color);
}

#step6Message3 {
    background-color: var(--success_color);
}

.step6-button-bar {
    background-color: white;
    width: 100%;
    padding: 1.25rem;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    z-index: 3;
}


@media screen and (max-width: 800px) {
    .step6-card {
        max-width: 344px;
    }

    .step6-message-container {
        gap: 0rem;
    }

    .step6-button-bar {
        gap: 1rem;
    }

    #step6Message1,
    #step6Message2,
    #step6Message3 {
        padding-bottom: 8px;
    }
}


/* -------- STEP-7 -------- */
#step7 {
    width: 100%;
    padding: 2rem;
}

#step7Message1 {
    font-family: var(--message1_font_family), sans-serif;
    background-color: var(--error_color);
}

#step7Message2 {
    background-color: var(--error_color);
}

#step7Message3 {
    background-color: var(--error_color);
}


@media screen and (max-width: 800px) {
    #step7-card {
        max-width: 344px;
    }

    #step7Message1,
    #step7Message2,
    #step7Message3 {
        padding-bottom: 8px;
    }
}

