/* ============================================================
   배때지 V2 메인 · 히어로 "단일 토스트" (오른쪽 아래 1개씩)  — .v2ha- 스코프
   - 히어로 공통 overlay 레이어(슬라이드 밖) → 슬라이드 전환에도 위치 고정
   - 화면에는 항상 토스트 1개만. 등장(우하단)→유지→위로 사라짐→다음 1개.
   - 실측 회피: 히어로 제목/부제는 하단-좌측 밴드, 슬라이드 점은 하단-중앙.
       · PC/태블릿 : 오른쪽 아래(제목=좌측이라 미겹침, 점=중앙보다 위)
       · 모바일    : 세로형이라 하단이 제목+점으로 가득 → 오른쪽 "위" 안전영역 사용
   - 다크 반투명 + blur, 14~16 radius, 얇은 테두리, 과한 그림자 금지
   ============================================================ */

/* 오버레이 기준 컨텍스트(다른 요소 영향 없음) */
.v2-home-hero-wrap { position: relative; }

/* ---- 토스트 레이어(코너 앵커) : 항상 1개만 담는다 ---- */
.v2ha-toast-layer {
    position: absolute;
    z-index: 6;                 /* 히어로 본문(z1)·점(z2) 위 */
    box-sizing: border-box;
    pointer-events: none;       /* 링크(상품)만 개별적으로 클릭 허용 */

    /* 모바일 기본: 히어로 오른쪽 "위" 끝선에 맞춤(하단 제목/점 회피) */
    top: 0;
    right: 0;
    left: auto;
    bottom: auto;
    width: min(290px, calc(100% - 16px));
    padding: 8px 10px;          /* 끝선 기준 최소 안전여백(노치/라운드 대응) */
}
.v2ha-toast-layer * { box-sizing: border-box; }

/* ---- 토스트 본체(애니메이션 대상: transform/opacity 만) ---- */
.v2ha-toast {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;              /* 배경 제거 — 이모지+텍스트만 */
    color: #fff;
    box-shadow: none;
    /* 배경이 없으므로 히어로 이미지 위에서도 읽히도록 그림자만 */
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .5);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;

    /* 등장 초기상태 */
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition:
        opacity var(--v2ha-enter, 350ms) ease-out,
        transform var(--v2ha-enter, 350ms) ease-out;
    will-change: opacity, transform;
}
a.v2ha-toast { cursor: pointer; }

.v2ha-toast.is-in {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}
.v2ha-toast.is-out {
    opacity: 0;
    transform: translate3d(0, -22px, 0);
    transition:
        opacity var(--v2ha-exit, 400ms) ease-in,
        transform var(--v2ha-exit, 400ms) ease-in;
}

/* 배경 제거 상태 유지 — blur/반투명 패널 미사용 */

/* ---- 좌측 상품 썸네일 박스: 배경 없이 이모지+텍스트만 노출 → 숨김 ---- */
.v2ha-toast-media { display: none !important; }

/* ---- 우측 본문 ---- */
.v2ha-toast-body {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;      /* 오른쪽 끝선 정렬 */
    text-align: right;
    gap: 2px;
}
.v2ha-toast-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;  /* 이모지+라벨 오른쪽 정렬 */
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, .92);
    line-height: 1.1;
}
.v2ha-toast-head .v2ha-toast-ico { font-size: 15px; line-height: 1; }
.v2ha-toast-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    /* 상품명/이름 1줄 말줄임 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.v2ha-toast-note {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, .8);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.v2ha-toast-note time { font-variant-numeric: tabular-nums; font-weight: 700; }

/* 주문 토스트의 초록 라이브 점(연출) */
.v2ha-toast[data-type="order"] .v2ha-toast-head .v2ha-toast-ico::after { content: none; }

/* 키보드 포커스 */
.v2ha-toast:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ===================== 태블릿 (601~1023) ===================== */
@media (min-width: 601px) and (max-width: 1023px) {
    .v2ha-toast-layer {
        top: auto;
        bottom: 0;              /* 히어로 오른쪽 하단 끝선 */
        right: 0;
        left: auto;
        width: min(310px, calc(100% - 20px));
        padding: 10px 12px;
    }
}

/* ===================== PC (≥1024) ===================== */
@media (min-width: 1024px) {
    .v2ha-toast-layer {
        top: auto;
        bottom: 0;              /* 히어로 오른쪽 하단 끝선 */
        right: 0;
        left: auto;
        width: 340px;
        padding: 12px 14px;
    }
    .v2ha-toast { min-height: 0; padding: 0; }
    .v2ha-toast-title { font-size: 14px; }
}

/* ===================== 모바일 표시 OFF(관리자 설정) ===================== */
@media (max-width: 600px) {
    .v2ha-toast-layer--nomobile { display: none !important; }
}

/* ===================== 모션 최소화 : 위아래 이동 없이 fade 만 ===================== */
@media (prefers-reduced-motion: reduce) {
    .v2ha-toast {
        transform: none !important;
        transition: opacity 200ms linear !important;
    }
    .v2ha-toast.is-in { transform: none !important; }
    .v2ha-toast.is-out { transform: none !important; }
}
