/**
 * store-move-popup.css — 스토어 이전 안내 팝업.
 *
 * PC(≥768px): 가운데 뜨는 팝업 / 모바일(≤767px): 아래에서 올라오는 시트.
 * 색·글꼴 토큰(--bmps-*)과 paperlogy-bold @font-face 는 store-chrome.css 것을 쓴다.
 *
 * 전역 규칙과 부딪히는 곳(그래서 !important 나 :hover/:focus 재지정이 있다)
 *  - dist/style.css: a,h2,li,p { font-family: nanumsquare !important }, h2 { padding-bottom: 20px },
 *    ul { margin-left: 5px !important }
 *  - hello-elementor reset: button { color/border #c36 }, button:hover/:focus { background #c36 }, a { color #c36 }
 */

.bmps-move {
    --bmps-move-ink: #1B1B1B;
    --bmps-move-sub: #54595F;
    position: fixed;
    inset: 0;
    /* 떠 있는 장바구니 버튼(.xoo-cp-basket 999997)과 채널톡(#ch-plugin 10000000)보다 위 —
       낮으면 모바일에서 두 버튼이 팝업 아래쪽 버튼을 가린다. */
    z-index: 10000100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--bmps-move-ink);
    -webkit-font-smoothing: antialiased;
}

.bmps-move[hidden] {
    display: none;
}

body.bmps-move-open {
    overflow: hidden;
}

.bmps-move__dim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    animation: bmps-move-fade 0.2s ease-out both;
}

.bmps-move__dialog {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 2px solid var(--bmps-move-ink);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    outline: 0;
    animation: bmps-move-pop 0.24s ease-out both;
}

/* ----------------------------------- 머리 ---------------------------------- */

.bmps-move__head {
    position: relative;
    flex: none;
    overflow: hidden;
    padding: 30px 36px 28px;
    background: var(--bmps-yellow, #FCD11E);
    border-bottom: 2px solid var(--bmps-move-ink);
}

.bmps-move__head-text {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 330px;
}

.bmps-move__pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.bmps-move__pill {
    font-family: var(--bmps-menu-font);
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.bmps-move__pill[hidden] {
    display: none;
}

.bmps-move__pill--dark {
    background: var(--bmps-move-ink);
    color: var(--bmps-yellow, #FCD11E);
}

.bmps-move__pill--light {
    padding: 4px 12px;
    background: #FFFFFF;
    border: 2px solid var(--bmps-move-ink);
    color: var(--bmps-move-ink);
}

.bmps-move .bmps-move__title {
    margin: 0;
    padding: 0;
    font-family: var(--bmps-menu-font) !important;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.01em;
    color: var(--bmps-move-ink);
    word-break: keep-all;
}

.bmps-move .bmps-move__date {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    margin: 0;
    color: var(--bmps-move-ink);
}

.bmps-move__date-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
}

.bmps-move__date-value {
    font-family: var(--bmps-menu-font);
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
}

.bmps-move .bmps-move__mascot {
    position: absolute;
    right: 46px;
    bottom: -70px;
    width: 138px;
    max-width: none;
    height: auto;
    pointer-events: none;
}

.bmps-move .bmps-move__x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--bmps-move-ink);
    cursor: pointer;
    transition: background-color 0.15s;
}

.bmps-move .bmps-move__x:hover,
.bmps-move .bmps-move__x:focus {
    background: rgba(0, 0, 0, 0.08);
    color: var(--bmps-move-ink);
}

/* ----------------------------------- 본문 ---------------------------------- */

.bmps-move__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 26px 36px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bmps-move .bmps-move__lead {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #333333;
    word-break: keep-all;
    text-wrap: pretty;
}

.bmps-move__dests {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.bmps-move .bmps-move__dest {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    background: #FFFFFF;
    border: 2px solid var(--bmps-move-ink);
    border-radius: 18px;
    color: var(--bmps-move-ink);
    text-decoration: none;
    transition: background-color 0.15s, transform 0.15s;
}

.bmps-move .bmps-move__dest:hover,
.bmps-move .bmps-move__dest:focus {
    background: #FFFBEA;
    color: var(--bmps-move-ink);
}

.bmps-move .bmps-move__dest:active {
    transform: translateY(1px);
}

.bmps-move__dest-visual {
    height: 48px;
    display: flex;
    align-items: center;
}

.bmps-move .bmps-move__dest-visual img {
    display: block;
    width: auto;
    max-width: none;
}

.bmps-move .bmps-move__dest-visual--faces img {
    height: 44px;
}

.bmps-move .bmps-move__dest-visual--faces img + img {
    height: 40px;
    margin-left: -10px;
}

.bmps-move .bmps-move__dest-visual--logo img {
    height: 48px;
    margin-left: -8px;
}

.bmps-move__dest-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.bmps-move__tag {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 18px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bmps-yellow, #FCD11E);
    color: var(--bmps-move-ink);
}

.bmps-move__dest-name {
    font-family: var(--bmps-menu-font);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    word-break: keep-all;
}

.bmps-move__dest-url {
    font-size: 13.5px;
    line-height: 20px;
    color: var(--bmps-move-sub);
    word-break: break-all;
}

.bmps-move__go {
    margin-top: 4px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    background: var(--bmps-move-ink);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
}

.bmps-move__go svg {
    flex: none;
}

.bmps-move .bmps-move__notes {
    list-style: none;
    margin: 0 !important;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-radius: 14px;
    background: #F6F5F1;
}

.bmps-move .bmps-move__notes li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 13.5px;
    line-height: 22px;
    color: #3D4147;
    word-break: keep-all;
}

.bmps-move .bmps-move__notes svg {
    flex: none;
    margin-top: 2px;
    color: var(--bmps-move-ink);
}

/* ----------------------------------- 바닥 ---------------------------------- */

.bmps-move__foot {
    flex: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 2px solid var(--bmps-move-ink);
}

.bmps-move .bmps-move__foot-btn {
    height: 56px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--bmps-move-sub);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s;
}

.bmps-move .bmps-move__foot-btn--day {
    border-right: 2px solid var(--bmps-move-ink);
}

.bmps-move .bmps-move__foot-btn--close {
    font-weight: 700;
    color: var(--bmps-move-ink);
}

.bmps-move .bmps-move__foot-btn:hover,
.bmps-move .bmps-move__foot-btn:focus {
    background: #F6F5F1;
    color: var(--bmps-move-ink);
}

/* 키보드로 옮겨 다닐 때만 테두리를 보인다 (hello-elementor 의 button:focus outline 을 덮는다) */
.bmps-move .bmps-move__x:focus,
.bmps-move .bmps-move__dest:focus,
.bmps-move .bmps-move__foot-btn:focus {
    outline: 0;
}

.bmps-move .bmps-move__x:focus-visible,
.bmps-move .bmps-move__dest:focus-visible {
    outline: 3px solid #1D5A96;
    outline-offset: 2px;
}

.bmps-move .bmps-move__foot-btn:focus-visible {
    outline: 3px solid #1D5A96;
    outline-offset: -3px;
}

/* ---------------------------------- 모바일 --------------------------------- */

@media (max-width: 767px) {
    .bmps-move {
        align-items: flex-end;
        padding: 24px 0 0;
    }

    .bmps-move__dialog {
        max-width: none;
        border-width: 2px 0 0;
        border-radius: 24px 24px 0 0;
        box-shadow: none;
        animation-name: bmps-move-sheet;
    }

    .bmps-move__head {
        padding: 22px 20px;
    }

    .bmps-move__head-text {
        gap: 12px;
        max-width: calc(100% - 118px);
    }

    .bmps-move__pills {
        gap: 6px;
    }

    .bmps-move__pill {
        font-size: 12px;
        padding: 5px 10px;
    }

    .bmps-move__pill--light {
        padding: 3px 10px;
    }

    .bmps-move .bmps-move__title {
        font-size: 26px;
        line-height: 1.3;
    }

    .bmps-move .bmps-move__date {
        flex-direction: column;
        gap: 2px;
    }

    .bmps-move__date-label {
        font-size: 12.5px;
        line-height: 18px;
    }

    .bmps-move__date-value {
        line-height: 26px;
    }

    .bmps-move .bmps-move__mascot {
        right: 18px;
        bottom: -52px;
        width: 104px;
    }

    .bmps-move .bmps-move__x {
        top: 6px;
        right: 6px;
    }

    .bmps-move__body {
        padding: 20px;
        gap: 14px;
    }

    .bmps-move .bmps-move__lead {
        font-size: 14.5px;
    }

    .bmps-move__dests {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .bmps-move .bmps-move__dest {
        flex-direction: row;
        align-items: center;
        padding: 14px;
        border-radius: 16px;
    }

    .bmps-move__dest-visual {
        flex: none;
        width: 72px;
        justify-content: center;
    }

    .bmps-move .bmps-move__dest-visual--faces img {
        height: 34px;
    }

    .bmps-move .bmps-move__dest-visual--faces img + img {
        height: 31px;
        margin-left: -18px;
    }

    .bmps-move .bmps-move__dest-visual--logo img {
        height: 43px;
        margin-left: 0;
    }

    .bmps-move__dest-text {
        flex: 1;
        gap: 3px;
    }

    .bmps-move__tag {
        font-size: 11.5px;
        line-height: 16px;
        padding: 3px 9px;
    }

    .bmps-move__dest-name {
        font-size: 18px;
        line-height: 24px;
    }

    .bmps-move__dest-url {
        font-size: 12.5px;
        line-height: 18px;
    }

    .bmps-move__go {
        flex: none;
        width: 40px;
        height: 40px;
        margin-top: 0;
    }

    /* 화면에서는 화살표만 보이고, 글자는 화면낭독기용으로 남긴다 */
    .bmps-move__go-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .bmps-move .bmps-move__notes {
        padding: 12px 14px;
    }

    .bmps-move .bmps-move__notes li {
        font-size: 13px;
        line-height: 21px;
    }

    .bmps-move__foot {
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #FFFFFF;
    }
}

/* 아주 좁은 화면: 삼색이와 카드 안 그림을 줄여 제목·사이트 이름이 한 줄에 들어가게 한다 */
@media (max-width: 359px) {
    .bmps-move__head-text {
        max-width: calc(100% - 92px);
    }

    .bmps-move .bmps-move__title {
        font-size: 23px;
    }

    .bmps-move .bmps-move__mascot {
        right: 10px;
        bottom: -40px;
        width: 84px;
    }

    .bmps-move .bmps-move__dest {
        gap: 8px;
        padding: 12px;
    }

    .bmps-move__dest-visual {
        width: 58px;
    }

    .bmps-move .bmps-move__dest-visual--faces img {
        height: 28px;
    }

    .bmps-move .bmps-move__dest-visual--faces img + img {
        height: 26px;
        margin-left: -16px;
    }

    .bmps-move .bmps-move__dest-visual--logo img {
        height: 35px;
    }

    .bmps-move__dest-name {
        font-size: 17px;
    }

    .bmps-move__go {
        width: 36px;
        height: 36px;
    }
}

@keyframes bmps-move-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bmps-move-pop {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

@keyframes bmps-move-sheet {
    from { transform: translateY(100%); }
    to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bmps-move__dim,
    .bmps-move__dialog {
        animation: none;
    }
}

@media print {
    .bmps-move {
        display: none !important;
    }
}
