@font-face {
    font-family: "Roboto-Flex";
    src: url("/composeResources/lina.composeapp.generated.resources/font/RobotoFlex-VariableFont.ttf") format('truetype');
    font-weight: 100 1000; /* For variable fonts, specify the weight range */
    font-display: swap;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'RobotoFlex', sans-serif;
}

#screen {
    padding: 40px;
    display: grid;
    grid-template-areas:
        "header"
        "scale"
        "content"
        "footer";
    height: calc(100dvh - 80px);
    grid-template-columns: 1f;
    grid-gap: 32px;

    &.hidden {
        display: none;
    }

    /* Switch loading indicators based on entry point */
    .loading-button {
        display: none;
    }

    &.from-ad {
        .loading-spinner {
            display: none;
        }
    }

    @media (min-width: 840px) {
        grid-template-areas:
            "spacer-left header header spacer-right"
            "spacer-left scale content spacer-right"
            "spacer-left footer footer spacer-right";
        grid-template-columns: auto 250px 400px auto;
    }
}

#logo {
    grid-area: header;
    width: 100%;
    text-align: center;
}

#scale {
    grid-area: scale;
}

.center-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;

    @media (min-width: 840px) {
        justify-content: center;
    }
}

#scale-container {
    justify-content: flex-end;

    @media (min-width: 840px) {
        justify-content: center;
    }
}


#scale-animation {
    width: 250px;
    position: relative;
    text-align: center;
}

@keyframes bounce {
    0% {
        bottom: -10px;
    }
    100% {
        bottom: 10px;
    }
}

#scale-image-scale {
    animation: bounce 1.5s ease-in-out infinite alternate;
    bottom: -10px;
    position: relative;
}

@keyframes shadow-fade {
    0% {
        opacity: 1
    }
    100% {
        opacity: 0;
    }
}

#scale-image-shadow {
    animation: shadow-fade 1.5s ease-in-out infinite alternate;
}

#content {
    grid-content: content;
}

#content-heading {
    padding: 32px 24px 0 24px;
    font-weight: 700;
    font-size: 32px;
    line-height: 42px;
    text-align: center;
    font-family: "Roboto-Flex", sans-serif;
    letter-spacing: -0.5px;
}

#content-text {
    padding: 32px 24px 0 24px;
    font-weight: 100;
    font-size: 20px;
    line-height: 26px;
    text-align: center;
    font-family: "Roboto-Flex", sans-serif;
}

#content-button {
    display: none;
    margin: 64px 24px 0 24px;
}

#screen.from-ad #content-button {
    @media (min-width: 840px) {
        display: flex;
    }
}

#content-spinner {
    display: none;

    @media (min-width: 840px) {
        display: block;
    }
}

#buttons {
    grid-area: footer;

    @media (min-width: 840px) {
        display: none;
    }
}

#screen.from-ad #buttons .loading-button {
    display: flex;

    @media (min-width: 840px) {
        display: none;
    }
}

#buttons-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.button {
    min-height: 64px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: "Roboto-Flex", sans-serif;
    font-weight: 600;
    font-size: 20px;
    padding: 0 20px;
    border-radius: 18px;
    border: none;
}

.loading-button {
    color: #8EA1AA;
    border: 2px solid #8EA1AA;
    background-color: #fff;
}

.ready-button {
    background-color: #007AFF;
    color: white;
    cursor: pointer;
}

#spacer-left {
    display: none;
    grid-area: spacer-left;

    @media (min-width: 840px) {
        display: block;
    }
}

#spacer-right {
    display: none;
    grid-area: spacer-right;

    @media (min-width: 840px) {
        display: block;
    }
}

#composeApp {
    opacity: 0;
    visibility: hidden;
    width: 100dvw;
    height: 100dvh;
    padding: 0;
    overflow: hidden;

    &.ready {
        visibility: visible;
        opacity: 1;
        transition: opacity 0.3s ease-in;
    }
}

@keyframes circular-rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes circular-dash {
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: -126px;
  }
}

.loading-spinner {
    margin: 32px 0 16px 0;
    animation: 1.4s linear 0s infinite normal none running circular-rotate;
    width: 32px;
    height: 32px;

    .circular-progress {
        display: inline-block;
        width: 32px;
        height: 32px;
        color: #CBDFE9;

        circle {
            stroke: currentcolor;
            stroke-dasharray: 80px 200px;
            stroke-dashoffset: 0;
            animation: 1.4s ease-in-out 0s infinite normal none running circular-dash;
        }
    }
}
