/**
 * Cookie Consent Banner Styles
 * Floating consent card — mobile-first responsive design
 */

/* 하단 고정 바(호스트 상세 CTA·충전 바)가 있는 페이지에서는 배너를 그 위로 올린다.
   2026-08-27 신뢰도 감사: 배너가 #ctaChatBtn 을 덮어 첫 방문자의 주 전환 버튼 탭이
   실제로 차단되고 있었다(쿠키 미동의 = 모든 신규 방문자).
   모바일에서 하단 스택은 탭바 56px + CTA 바(최대 137px, character-modal.css 가
   bottom:56px 로 올림) = 최대 193px 다. 배너 기본 68px + 132px 로 그 위를 확보한다. */
body:has(.fixed-bottom-cta),
body:has(.charge-bottom-bar) {
    --bottom-fixed-offset: 132px;
}

.cookie-consent-banner {
    position: fixed;
    /* Keep the mobile bottom navigation (56px) usable. */
    bottom: calc(68px + var(--bottom-fixed-offset, 0px) + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    max-width: 480px;
    margin: 0 auto;
    z-index: 99999;
    background: rgba(17, 17, 17, 0.97);
    /* 배너는 항상 어두우므로 라이트 테마 토큰(#ececec 테두리 / #4b5563 본문)을 쓰면
       안 된다 — 토큰 충돌로 폴백이 절대 적용되지 않는다. 배너 전용 색을 고정한다. */
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.cookie-consent-banner.show {
    transform: translateY(0);
}

.cookie-consent-banner.hide {
    transform: translateY(100%);
}

.cookie-consent-content {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #c9cbd3;
    flex: 1;
    min-width: 0;
}

.cookie-privacy-link {
    /* 배너는 항상 어두운 표면이다. 공개 리디자인이 --primary 를 #111 로 덮어
       검정 링크가 되던 문제(대비 1.11:1) 때문에 토큰을 쓰지 않고 고정한다.
       #C9B3FF on #1a1a2e = 9.24:1. 색 외 단서로 밑줄도 항상 유지한다. */
    color: #1e8a5e;
    text-decoration: underline;
    margin-left: 4px;
    white-space: nowrap;
}

.cookie-privacy-link:hover {
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

/* 거부 선택지는 수락 버튼과 같은 높이·여백·글자크기로 둔다(다크패턴 방지). */
.cookie-btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    padding: 10px 18px;
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.cookie-btn-link:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-primary {
    /* This CTA sits on an always-dark surface. Keep its contrast independent
       from page theme tokens (public redesign sets --primary to #111). */
    background: #99f0ce;
    color: #111111;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(30, 138, 94, 0.35);
}

.cookie-btn-primary:hover {
    background: #99f0ce;
}

.cookie-btn-primary:active {
    transform: scale(0.98);
}

.cookie-btn:focus-visible,
.cookie-btn-link:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px;
    }

    .cookie-buttons {
        justify-content: space-between;
    }
}

/* The desktop layout has no bottom navigation. */
@media (min-width: 1024px) {
    .cookie-consent-banner {
        bottom: calc(20px + var(--bottom-fixed-offset, 0px));
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner {
        transition: none;
    }
}
