layout.module.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. // ── 헤더 (Layout + Studio 공용) ──
  2. // 헤더는 라이트 테마에서도 다크 고정 (amazon 방식) — --bg-head/--text-head/--head-* 는 tokens/_colors.scss 에서 양 테마 동일 값
  3. .header {
  4. background: var(--bg-head);
  5. border-bottom: 1px solid var(--border-default);
  6. // 1줄: 로고 + PC네비 + 중앙 검색 + 우측 아이콘
  7. .headerRow1 {
  8. display: flex;
  9. align-items: center;
  10. height: var(--header-h, 56px);
  11. padding: 0 16px;
  12. }
  13. // 햄버거 메뉴 (모바일 전용 — 좌측 사이드바 슬라이드 토글)
  14. .hamburger {
  15. display: none;
  16. align-items: center;
  17. justify-content: center;
  18. width: 36px;
  19. height: 36px;
  20. border: none;
  21. background: transparent;
  22. cursor: pointer;
  23. font-size: 1.25rem;
  24. color: var(--text-head);
  25. flex-shrink: 0;
  26. &:hover,
  27. &:focus,
  28. &:active {
  29. color: #fff;
  30. }
  31. @media (max-width: 1123.98px) {
  32. display: flex;
  33. }
  34. }
  35. // 로고
  36. .logo {
  37. flex-basis: 137px;
  38. font-size: inherit;
  39. padding-right: 20px;
  40. flex-shrink: 0;
  41. color: var(--text-head);
  42. transition: color 0.15s ease;
  43. text-align: center;
  44. &:hover,
  45. &:focus,
  46. &:focus-visible {
  47. color: #fff;
  48. }
  49. }
  50. // PC 네비게이션 (모바일에서 숨김)
  51. .pcNav {
  52. display: flex;
  53. align-items: center;
  54. font-weight: 500;
  55. flex-shrink: 0;
  56. ul {
  57. display: flex;
  58. gap: 1rem;
  59. li {
  60. a, button {
  61. color: var(--text-head);
  62. &:hover {
  63. font-weight: 700;
  64. text-decoration: underline;
  65. }
  66. }
  67. }
  68. }
  69. @media (max-width: 1123.98px) {
  70. display: none;
  71. }
  72. }
  73. // 통합 검색 — 우측 아이콘 클러스터(headerActions) 내부, 장바구니 바로 좌측에 콤팩트 배치
  74. .searchBox {
  75. position: relative;
  76. flex: 0 1 300px;
  77. margin: 0;
  78. padding: 0;
  79. @media (max-width: 1123.98px) {
  80. display: none;
  81. }
  82. }
  83. .searchInput {
  84. width: 100%;
  85. height: 36px;
  86. padding: 0 72px 0 12px;
  87. font-size: 0.875rem;
  88. color: var(--head-input-text);
  89. background: var(--head-input-bg);
  90. border: 1px solid var(--head-input-border);
  91. border-radius: 6px;
  92. transition: border-color 0.15s ease;
  93. &::placeholder {
  94. color: var(--head-input-placeholder);
  95. }
  96. &:hover {
  97. border-color: var(--outline-default);
  98. }
  99. &:focus {
  100. outline: none;
  101. border-color: var(--az-accent);
  102. -webkit-box-shadow: 0 0 0 1px var(--az-accent);
  103. box-shadow: 0 0 0 1px var(--az-accent);
  104. }
  105. }
  106. .searchKbd {
  107. position: absolute;
  108. top: 50%;
  109. right: 26px;
  110. transform: translateY(-50%);
  111. padding: 1px 6px;
  112. font-size: 11px;
  113. font-family: inherit;
  114. color: var(--head-input-placeholder);
  115. border: 1px solid var(--head-input-border);
  116. border-radius: 4px;
  117. pointer-events: none;
  118. white-space: nowrap;
  119. }
  120. // 우측 아이콘 영역
  121. .headerActions {
  122. display: flex;
  123. align-items: center;
  124. gap: 8px;
  125. margin-left: auto;
  126. flex-shrink: 0;
  127. }
  128. .chargeBtn {
  129. display: inline-flex;
  130. align-items: center;
  131. justify-content: center;
  132. padding: 6px;
  133. border-radius: 16px;
  134. background: transparent;
  135. font-size: 0.75rem;
  136. font-weight: 700;
  137. cursor: pointer;
  138. color: var(--text-head);
  139. white-space: nowrap;
  140. &:hover {
  141. outline: 1px solid var(--outline-default);
  142. background: var(--bg-icon);
  143. }
  144. }
  145. .cartBtn {
  146. position: relative;
  147. display: inline-flex;
  148. align-items: center;
  149. justify-content: center;
  150. width: 36px;
  151. height: 36px;
  152. border-radius: 18px;
  153. background: transparent;
  154. color: var(--text-head);
  155. font-size: 1rem;
  156. &:hover {
  157. outline: 1px solid var(--outline-default);
  158. background: var(--bg-icon);
  159. color: #fff;
  160. }
  161. }
  162. .cartBadge {
  163. position: absolute;
  164. top: -2px;
  165. right: -2px;
  166. min-width: 18px;
  167. height: 18px;
  168. padding: 0 5px;
  169. border-radius: 9px;
  170. background: #ef4444;
  171. color: #fff;
  172. font-size: 10px;
  173. font-weight: 700;
  174. display: inline-flex;
  175. align-items: center;
  176. justify-content: center;
  177. line-height: 1;
  178. }
  179. .authLink {
  180. font-size: 0.875rem;
  181. font-weight: 500;
  182. &:hover {
  183. text-decoration: underline;
  184. }
  185. }
  186. // 2줄: 모바일 가로 스크롤 탭
  187. .headerRow2 {
  188. display: none;
  189. @media (max-width: 1123.98px) {
  190. display: flex;
  191. align-items: center;
  192. background: rgba(0, 0, 0, 0.12);
  193. border-top: 1px solid rgba(0, 0, 0, 0.18);
  194. }
  195. }
  196. // 좌/우 스크롤 화살표 (모바일 전용, 내 정보 nav 패턴)
  197. .scrollArrow {
  198. display: none;
  199. @media (max-width: 1123.98px) {
  200. display: flex;
  201. align-items: center;
  202. justify-content: center;
  203. flex-shrink: 0;
  204. width: 32px;
  205. height: 40px;
  206. border: none;
  207. background: transparent;
  208. color: var(--text-head);
  209. font-size: 0.8125rem;
  210. cursor: pointer;
  211. &:active {
  212. color: #fff;
  213. }
  214. }
  215. }
  216. .mobileTabScroll {
  217. display: flex;
  218. flex: 1;
  219. min-width: 0;
  220. overflow-x: auto;
  221. -webkit-overflow-scrolling: touch;
  222. scrollbar-width: none;
  223. padding: 0;
  224. gap: 0;
  225. &::-webkit-scrollbar {
  226. display: none;
  227. }
  228. }
  229. .mobileTab {
  230. flex: 0 0 auto;
  231. display: inline-flex;
  232. align-items: center;
  233. justify-content: center;
  234. padding: 10px 14px;
  235. font-size: 0.875rem;
  236. font-weight: 500;
  237. white-space: nowrap;
  238. color: var(--text-head);
  239. text-decoration: none;
  240. position: relative;
  241. transition: color 0.15s, font-weight 0.15s;
  242. &:hover {
  243. color: #fff;
  244. }
  245. }
  246. .mobileTabActive {
  247. color: #fff;
  248. font-weight: 700;
  249. background: transparent;
  250. &::after {
  251. content: '';
  252. position: absolute;
  253. left: 12px;
  254. right: 12px;
  255. bottom: 0;
  256. height: 3px;
  257. background: #fff;
  258. border-radius: 2px 2px 0 0;
  259. }
  260. }
  261. // 지수 티커 스트립 — TradingView 임베드 컨테이너 규격만 (D0 §3-A 단기안, 실제 임베드는 후속)
  262. // 내용이 주입되기 전(:empty)에는 미표시
  263. .tickerStrip {
  264. height: var(--ticker-h, 32px);
  265. overflow: hidden;
  266. background: var(--bg-head);
  267. border-top: 1px solid var(--head-input-border);
  268. &:empty {
  269. display: none;
  270. }
  271. iframe {
  272. width: 100%;
  273. height: 100%;
  274. border: 0;
  275. }
  276. }
  277. // 모바일 헤더 패딩 조정
  278. @media (max-width: 1123.98px) {
  279. .headerRow1 {
  280. padding: 0 8px;
  281. }
  282. .logo {
  283. flex-basis: auto;
  284. padding-right: 0;
  285. }
  286. }
  287. }
  288. // ── 접근성: 스킵 링크 (Tab 첫 포커스 시 노출) ──
  289. .skipLink {
  290. position: fixed;
  291. top: -100px;
  292. left: 8px;
  293. z-index: 3000;
  294. padding: 8px 14px;
  295. border-radius: 4px;
  296. background: var(--az-accent);
  297. color: #201503;
  298. font-weight: 700;
  299. transition: top 0.15s ease;
  300. &:focus {
  301. top: 8px;
  302. }
  303. }
  304. // ── 메인 레이아웃 컨테이너 — WIDE fluid 3단 그리드 (max-width 없음) ──
  305. // 브레이크포인트 4단: mobile <768 / tablet 768~1123.98 / desktop 1124~1535.98 / wide ≥1536
  306. // (기존 min-width:1124 + max-width:1125 의 1124~1125px 이중 매칭 → 1123.98px 경계로 통일)
  307. .container {
  308. display: grid;
  309. height: 100vh;
  310. height: 100dvh;
  311. grid-template-rows: auto 1fr auto;
  312. // desktop 이상: 좌 사이드바 + 메인 + 우 채팅 도크 (3열 기본 — 채팅은 상시)
  313. @media (min-width: 1124px) {
  314. grid-template-areas: "header header header" "aside main chat" "aside footer footer";
  315. grid-template-columns: var(--antooza-sidebar-width, var(--az-sidebar-w, 220px)) minmax(0, 1fr) var(--antooza-chat-width, var(--az-chat-w, 340px));
  316. transition: grid-template-columns 0.2s ease;
  317. }
  318. @media (min-width: 1124px) and (prefers-reduced-motion: reduce) {
  319. transition: none;
  320. }
  321. // 모바일/태블릿: 1열 (사이드바는 슬라이드 오버레이, 유틸 슬롯 미표시 — 페이지가 하단 적층 결정)
  322. @media (max-width: 1123.98px) {
  323. grid-template-areas: "header" "main" "footer";
  324. grid-template-columns: minmax(0, 1fr);
  325. }
  326. // 우 유틸 슬롯 제공 페이지: 4열 (aside + main + utility + chat, desktop 이상)
  327. &.hasUtility {
  328. @media (min-width: 1124px) {
  329. grid-template-areas: "header header header header" "aside main utility chat" "aside footer footer footer";
  330. grid-template-columns: var(--antooza-sidebar-width, var(--az-sidebar-w, 220px)) minmax(0, 1fr) var(--az-utility-w, 280px) var(--antooza-chat-width, var(--az-chat-w, 340px));
  331. }
  332. }
  333. // 사이드바 없는 변형 (관심종목 미노출 페이지) — 메인 + 우 채팅
  334. &.noAside {
  335. @media (min-width: 1124px) {
  336. grid-template-areas: "header header" "main chat" "footer footer";
  337. grid-template-columns: minmax(0, 1fr) var(--antooza-chat-width, var(--az-chat-w, 340px));
  338. }
  339. &.hasUtility {
  340. @media (min-width: 1124px) {
  341. grid-template-areas: "header header header" "main utility chat" "footer footer footer";
  342. grid-template-columns: minmax(0, 1fr) var(--az-utility-w, 280px) var(--antooza-chat-width, var(--az-chat-w, 340px));
  343. }
  344. }
  345. }
  346. > .header {
  347. grid-area: header;
  348. }
  349. // 좌측 사이드바
  350. > .aside {
  351. grid-area: aside;
  352. overflow-y: auto;
  353. transition: transform 0.3s ease;
  354. background: var(--bg-page);
  355. @media (min-width: 1124px) {
  356. position: relative;
  357. transform: translateX(0);
  358. border-right: 1px solid var(--border-default);
  359. }
  360. // 모바일: 왼쪽에서 슬라이드
  361. @media (max-width: 1123.98px) {
  362. position: fixed;
  363. top: var(--header-h, 56px);
  364. left: 0;
  365. width: min(320px, 85vw);
  366. height: calc(100vh - var(--header-h, 56px));
  367. height: calc(100dvh - var(--header-h, 56px));
  368. z-index: 1000;
  369. transform: translateX(-100%);
  370. border-right: 1px solid var(--border-default);
  371. box-shadow: none;
  372. }
  373. }
  374. // 사이드바 열림 상태
  375. &.sidebarOpen {
  376. > .aside {
  377. @media (max-width: 1123.98px) {
  378. transform: translateX(0);
  379. box-shadow: 4px 0 12px var(--shadow-color);
  380. }
  381. }
  382. > .overlay {
  383. @media (max-width: 1123.98px) {
  384. display: block;
  385. }
  386. }
  387. }
  388. // 메인 내용
  389. > .main {
  390. position: relative;
  391. grid-area: main;
  392. overflow-y: auto;
  393. border-bottom: 1px solid var(--border-default);
  394. }
  395. // 우측 유틸 슬롯 (desktop 이상 전용 — mobile/tablet 은 미표시)
  396. > .utility {
  397. grid-area: utility;
  398. overflow-y: auto;
  399. background: var(--bg-page);
  400. border-left: 1px solid var(--border-default);
  401. @media (max-width: 1123.98px) {
  402. display: none;
  403. }
  404. }
  405. // 오버레이 (모바일)
  406. > .overlay {
  407. display: none;
  408. @media (max-width: 1123.98px) {
  409. position: fixed;
  410. top: var(--header-h, 56px);
  411. left: 0;
  412. right: 0;
  413. bottom: 0;
  414. background: var(--overlay-color);
  415. z-index: 999;
  416. }
  417. }
  418. // 하단 내용
  419. // - Mobile/Tablet (≤1123.98px): Amazon 스타일 — 중앙 정렬 링크 줄 + 별도 카피라이트 줄
  420. // - PC (≥1124px): 한 줄 — 좌측 링크 나열 + 우측 카피라이트
  421. > .footer {
  422. grid-area: footer;
  423. padding: 16px 12px;
  424. text-align: center;
  425. font-size: 0.75rem;
  426. color: var(--text-muted);
  427. .footerLinks {
  428. display: flex;
  429. flex-wrap: wrap;
  430. justify-content: center;
  431. align-items: center;
  432. gap: 8px 18px;
  433. a {
  434. color: var(--text-secondary);
  435. text-decoration: none;
  436. transition: color 0.15s ease;
  437. &:hover,
  438. &:focus {
  439. color: var(--text-primary);
  440. text-decoration: underline;
  441. }
  442. }
  443. }
  444. .footerCopy {
  445. margin: 10px 0 0;
  446. font-size: 0.6875rem;
  447. color: var(--text-muted);
  448. }
  449. @media (max-width: 576px) {
  450. padding: 14px 10px;
  451. .footerLinks {
  452. gap: 6px 14px;
  453. font-size: 0.6875rem;
  454. }
  455. .footerCopy {
  456. margin-top: 8px;
  457. }
  458. }
  459. // PC: 한 줄 레이아웃 — 좌측 링크 + 우측 카피라이트
  460. // 높이 32px — 좌측 사이드바 .channel-sidebar__icon-btn 와 정렬
  461. @media (min-width: 1124px) {
  462. display: flex;
  463. align-items: center;
  464. justify-content: space-between;
  465. gap: 16px;
  466. height: 32px;
  467. padding: 0 16px;
  468. text-align: left;
  469. font-size: 0.6875rem;
  470. .footerLinks {
  471. flex-wrap: nowrap;
  472. justify-content: flex-start;
  473. gap: 0 18px;
  474. }
  475. .footerCopy {
  476. margin: 0;
  477. white-space: nowrap;
  478. }
  479. }
  480. }
  481. }