/* MostPlay Partners - consolidated responsive styles */

/* Tablet */
@media (max-width: 991px) {
    .mp-container {
        width: min(100% - 32px, 100%);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .mp-container {
        width: calc(100% - 24px);
    }

    .mp-btn {
        padding: 12px 18px;
    }

    .mostplay-desktop-header {
        display: none !important;
    }

    .mostplay-mobile-header {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: linear-gradient(110deg, #0866d7 0%, #064cba 55%, #07358e 100%) !important;
        color: #ffffff;
    }

    .mostplay-mobile-header .mostplay-mobile-header-inner {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 70px;
        padding: 12px 10px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Hamburger: first, at the left edge */
    .mostplay-mobile-header .mostplay-mobile-toggle {
        order: 1 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto !important;
        width: 28px;
        height: 36px;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 27px;
        cursor: pointer;
    }

    /* Logo: second, immediately beside hamburger */
    .mostplay-mobile-header .mostplay-mobile-logo {
        order: 2 !important;
        display: inline-flex !important;
        align-items: center;
        flex: 0 0 115px !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mostplay-mobile-header .mostplay-mobile-logo img {
        display: block !important;
        width: 115px !important;
        max-width: 115px !important;
        max-height: 48px;
        height: auto !important;
        object-fit: contain !important;
        image-rendering: auto;
    }

    /* Right actions: Sign Up + country selector */
    .mostplay-mobile-header .mostplay-mobile-header-actions {
        order: 3 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 7px !important;
        flex: 0 0 auto !important;
        margin: 0 0 0 auto !important;
        padding: 0 !important;
    }

    /* Retain legacy Login styling if this class is used elsewhere */
    .mostplay-mobile-login {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 35px;
        padding: 0 10px;
        border: 1px solid rgba(255,255,255,0.8);
        border-radius: 7px;
        color: #ffffff;
        background: transparent;
        text-decoration: none;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .mostplay-mobile-signup {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 35px;
        padding: 0 10px;
        background: #ffdb00;
        border: 1px solid #ffdb00;
        border-radius: 7px;
        color: #071b48;
        text-decoration: none;
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        box-sizing: border-box;
        flex-shrink: 0;
    }

    .mostplay-mobile-header .mostplay-header-language {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: auto;
        min-width: 78px;
        height: 35px;
        padding: 0 7px;
        border: 1px solid rgba(255,255,255,0.55);
        border-radius: 7px;
        box-sizing: border-box;
        white-space: nowrap;
        flex-shrink: 0 !important;
    }

    .mostplay-mobile-header .mostplay-country-flag {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 19px;
        width: 19px;
        height: 19px;
        min-width: 19px;
        background: #163e90;
        border-radius: 50%;
        overflow: hidden;
        line-height: 0;
    }

    .mostplay-mobile-header .mostplay-flag-circle {
        display: block;
        width: 10px;
        height: 10px;
        flex-shrink: 0;
        background: #f42a41;
        border-radius: 50%;
    }

    .mostplay-mobile-header .mostplay-country-code {
        display: flex;
        align-items: center;
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
        color: #ffffff;
    }

    .mostplay-mobile-header .mostplay-country-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 12px;
        width: 12px;
        height: 12px;
        color: #ffffff;
        line-height: 1;
    }

    .mostplay-mobile-header .mostplay-country-arrow svg {
        display: block;
        width: 12px;
        height: 12px;
    }

    /* Expanded mobile menu */
    .mostplay-mobile-navigation {
        background: #0646aa !important;
        padding: 12px 20px 22px;
    }

    .mostplay-mobile-navigation[hidden] {
        display: none !important;
    }

    .mostplay-mobile-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mostplay-mobile-nav-list > li > a {
        display: block;
        padding: 13px 0;
        color: #ffffff;
        text-decoration: none;
    }

    .mostplay-mobile-header .mostplay-mobile-login {
        flex-shrink: 0 !important;
    }
}

/* Small phones: retain final effective overrides */
@media (max-width: 360px) {
    .mostplay-mobile-header .mostplay-mobile-header-actions {
        gap: 7px !important;
    }

    .mostplay-mobile-login {
        padding: 0 7px;
    }

    .mostplay-mobile-signup {
        padding: 0 7px;
        font-size: 11px;
    }

    .mostplay-mobile-header .mostplay-header-language {
        min-width: 73px;
        padding: 0 5px;
    }
}


/* ==========================================
   MOBILE COUNTRY FLAG IMAGE FIX
   ========================================== */

@media (max-width: 767px) {

    .mostplay-mobile-header .mostplay-country-flag {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        min-width: 24px;
        border-radius: 50%;
        overflow: hidden;
        flex-shrink: 0;
        background: transparent;
    }

    .mostplay-mobile-header .mostplay-header-flag-image {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        max-width: none;
        max-height: none;
    }

    .mostplay-mobile-header .mostplay-country-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

}
