/**
 * BESTPICK 공통 Header / Footer 모바일 스타일
 * 모바일 고정 헤더 + 방문자 수 + 햄버거 메뉴
 */

.bp-mobile-menu-button {
    display: none;
}

@media (max-width: 1199px) {
    html {
        scroll-padding-top: 72px;
    }

    body.bp-mobile-menu-open {
        overflow: hidden;
    }

    .bp-header {
        position: sticky;
        top: 0;
        z-index: 10000;
        width: 100%;
        background: rgba(8, 13, 22, 0.96);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }

    .bp-header .bp-header-inner {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 64px;
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 10px;
    }

    .bp-header-brand {
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 10px;
    }

    .bp-logo {
        display: inline-flex;
        align-items: center;
        flex: 0 1 auto;
        min-width: 0;
        gap: 0;
        white-space: nowrap;
    }

    .bp-logo img {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        object-fit: contain;
    }

    .bp-logo-text {
        overflow: hidden;
        color: #fff;
        font-size: 1rem;
        font-weight: 950;
        letter-spacing: -0.04em;
        text-overflow: ellipsis;
    }

    .bp-today-visitors {
        display: inline-flex;
        align-items: center;
        flex: 0 0 auto;
        gap: 4px;
        min-height: 28px;
        padding: 4px 8px;
        border: 1px solid rgba(56, 189, 248, 0.22);
        border-radius: 999px;
        background: rgba(56, 189, 248, 0.08);
        white-space: nowrap;
    }

    .bp-today-visitors span {
        color: #91a1b8;
        font-size: 0.75rem;
        font-weight: 800;
    }

    .bp-today-visitors strong {
        color: #38bdf8;
        font-size: 0.75rem;
        font-weight: 950;
    }

    .bp-mobile-menu-button {
        position: relative;
        z-index: 2;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        margin: 0;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.055);
        color: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .bp-mobile-menu-button span {
        position: absolute;
        left: 11px;
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: top .2s ease, transform .2s ease, opacity .16s ease;
    }

    .bp-mobile-menu-button span:nth-child(1) { top: 13px; }
    .bp-mobile-menu-button span:nth-child(2) { top: 20px; }
    .bp-mobile-menu-button span:nth-child(3) { top: 27px; }

    .bp-menu-open .bp-mobile-menu-button span:nth-child(1) {
        top: 20px;
        transform: rotate(45deg);
    }

    .bp-menu-open .bp-mobile-menu-button span:nth-child(2) {
        opacity: 0;
    }

    .bp-menu-open .bp-mobile-menu-button span:nth-child(3) {
        top: 20px;
        transform: rotate(-45deg);
    }

    .bp-header .bp-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 12px;
        left: 12px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        max-height: 0;
        padding: 0 10px;
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
        border: 1px solid transparent;
        border-radius: 0 0 18px 18px;
        background: rgba(8, 13, 22, 0.985);
        box-shadow: 0 22px 45px rgba(0, 0, 0, 0.38);
        pointer-events: none;
        transition: max-height .25s ease, padding .25s ease, opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    .bp-header.bp-menu-open .bp-nav {
        max-height: calc(100vh - 84px);
        padding: 12px 10px 14px;
        overflow-y: auto;
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        border-color: rgba(255, 255, 255, 0.08);
        pointer-events: auto;
    }

    .bp-header .bp-nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        padding: 10px 8px;
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.045);
        color: #aebbd0;
        font-size: 0.85rem;
        font-weight: 900;
        text-align: center;
        text-decoration: none;
    }

    .bp-header .bp-nav a.active,
    .bp-header .bp-nav a:hover,
    .bp-header .bp-nav a:focus-visible {
        border-color: rgba(56, 189, 248, 0.38);
        background: rgba(56, 189, 248, 0.14);
        color: #fff;
    }
}

@media (max-width: 420px) {
    .bp-header .bp-header-inner {
        min-height: 60px;
        gap: 6px;
    }

    .bp-header-brand { gap: 6px; }
    .bp-logo { gap: 5px; }

    .bp-logo img {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
    }

    .bp-logo-text { font-size: .88rem; }

    .bp-today-visitors {
        gap: 3px;
        padding: 4px 6px;
    }

    .bp-today-visitors span { font-size: .61rem; }
    .bp-today-visitors strong { font-size: .69rem; }

    .bp-mobile-menu-button {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .bp-mobile-menu-button span { left: 10px; }
}

@media (max-width: 350px) {
    .bp-header .bp-header-inner {
        gap: 4px;
    }

    .bp-header-brand {
        gap: 10px;
    }

    .bp-logo {
        gap: 0;
    }

    .bp-logo img {
        width: 30px;
        height: 30px;
        flex-basis: 24px;
    }

    .bp-logo-text {
        display: inline;
        font-size: 1rem;
        letter-spacing: -0.055em;
    }

    .bp-today-visitors {
        gap: 2px;
        min-height: 25px;
        padding: 3px 5px;
    }

    .bp-today-visitors span {
        display: inline;
        font-size: 0.75rem;
    }

    .bp-today-visitors strong {
        font-size: 0.75rem;
    }

    .bp-mobile-menu-button {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .bp-mobile-menu-button span {
        left: 8px;
        width: 18px;
    }

    .bp-mobile-menu-button span:nth-child(1) {
        top: 11px;
    }

    .bp-mobile-menu-button span:nth-child(2) {
        top: 17px;
    }

    .bp-mobile-menu-button span:nth-child(3) {
        top: 23px;
    }

    .bp-menu-open .bp-mobile-menu-button span:nth-child(1),
    .bp-menu-open .bp-mobile-menu-button span:nth-child(3) {
        top: 17px;
    }
}

@media (min-width: 1200px) {
    .bp-header .bp-nav {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }
}

/* ---------------------------------------------------------
 * Mobile footer order
 * 1. 이용 약관 · 쿠키 정책 · 개인정보 정책
 * 2. 자동 서비스 이용 제한 안내
 * 3. 광고 문의 · Telegram
 * 4. Copyright
 * --------------------------------------------------------- */
@media (max-width: 1199px) {
    .bp-footer .bp-footer-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding-top: 28px;
        padding-bottom: 28px;
        text-align: center;
    }

    .bp-footer-center {
        display: contents;
    }

    .bp-footer-links {
        order: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 7px;
        width: 100%;
    }

    .bp-footer-links a,
    .bp-footer-links span {
        font-size: 0.82rem;
    }

    .bp-footer-desc {
        order: 2;
        width: 100%;
        max-width: 560px;
        margin: 0;
        color: #8795a9;
        font-size: 0.78rem;
        line-height: 1.65;
        word-break: keep-all;
    }

    .bp-footer-desc .pcbr,
    .bp-footer-desc br.pcbr {
        display: none;
    }

    .bp-footer-desc .mbbr,
    .bp-footer-desc br.mbbr {
        display: block;
    }

    .bp-footer-right {
        order: 3;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 0;
    }

    .bp-footer-right > span {
        font-size: 0.82rem;
        font-weight: 800;
    }

    .bp-footer-telegram {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
    }

    .bp-footer-telegram svg {
        width: 20px;
        height: 20px;
    }

    .bp-footer-left {
        order: 4;
        margin: 0;
    }

    .bp-footer-left p {
        margin: 0;
        color: #718096;
        font-size: 0.76rem;
    }
}

@media (max-width: 420px) {
    .bp-footer .bp-footer-inner {
        gap: 12px;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .bp-footer-links {
        gap: 5px;
    }

    .bp-footer-links a,
    .bp-footer-links span {
        font-size: 0.75rem;
    }

    .bp-footer-desc {
        font-size: 0.70rem;
        line-height: 1.6;
    }

    .bp-footer-right > span {
        font-size: 0.85rem;
    }

    .bp-footer-left p {
        font-size: 0.70rem;
    }
    .bp-footer-right a{
        width:30px;
        height:30px;
    }
}

@media (max-width: 1199px) {
    .bp-today-visitors > span,
    .bp-today-visitors > strong {
        display: inline-flex;
        align-items: center;
        height: 1em;
        margin: 0;
        padding: 0;
        line-height: 1;
        vertical-align: middle;
    }
}