/* =========================================
   RESET
========================================= */

* {
    box-sizing: border-box;

    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}


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

    margin: 0;
    padding: 0;

    overflow: hidden;

    background: #ffffff;

    overscroll-behavior: none;

    touch-action: manipulation;
}


body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
}


/* =========================================
   APP CONTAINER
========================================= */

#app {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100dvh;

    min-height: 100dvh;

    overflow: hidden;

    background: #ffffff;
}


/* =========================================
   IFRAME
========================================= */

#htfApp {
    display: block;

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    min-width: 100%;
    min-height: 100%;

    border: 0;
    outline: none;

    background: #ffffff;
}


/* =========================================
   INSTALL PROMPT
========================================= */

.install-prompt {

    position: fixed;

    left: 16px;
    right: 16px;
    bottom: 16px;

    z-index: 999999;

    width: auto;
    max-width: 480px;

    margin: 0 auto;

    padding: 19px;

    border-radius: 24px;

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

    border:
        1px solid rgba(0, 0, 0, 0.07);

    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.20),
        0 8px 25px rgba(0, 0, 0, 0.08);

    backdrop-filter:
        blur(25px);

    -webkit-backdrop-filter:
        blur(25px);

    display: none;

    animation:
        promptIn
        0.45s
        cubic-bezier(.22, 1, .36, 1)
        forwards;
}


/* =========================================
   HEADER
========================================= */

.install-header {

    position: relative;

    display: flex;

    align-items: center;

    gap: 14px;
}


.install-icon-wrap {

    flex: 0 0 58px;

    width: 58px;
    height: 58px;

    padding: 2px;

    border-radius: 17px;

    background: #111111;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15);
}


.install-icon {

    display: block;

    width: 100%;
    height: 100%;

    border-radius: 15px;

    object-fit: cover;

    background: #ffffff;
}


/* =========================================
   COPY
========================================= */

.install-copy {

    min-width: 0;

    padding-right: 25px;
}


.install-label {

    display: block;

    margin-bottom: 4px;

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.7px;

    color: #888888;
}


.install-copy h2 {

    margin: 0;

    color: #111111;

    font-size: 19px;

    line-height: 1.2;

    font-weight: 800;

    letter-spacing: -0.45px;
}


.install-copy p {

    margin: 5px 0 0;

    color: #6d6d6d;

    font-size: 12px;

    line-height: 1.45;
}


/* =========================================
   CLOSE
========================================= */

.install-close {

    position: absolute;

    top: -4px;
    right: -4px;

    width: 29px;
    height: 29px;

    border: 0;

    border-radius: 50%;

    background: #eeeeee;

    color: #555555;

    font-size: 20px;

    line-height: 25px;

    cursor: pointer;

    transition:
        transform .2s ease,
        background .2s ease;
}


.install-close:hover {

    background: #e2e2e2;

    transform:
        rotate(90deg);
}


/* =========================================
   BENEFITS
========================================= */

.install-benefits {

    display: flex;

    align-items: center;

    gap: 6px;

    margin-top: 17px;
}


.install-benefits span {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding:
        7px 10px;

    border-radius: 9px;

    background: #f1f2f4;

    color: #555555;

    font-size: 10px;

    font-weight: 650;
}


.install-benefits b {

    color: #111111;

    font-size: 11px;
}


/* =========================================
   ACTIONS
========================================= */

.install-actions {

    display: flex;

    gap: 9px;

    margin-top: 16px;
}


.install-actions button {

    height: 46px;

    border: 0;

    border-radius: 13px;

    font-family: inherit;

    font-size: 13px;

    font-weight: 750;

    cursor: pointer;

    transition:
        transform .15s ease,
        background .2s ease,
        box-shadow .2s ease;
}


.install-actions button:active {

    transform:
        scale(.97);
}


/* =========================================
   LATER
========================================= */

.later-btn {

    flex: .7;

    background: #eeeeef;

    color: #444444;
}


.later-btn:hover {

    background: #e3e3e4;
}


/* =========================================
   INSTALL
========================================= */

.install-btn {

    flex: 1.3;

    display: flex;

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

    gap: 12px;

    background: #111111;

    color: #ffffff;

    box-shadow:
        0 9px 25px rgba(0, 0, 0, .18);
}


.install-btn:hover {

    background: #202020;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, .24);
}


.install-arrow {

    font-size: 18px;

    transition:
        transform .2s ease;
}


.install-btn:hover
.install-arrow {

    transform:
        translateX(4px);
}


/* =========================================
   iOS PROMPT
========================================= */

.ios-prompt {

    position: fixed;

    left: 16px;
    right: 16px;
    bottom: 16px;

    z-index: 999999;

    display: none;

    align-items: center;

    gap: 12px;

    padding: 15px;

    border-radius: 20px;

    background:
        rgba(255,255,255,.97);

    border:
        1px solid rgba(0,0,0,.07);

    box-shadow:
        0 20px 60px rgba(0,0,0,.18);

    backdrop-filter:
        blur(20px);

    -webkit-backdrop-filter:
        blur(20px);
}


.ios-icon img {

    width: 45px;
    height: 45px;

    border-radius: 12px;

    display: block;
}


.ios-copy {

    flex: 1;
}


.ios-copy strong {

    display: block;

    margin-bottom: 3px;

    font-size: 13px;

    color: #111111;
}


.ios-copy p {

    margin: 0;

    font-size: 11px;

    line-height: 1.45;

    color: #666666;
}


.ios-copy span {

    font-size: 15px;

    font-weight: 700;

    color: #111111;
}


.ios-prompt button {

    width: 28px;
    height: 28px;

    border: 0;

    border-radius: 50%;

    background: #eeeeee;

    color: #555555;

    font-size: 18px;

    cursor: pointer;
}


/* =========================================
   ANIMATION
========================================= */

@keyframes promptIn {

    from {

        opacity: 0;

        transform:
            translateY(35px)
            scale(.97);
    }

    to {

        opacity: 1;

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


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

@media (max-width: 480px) {

    .install-prompt {

        left:
            max(12px, env(safe-area-inset-left));

        right:
            max(12px, env(safe-area-inset-right));

        bottom:
            max(12px, env(safe-area-inset-bottom));

        padding: 17px;

        border-radius: 21px;
    }


    .install-icon-wrap {

        width: 52px;
        height: 52px;

        flex-basis: 52px;

        border-radius: 15px;
    }


    .install-icon {

        border-radius: 13px;
    }


    .install-copy h2 {

        font-size: 17px;
    }


    .install-copy p {

        font-size: 11px;
    }


    .install-benefits span {

        padding:
            6px 8px;

        font-size: 9px;
    }


    .install-actions button {

        height: 44px;
    }
}


/* =========================================
   VERY SMALL PHONES
========================================= */

@media (max-width: 360px) {

    .install-benefits span:nth-child(3) {

        display: none;
    }


    .install-copy h2 {

        font-size: 16px;
    }
}


/* =========================================
   STANDALONE PWA
========================================= */

@media (display-mode: standalone) {

    .install-prompt,
    .ios-prompt {

        display: none !important;
    }
}


/* =========================================
   REDUCE MOTION
========================================= */

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

    .install-prompt {

        animation: none;
    }

    * {

        scroll-behavior: auto !important;
    }
}