
/*
 * GATOS mobile Balance + Wallet header patch
 * Loaded after the existing site styles.
 */

@media screen and (max-width: 820px) {
    html,
    body {
        min-width: 320px;
    }

    html body .wrapper .page > .header,
    html body .header,
    html body .header.sticky {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        left: 0 !important;

        width: 100% !important;
        height: 126px !important;
        min-height: 126px !important;
        max-height: 126px !important;

        padding: 0 14px !important;
        overflow: visible !important;

        background:
            linear-gradient(180deg, #17140e 0, #17140e 61px, #111a2a 61px, #111a2a 100%)
            !important;
        background-image:
            linear-gradient(180deg, #17140e 0, #17140e 61px, #111a2a 61px, #111a2a 100%)
            !important;

        border-bottom: 1px solid rgba(255, 255, 255, .055) !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, .28) !important;
        z-index: 1040 !important;
    }

    html body .header > .p-nav {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 126px !important;
        min-height: 126px !important;
        max-height: 126px !important;
    }

    html body .header .header-inner {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        position: relative !important;

        width: 100% !important;
        max-width: none !important;
        height: 126px !important;
        min-height: 126px !important;
        max-height: 126px !important;

        padding: 0 !important;
        overflow: visible !important;
    }

    html body .header .header-block {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 61px !important;
        min-height: 61px !important;
        z-index: 2 !important;
    }

    /*
     * Reposition the existing logged-in balance controls as a second
     * full-width row instead of letting them overflow outside the header.
     */
    html body .header .deposit-wrap {
        display: flex !important;
        align-items: stretch !important;
        gap: 8px !important;

        position: absolute !important;
        top: 69px !important;
        right: 0 !important;
        left: 0 !important;

        width: 100% !important;
        height: 48px !important;
        margin: 0 !important;
        padding: 0 !important;

        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        z-index: 10 !important;
    }

    html body .header .deposit-wrap .dropdown {
        display: block !important;
        flex: 0 0 48px !important;
        position: relative !important;
        width: 48px !important;
        height: 48px !important;
        margin: 0 !important;
    }

    html body .header .deposit-wrap .dropdown > .btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        width: 48px !important;
        min-width: 48px !important;
        height: 48px !important;
        min-height: 48px !important;

        padding: 0 16px 0 8px !important;
        border: 1px solid rgba(255, 255, 255, .08) !important;
        border-radius: 11px !important;

        background: linear-gradient(180deg, #222d43, #1a2438) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035) !important;
    }

    html body .header .deposit-wrap .dropdown > .btn .selected svg {
        width: 16px !important;
        height: 16px !important;
    }

    html body .header .deposit-wrap .dropdown > .btn .opener {
        right: 4px !important;
        width: 11px !important;
        height: 11px !important;
    }

    html body .header .deposit-wrap .dropdown-menu {
        top: 52px !important;
        right: auto !important;
        left: 0 !important;
        min-width: 230px !important;
        margin: 0 !important;
        border: 1px solid rgba(255, 255, 255, .08) !important;
        border-radius: 11px !important;
        background: #1c2639 !important;
        box-shadow: 0 18px 40px rgba(0, 0, 0, .42) !important;
    }

    html body .header .deposit-block {
        display: flex !important;
        align-items: stretch !important;
        flex: 1 1 auto !important;
        gap: 8px !important;

        width: auto !important;
        height: 48px !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;

        visibility: visible !important;
        opacity: 1 !important;
    }

    html body .header .deposit-block .select-field {
        display: flex !important;
        align-items: center !important;
        flex: 1 1 auto !important;

        width: auto !important;
        min-width: 0 !important;
        height: 48px !important;
        padding: 0 14px !important;

        border: 1px solid rgba(255, 255, 255, .07) !important;
        border-radius: 11px !important;
        background: linear-gradient(180deg, #222d43, #1a2438) !important;

        color: #f5f7fc !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        line-height: 48px !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035) !important;
    }

    html body .header .deposit-block .select-field::before {
        content: "Balance";
        flex: 0 0 auto;
        margin-right: 9px;
        color: #8490a8;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        text-transform: uppercase;
    }

    html body .header .deposit-block #balance {
        display: inline-block !important;
        overflow: hidden !important;
        max-width: 100% !important;
        color: #ffffff !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    html body .header .deposit-block #wallet,
    html body .header .deposit-block .btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 112px !important;

        width: 112px !important;
        min-width: 112px !important;
        height: 48px !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0 16px !important;

        border: 0 !important;
        border-radius: 11px !important;

        background: linear-gradient(135deg, #6657ff, #9059ff) !important;
        color: #ffffff !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        line-height: 48px !important;
        text-align: center !important;

        box-shadow: 0 10px 24px rgba(98, 82, 255, .28) !important;
    }

    html body .header .deposit-block #wallet:active,
    html body .header .deposit-block .btn:active {
        transform: translateY(1px) !important;
    }

    /*
     * The header is now two rows tall, so push page content beneath it.
     */
    html body .wrapper .main-content {
        padding-top: 136px !important;
    }
}

@media screen and (max-width: 380px) {
    html body .header {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    html body .header .deposit-block #wallet,
    html body .header .deposit-block .btn {
        flex-basis: 96px !important;
        width: 96px !important;
        min-width: 96px !important;
        padding-right: 10px !important;
        padding-left: 10px !important;
        font-size: 13px !important;
    }

    html body .header .deposit-block .select-field {
        padding-right: 10px !important;
        padding-left: 10px !important;
        font-size: 14px !important;
    }

    html body .header .deposit-block .select-field::before {
        display: none !important;
    }
}
