style.scss 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. // ── 편집 3-column 레이아웃 (rank-config__layout 패턴) ──
  2. .crew-widget-layout {
  3. display: grid;
  4. grid-template-columns: minmax(0, 500px) auto 1fr;
  5. gap: 24px;
  6. align-items: start;
  7. }
  8. // ── 좌측 패널 (미리보기, sticky) ──
  9. .crew-widget-preview {
  10. position: sticky;
  11. top: 16px;
  12. display: flex;
  13. flex-direction: column;
  14. gap: 16px;
  15. max-height: calc(100vh - 48px);
  16. overflow-y: auto;
  17. &__widget {
  18. border: 1px solid hsl(var(--border));
  19. border-radius: var(--radius);
  20. overflow: hidden;
  21. }
  22. &__widget-label {
  23. padding: 8px 14px;
  24. font-size: 0.8125rem;
  25. font-weight: 500;
  26. color: hsl(var(--muted));
  27. background: #0e0e1a;
  28. }
  29. &__widget-body {
  30. padding: 16px;
  31. min-height: 200px;
  32. &--basic { background: #1a1a2e; }
  33. &--dark { background: #0a0a14; }
  34. &--minimal { background: #222; }
  35. }
  36. // ── 위젯 제목 ──
  37. &__title {
  38. text-align: center;
  39. font-weight: 700;
  40. font-size: 18px;
  41. margin-bottom: 12px;
  42. color: #fff;
  43. text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
  44. }
  45. // ── 컬럼 헤더 ──
  46. &__columns {
  47. display: flex;
  48. align-items: center;
  49. gap: 8px;
  50. padding: 6px 12px;
  51. margin-bottom: 6px;
  52. border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  53. font-size: 0.6875rem;
  54. font-weight: 500;
  55. color: rgba(255, 255, 255, 0.5);
  56. letter-spacing: 0.03em;
  57. }
  58. &__col-rank { width: 28px; text-align: center; flex-shrink: 0; }
  59. &__col-icon { width: 28px; flex-shrink: 0; }
  60. &__col-name { flex: 1; min-width: 0; }
  61. &__col-rate { width: 50px; text-align: right; flex-shrink: 0; }
  62. &__col-amount { width: 70px; text-align: right; flex-shrink: 0; }
  63. &__col-count { width: 40px; text-align: right; flex-shrink: 0; }
  64. // ── 순위 리스트 ──
  65. &__list {
  66. display: flex;
  67. flex-direction: column;
  68. gap: 6px;
  69. }
  70. &__item {
  71. display: flex;
  72. align-items: center;
  73. gap: 8px;
  74. padding: 8px 12px;
  75. border-radius: 8px;
  76. background: rgba(255, 255, 255, 0.08);
  77. &--1 { background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05)); }
  78. &--2 { background: linear-gradient(135deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05)); }
  79. &--3 { background: linear-gradient(135deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05)); }
  80. }
  81. // ── 순위 배지 ──
  82. &__badge {
  83. display: inline-flex;
  84. align-items: center;
  85. justify-content: center;
  86. width: 28px;
  87. height: 28px;
  88. border-radius: 50%;
  89. font-size: 14px;
  90. font-weight: 800;
  91. flex-shrink: 0;
  92. &--1 { background: #FFD700; color: #000; }
  93. &--2 { background: #C0C0C0; color: #000; }
  94. &--3 { background: #CD7F32; color: #fff; }
  95. &--default { background: #555; color: #fff; }
  96. }
  97. // ── 크루원 아이콘 ──
  98. &__member-icon {
  99. width: 28px;
  100. height: 28px;
  101. border-radius: 50%;
  102. background: #444;
  103. flex-shrink: 0;
  104. border: 1px solid rgba(255, 255, 255, 0.15);
  105. }
  106. // ── 이름 ──
  107. &__name {
  108. flex: 1;
  109. font-weight: 600;
  110. color: #fff;
  111. min-width: 0;
  112. overflow: hidden;
  113. text-overflow: ellipsis;
  114. white-space: nowrap;
  115. }
  116. // ── 기여도 ──
  117. &__rate {
  118. width: 50px;
  119. text-align: right;
  120. flex-shrink: 0;
  121. font-size: 0.85em;
  122. color: #A0D2FF;
  123. white-space: nowrap;
  124. }
  125. // ── 후원 금액 ──
  126. &__amount {
  127. width: 70px;
  128. text-align: right;
  129. flex-shrink: 0;
  130. font-weight: 700;
  131. color: #FF6B35;
  132. font-size: 0.85em;
  133. white-space: nowrap;
  134. }
  135. // ── 후원 건수 ──
  136. &__count {
  137. width: 40px;
  138. text-align: right;
  139. flex-shrink: 0;
  140. font-size: 0.8em;
  141. color: #aaa;
  142. white-space: nowrap;
  143. }
  144. }
  145. // ── 우측 패널 (폼) ──
  146. .crew-widget-form {
  147. display: flex;
  148. flex-direction: column;
  149. gap: 0;
  150. // ── 섹션 (details 기반, 좌측 제목 / 우측 입력 그리드) ──
  151. &__section {
  152. display: grid;
  153. grid-template-columns: 140px 1fr;
  154. gap: 24px;
  155. padding: 24px 0;
  156. border-bottom: 1px solid hsl(var(--border));
  157. &:first-of-type {
  158. padding-top: 0;
  159. }
  160. // details 마커 숨김
  161. &::-webkit-details-marker {
  162. display: none;
  163. }
  164. }
  165. &__section-title {
  166. font-size: 0.875rem;
  167. font-weight: 600;
  168. color: hsl(var(--foreground));
  169. padding-top: 2px;
  170. margin: 0;
  171. cursor: pointer;
  172. user-select: none;
  173. list-style: none;
  174. &::-webkit-details-marker {
  175. display: none;
  176. }
  177. &::before {
  178. content: '▸';
  179. display: inline-block;
  180. font-size: 0.7rem;
  181. margin-right: 6px;
  182. transition: transform 0.15s;
  183. }
  184. &:hover {
  185. color: hsl(var(--foreground) / 0.7);
  186. }
  187. }
  188. // 열린 상태: 화살표 회전
  189. &__section[open] > .crew-widget-form__section-title::before {
  190. transform: rotate(90deg);
  191. }
  192. &__section-body {
  193. display: flex;
  194. flex-direction: column;
  195. gap: 17px;
  196. max-width: 520px;
  197. }
  198. // ── 필드 행 (2-column 그리드) ──
  199. &__row {
  200. display: grid;
  201. grid-template-columns: 1fr 1fr;
  202. gap: 10px;
  203. @media (max-width: 640px) {
  204. grid-template-columns: 1fr;
  205. }
  206. }
  207. // ── 개별 필드 ──
  208. &__field {
  209. display: flex;
  210. flex-direction: column;
  211. gap: 6px;
  212. }
  213. &__field-label {
  214. font-size: 0.875rem;
  215. font-weight: 500;
  216. color: hsl(var(--foreground));
  217. }
  218. &__input {
  219. padding: 8px 12px;
  220. border: 1px solid hsl(var(--border));
  221. border-radius: calc(var(--radius) - 2px);
  222. background: hsl(var(--background));
  223. color: hsl(var(--foreground));
  224. font-size: 0.875rem;
  225. width: 100%;
  226. &::placeholder {
  227. color: hsl(var(--muted-foreground));
  228. }
  229. &--color-text {
  230. flex: 1;
  231. min-width: 0;
  232. font-family: monospace;
  233. }
  234. }
  235. &__select {
  236. padding: 8px 12px;
  237. border: 1px solid hsl(var(--border));
  238. border-radius: calc(var(--radius) - 2px);
  239. background: hsl(var(--background));
  240. color: hsl(var(--foreground));
  241. font-size: 0.875rem;
  242. width: 100%;
  243. cursor: pointer;
  244. }
  245. // ── 색상 선택 필드 ──
  246. &__color-field {
  247. display: flex;
  248. align-items: center;
  249. gap: 8px;
  250. }
  251. &__color-picker {
  252. width: 36px;
  253. height: 36px;
  254. border: 1px solid hsl(var(--border));
  255. border-radius: calc(var(--radius) - 2px);
  256. background: none;
  257. cursor: pointer;
  258. padding: 2px;
  259. flex-shrink: 0;
  260. &::-webkit-color-swatch-wrapper {
  261. padding: 0;
  262. }
  263. &::-webkit-color-swatch {
  264. border: none;
  265. border-radius: 2px;
  266. }
  267. &::-moz-color-swatch {
  268. border: none;
  269. border-radius: 2px;
  270. }
  271. }
  272. // ── 체크박스 행 ──
  273. &__checkbox-label {
  274. display: inline-flex;
  275. align-items: center;
  276. gap: 8px;
  277. font-size: 0.875rem;
  278. color: hsl(var(--foreground));
  279. cursor: pointer;
  280. }
  281. // ── 순위별 폰트 접이식 (details 내부) ──
  282. &__details {
  283. border: 1px solid hsl(var(--border));
  284. border-radius: calc(var(--radius) - 2px);
  285. overflow: hidden;
  286. &[open] > .crew-widget-form__details-summary {
  287. border-bottom: 1px solid hsl(var(--border));
  288. }
  289. }
  290. &__details-summary {
  291. padding: 10px 14px;
  292. font-size: 0.8125rem;
  293. font-weight: 500;
  294. color: hsl(var(--foreground));
  295. cursor: pointer;
  296. user-select: none;
  297. list-style: none;
  298. display: flex;
  299. align-items: center;
  300. gap: 6px;
  301. transition: background-color 0.15s;
  302. &:hover {
  303. background: hsl(var(--accent) / 0.5);
  304. }
  305. &::before {
  306. content: '▸';
  307. font-size: 0.75rem;
  308. transition: transform 0.15s;
  309. }
  310. &::-webkit-details-marker {
  311. display: none;
  312. }
  313. }
  314. &__details[open] > .crew-widget-form__details-summary::before {
  315. transform: rotate(90deg);
  316. }
  317. &__details-body {
  318. display: flex;
  319. flex-direction: column;
  320. gap: 14px;
  321. padding: 14px;
  322. }
  323. // ── 버튼 ──
  324. &__btn {
  325. display: inline-flex;
  326. align-items: center;
  327. justify-content: center;
  328. padding: 8px 20px;
  329. border: 1px solid hsl(var(--border));
  330. border-radius: calc(var(--radius) - 2px);
  331. font-size: 0.875rem;
  332. font-weight: 500;
  333. cursor: pointer;
  334. background: hsl(var(--background));
  335. color: hsl(var(--foreground));
  336. transition: background-color 0.15s;
  337. &:hover:not(:disabled) {
  338. background: hsl(var(--accent));
  339. }
  340. &:disabled {
  341. opacity: 0.5;
  342. cursor: not-allowed;
  343. }
  344. &--primary {
  345. background: hsl(var(--primary));
  346. color: hsl(var(--primary-foreground));
  347. border-color: hsl(var(--primary));
  348. &:hover:not(:disabled) {
  349. background: hsl(var(--primary) / 0.9);
  350. }
  351. }
  352. }
  353. // ── 하단 버튼 ──
  354. &__footer {
  355. display: flex;
  356. gap: 8px;
  357. justify-content: center;
  358. padding-top: 20px;
  359. margin-top: 4px;
  360. }
  361. }
  362. // ── 반응형 ──
  363. @media (max-width: 1380px) {
  364. .crew-widget-form {
  365. &__section {
  366. grid-template-columns: 1fr;
  367. gap: 5px;
  368. }
  369. &__section-title {
  370. margin-bottom: 9px;
  371. }
  372. }
  373. }
  374. @media (max-width: 1120px) {
  375. .crew-widget-layout {
  376. grid-template-columns: minmax(130px, auto) auto 3fr;
  377. }
  378. }
  379. @media (max-width: 768px) {
  380. .crew-widget-layout {
  381. grid-template-columns: 1fr;
  382. }
  383. .crew-widget-preview {
  384. position: static;
  385. max-height: none;
  386. }
  387. .crew-widget-form {
  388. &__section {
  389. grid-template-columns: 1fr;
  390. gap: 8px;
  391. }
  392. &__section-title {
  393. margin-bottom: 12px;
  394. }
  395. &__section-body {
  396. max-width: none;
  397. }
  398. &__row {
  399. grid-template-columns: 1fr;
  400. }
  401. }
  402. }