/* 공통: 비한국 비로그인 사용자에 대해 user-input-area 초기 비노출 */
.non-kor-guest .user-input-area {
    display: none !important;
}

/* 비로그인 해외접속 사용자인 경우 해외결제 버튼 영역 기본값 */
.non-kor-guest .submit_for_oversea {
    display: block !important;
}

/* 비로그인 해외접속 사용자가 아닌 경우 해외결제 버튼 영역 기본값 */
.submit_for_oversea {
    display: none !important;
}

/* 해외결제 버튼 영역 토글용 강제 클래스 */
.submit_for_oversea.wf-show {
    display: block !important;
}
.submit_for_oversea.wf-hide {
    display: none !important;
}

/* 해외 사용자용 입력 영역은 항상 노출 */
.user-input-area-for-oversea {
    display: block !important;
}

/* 토글 시 노출 강제 클래스 */
.user-input-area.wf-show {
    display: block !important;
}

/* 토글 시 숨김 강제 클래스 */
.user-input-area.wf-hide {
    display: none !important;
}

/* 로그인한 해외접속자 전용 플로팅 버튼 */
/* 플로팅 버튼: 기본 비노출, 로그인 해외사용자에서 노출 */
.dk-floating-button {
    display: none !important;
}

.logged-oversea-user .dk-floating-button {
    display: inline-flex !important;
    position: fixed;
    right: 20px;
    bottom: 68px; /* PC: goal1 ./global1-pc.png 기준 하단 여유 */
    z-index: 9999;

    background: #FDFF85; /* sub-yellow-h */
    color: #000;
    border: 1px solid #000;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 2px 2px 0 0 rgba(0,0,0,1);

    align-items: center;
    gap: 8px;

    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logged-oversea-user .dk-floating-button:hover {
    transform: translateY(-1px);
    box-shadow: 2px 3px 0 0 rgba(0,0,0,1);
}

.dk-floating-button__icon {
    width: 16px;
    height: 16px;
}

.dk-floating-button__label {
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    font-weight: 700;
    font-size: 10px;
    line-height: 15px;
    color: #000;
}

/* 토글 숨김 호환성 유지 */
.dk-floating-button.hidden {
    display: none !important;
}

/* PC에서는 풀 라벨 노출, 모바일에서는 짧은 라벨 */
.dk-floating-button__label--pc { display: inline; }
.dk-floating-button__label--mobile { display: none; }

/* Mobile 대응: 위치/사이즈/텍스트 변경 */
@media (max-width: 768px) {
    .logged-oversea-user .dk-floating-button {
        right: 0; /* 우측 밀착 */
        bottom: 100px; /* 제플린 좌표 기반 하단 거리 근사치 */
        width: 58px; /* Frame-3513 (58x54) */
        height: 54px;
        padding: 9px 0 0 0; /* 아이콘 top ≈ 9px */
        border-radius: 8px 0 0 8px; /* 좌상/좌하 라운딩 */
        flex-direction: column; /* 아이콘 위, 텍스트 아래 */
        align-items: center;
        justify-content: flex-start;
        gap: 0; /* 아이콘 20px + top 9px => label 바로 아래 */
    }

    .dk-floating-button__icon {
        width: 20px;
        height: 20px;
    }

    .dk-floating-button__label { text-align: center; width: 100%; margin: 0; }
    .dk-floating-button__label--pc { display: none; }
    .dk-floating-button__label--mobile { display: inline; }
}

/* DK 서비스 안내 컨테이너 */
.dk-service-notice {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 0;
    background-color: transparent;
}

/* DK 안내 상단 영역 */
.dk-notice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    column-gap: 16px;
    row-gap: 8px;
    flex-wrap: nowrap;
}

/* DK 안내 텍스트 */
.dk-notice-text {
    flex: 1 1 calc(100% - 112px);
    min-width: 0;
    margin: 0;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.56px;
    line-height: 21px;
    color: #242424;
    text-align: left;
}

/* How to use pill */
.dk-how-to-use {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 33px;
    padding: 0 12px;
    border-radius: 99px;
    background-color: #F5F6F8;
    color: #52525B;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.56px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dk-how-to-use:hover {
    background-color: #ECEFF3;
    color: #3E3E44;
}

.dk-how-to-use:focus-visible {
    outline: 2px solid rgba(82, 82, 91, 0.4);
    outline-offset: 2px;
}

/* DK buy 버튼 */
.dk-buy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 70px;
    padding: 24px;
    border: none;
    border-radius: 0;
    background-color: #F26656;
    color: #FFFFFF;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.45px;
    line-height: 22.5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dk-buy-button:hover {
    background-color: #E35B4F;
}

.dk-buy-button:focus-visible {
    outline: 2px solid rgba(36, 36, 36, 0.2);
    outline-offset: 2px;
}

/* Ignore link */
.dk-ignore-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #A1A3AA;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.56px;
    text-decoration: none;
    cursor: pointer;
}

.dk-ignore-link:hover {
    color: #8C8F95;
}

.dk-ignore-link:focus-visible {
    outline: 2px solid rgba(161, 163, 170, 0.4);
    outline-offset: 2px;
}

.dk-ignore-link .dk-icon-x {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.dk-ignore-link .dk-icon-x svg {
    width: 100%;
    height: 100%;
}

.dk-ignore-link {
    align-self: center;
}

@media (max-width: 768px) {
    .dk-buy-button {
        min-height: 50px;
        padding: 16px;
        border-radius: 10px;
    }

    .dk-notice-header {
        align-items: flex-start;
        column-gap: 12px;
    }

    .dk-notice-text {
        flex: 1 1 calc(100% - 108px);
        min-width: 0;
    }
}

/* DK loading overlay */
.dk-loading-layer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.dk-loading-layer__dimmer {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.dk-loading-layer__card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 374px;
    display: flex;
    justify-content: center;
}

.dk-loading-layer__inner {
    width: 100%;
    max-width: 320px;
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 32px 29px 36px;
}

.dk-loading-layer__header {
    text-align: center;
}

.dk-loading-layer__title {
    margin: 0;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 26px;
    letter-spacing: -0.4px;
    color: #000000;
}

.dk-loading-layer__subtitle {
    margin: 16px 0 0;
    font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 21px;
    letter-spacing: -0.28px;
    color: #000000;
}

.dk-loading-layer__illustration {
    margin: 24px 0 32px;
}

.dk-loading-layer__illustration img {
    width: 100%;
    display: block;
}

.dk-loading-layer__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.dk-loading-layer__logo {
    max-height: 30px;
    width: auto;
    display: block;
}

.dk-loading-layer__progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.dk-loading-layer__progress span {
    display: block;
    width: 8px;
    height: 10px;
    border-radius: 2px;
    background-color: #D9D9D9;
    animation: progressPulse 5s infinite;
}

/* 각 요소별 애니메이션 시작 시간 차등 적용 */
.dk-loading-layer__progress span:nth-child(1) {
    animation-delay: 0s;
}

.dk-loading-layer__progress span:nth-child(2) {
    animation-delay: 1s;
}

.dk-loading-layer__progress span:nth-child(3) {
    animation-delay: 2s;
}

.dk-loading-layer__progress span:nth-child(4) {
    animation-delay: 3s;
}

.dk-loading-layer__progress span:nth-child(5) {
    animation-delay: 4s;
}

/* 순차 애니메이션 정의: 1초간 검은색, 4초간 회색 */
@keyframes progressPulse {
    0%, 20% {
        background-color: #000000;
    }
    20.01%, 100% {
        background-color: #D9D9D9;
    }
}

@media (max-width: 480px) {
    .dk-loading-layer {
        padding: 16px;
    }
}
