layout.module.scss 12 KB

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