layout.module.scss 11 KB

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