/* ============================================================
   WATCHMARKET — 공통 라이트 모드 오버라이드
   html[data-theme="dark"] 가 없을 때 라이트 모드로 전환
   ============================================================ */

/* ── Body ──────────────────────────────────────────────────── */
html:not([data-theme="dark"]) body {
  background: #f7f6f3 !important;
  color: #111111 !important;
}
html:not([data-theme="dark"]) body::after { opacity: 0.015 !important; }

html:not([data-theme="dark"]) ::-webkit-scrollbar-track { background: #eeeeee !important; }
html:not([data-theme="dark"]) ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1) !important; border-radius: 2px !important; }

/* ── Ambient orbs: 라이트 모드에서 숨김 ──────────────────── */
html:not([data-theme="dark"]) .fixed.inset-0.pointer-events-none { opacity: 0.3 !important; }

/* ── H1 gradient ──────────────────────────────────────────── */
html:not([data-theme="dark"]) .h1-grad {
  background: linear-gradient(160deg, #111111 0%, rgba(17,17,17,0.55) 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ── Select arrow ─────────────────────────────────────────── */
html:not([data-theme="dark"]) select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(0,0,0,0.35)' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
}

/* ── Floating glass nav ───────────────────────────────────── */
html:not([data-theme="dark"]) #board-dropdown-btn,
html:not([data-theme="dark"]) #market-dropdown-btn {
  color: rgba(0,0,0,0.45) !important;
  background: transparent !important;
}
html:not([data-theme="dark"]) #board-dropdown-btn.bg-white\/10,
html:not([data-theme="dark"]) #market-dropdown-btn.bg-white\/10 {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #ffffff !important;
}
html:not([data-theme="dark"]) #board-dropdown-menu,
html:not([data-theme="dark"]) #market-dropdown-menu {
  background: rgba(255,255,255,0.95) !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}
html:not([data-theme="dark"]) #board-dropdown-menu a,
html:not([data-theme="dark"]) #market-dropdown-menu a {
  color: rgba(0,0,0,0.5) !important;
}
html:not([data-theme="dark"]) #board-dropdown-menu a:hover,
html:not([data-theme="dark"]) #market-dropdown-menu a:hover {
  background: rgba(0,0,0,0.04) !important;
  color: #111111 !important;
}
html:not([data-theme="dark"]) #board-dropdown-menu a.text-\[#C9A84C\],
html:not([data-theme="dark"]) #market-dropdown-menu a.text-\[#C9A84C\] {
  color: #C9A84C !important;
}
html:not([data-theme="dark"]) header nav {
  background: rgba(255,255,255,0.8) !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
}
html:not([data-theme="dark"]) header nav > a {
  color: #111111 !important;
}
html:not([data-theme="dark"]) header nav > div > a {
  color: rgba(0,0,0,0.45) !important;
  background: transparent !important;
}
/* 활성 링크 */
html:not([data-theme="dark"]) header nav > div > a.bg-white\/10 {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #ffffff !important;
}
/* 로그인 버튼 — 골드 유지 */
html:not([data-theme="dark"]) header nav > div > a.bg-\[#C9A84C\] {
  background: #C9A84C !important;
  color: #050505 !important;
}
html:not([data-theme="dark"]) #mob-open {
  border-color: #e4e4e7 !important;
  background: #fafafa !important;
  color: #a1a1aa !important;
}
html:not([data-theme="dark"]) #theme-toggle,
html:not([data-theme="dark"]) #back-btn,
html:not([data-theme="dark"]) #check-dup-btn {
  border-color: #e4e4e7 !important;
  background: #fafafa !important;
  color: #71717a !important;
}

/* ── Mobile drawer ────────────────────────────────────────── */
html:not([data-theme="dark"]) #mob-drawer-bg {
  background: rgba(180,180,180,0.6) !important;
}
html:not([data-theme="dark"]) #mob-drawer-panel {
  background: #ffffff !important;
  border-left-color: rgba(0,0,0,0.08) !important;
}
html:not([data-theme="dark"]) #mob-close {
  border-color: #e4e4e7 !important;
  color: #a1a1aa !important;
  background: transparent !important;
}
html:not([data-theme="dark"]) #mob-drawer-panel .text-white\/60 {
  color: #a1a1aa !important;
}
html:not([data-theme="dark"]) #mob-drawer-panel nav a {
  color: rgba(0,0,0,0.45) !important;
  background: transparent !important;
  border-color: transparent !important;
}
html:not([data-theme="dark"]) #mob-drawer-panel nav a.bg-white\/10 {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #ffffff !important;
}
html:not([data-theme="dark"]) #mob-drawer-panel .border-white\/\[0\.06\] {
  border-color: rgba(0,0,0,0.06) !important;
}

/* ── 공통 카드 / 패널 (bg-white/[x] 계열) ─────────────────── */
html:not([data-theme="dark"]) .bg-white\/\[0\.04\],
html:not([data-theme="dark"]) .bg-white\/\[0\.06\] {
  background: rgba(0,0,0,0.03) !important;
}

/* ── 필터 pill / 탭 (.bb) ─────────────────────────────────── */
html:not([data-theme="dark"]) .bb {
  border-color: rgba(0,0,0,0.12) !important;
  color: rgba(0,0,0,0.45) !important;
}
html:not([data-theme="dark"]) .bb.on {
  background: #C9A84C !important;
  color: #050505 !important;
  border-color: #C9A84C !important;
}

/* ── 테이블 행 (price-row) ────────────────────────────────── */
html:not([data-theme="dark"]) .price-row {
  border-bottom-color: rgba(0,0,0,0.06) !important;
}
html:not([data-theme="dark"]) .price-row:hover {
  background: rgba(0,0,0,0.025) !important;
}

/* ── 착샷 카드 (shot-card) ────────────────────────────────── */
html:not([data-theme="dark"]) .shot-card {
  background: rgba(255,255,255,0.85) !important;
  border-color: rgba(0,0,0,0.08) !important;
}

/* ── 로그인 / 폼 패널 ─────────────────────────────────────── */
html:not([data-theme="dark"]) .bg-white\/\[0\.04\] input,
html:not([data-theme="dark"]) input[type="text"],
html:not([data-theme="dark"]) input[type="email"],
html:not([data-theme="dark"]) input[type="password"] {
  background: rgba(0,0,0,0.04) !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #111 !important;
}
html:not([data-theme="dark"]) input::placeholder { color: rgba(0,0,0,0.3) !important; }

/* ── 로그인 후 nav 인증 영역 (auth.js 동적 주입) ─────────── */

/* 데스크탑 — 프로필 드롭다운 버튼 (라이트 모드) */
html:not([data-theme="dark"]) #nav-profile-btn {
  border-color: #e4e4e7 !important;
  background: #fafafa !important;
  color: #71717a !important;
}
html:not([data-theme="dark"]) #nav-profile-btn:hover {
  border-color: #a1a1aa !important;
  color: #111111 !important;
}
html:not([data-theme="dark"]) #nav-profile-btn span {
  color: inherit !important;
}

/* 데스크탑 — 프로필 드롭다운 메뉴 (기존 거래/게시판 드롭다운과 동일 스타일) */
html:not([data-theme="dark"]) #nav-profile-menu {
  background: rgba(255,255,255,0.95) !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
}
html:not([data-theme="dark"]) #nav-desktop-auth #nav-profile-menu a,
html:not([data-theme="dark"]) #nav-desktop-auth #nav-profile-menu button {
  background: transparent !important;
  border: none !important;
  color: rgba(0,0,0,0.5) !important;
}
html:not([data-theme="dark"]) #nav-desktop-auth #nav-profile-menu a:hover,
html:not([data-theme="dark"]) #nav-desktop-auth #nav-profile-menu button:hover {
  background: rgba(0,0,0,0.04) !important;
  color: #111111 !important;
}
html:not([data-theme="dark"]) #nav-profile-divider {
  background: rgba(0,0,0,0.06) !important;
}
html:not([data-theme="dark"]) #nav-profile-menu .bg-white\/20 {
  background: rgba(0,0,0,0.2) !important;
}

/* 모바일 드로어 — 내 글/채팅/설정/로그아웃 링크·버튼 */
html:not([data-theme="dark"]) #nav-drawer-auth a,
html:not([data-theme="dark"]) #nav-drawer-auth button {
  border-color: rgba(0,0,0,0.08) !important;
  color: rgba(0,0,0,0.5) !important;
}
html:not([data-theme="dark"]) #nav-drawer-auth a:hover,
html:not([data-theme="dark"]) #nav-drawer-auth button:hover {
  color: #111111 !important;
  border-color: rgba(0,0,0,0.15) !important;
}

/* 모바일 드로어 — 환영 텍스트 */
html:not([data-theme="dark"]) #nav-drawer-auth div {
  color: rgba(0,0,0,0.35) !important;
}

/* ── No-image poster (이미지가 없는 카드의 상단 색 영역) ────── */
/* 판매글/구매글 카드 모두 동일 스타일 사용 */
.no-img-poster { background: linear-gradient(145deg, #f0ede8 0%, #e8e4dd 100%); }
html[data-theme="dark"] .no-img-poster { background: linear-gradient(145deg, #131313 0%, #0c0c0c 100%) !important; }
.no-img-poster .brand-mark { font-size: 22px; font-weight: 800; letter-spacing: 0.12em; color: rgba(0,0,0,0.55); text-align: center; padding: 0 12px; }
html[data-theme="dark"] .no-img-poster .brand-mark { color: rgba(255,255,255,0.78) !important; }
.no-img-poster .model-mark { font-size: 11px; color: rgba(0,0,0,0.35); margin-top: 2px; letter-spacing: 0.04em; text-align: center; padding: 0 12px; }
html[data-theme="dark"] .no-img-poster .model-mark { color: rgba(255,255,255,0.4) !important; }

/* ── Select option — Windows 다크모드 호환 ──────────────────── */
/* 네이티브 select 드롭다운은 OS가 렌더링하므로 option에 명시적 색 지정 필요 */
html[data-theme="dark"] select option {
  background-color: #141414;
  color: rgba(255,255,255,0.85);
}
html:not([data-theme="dark"]) select option {
  background-color: #ffffff;
  color: #111111;
}
