style.scss 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. .charge-layout {
  2. position: relative;
  3. min-height: 100vh;
  4. }
  5. .charge-page {
  6. width: 100%;
  7. padding: 0;
  8. min-height: inherit;
  9. &__test-banner {
  10. padding: 10px 16px;
  11. background: #dc2626;
  12. color: #ffffff;
  13. font-size: 0.875rem;
  14. font-weight: 600;
  15. text-align: center;
  16. border-bottom: 1px solid #b91c1c;
  17. }
  18. &__card {
  19. border-radius: 0;
  20. overflow: hidden;
  21. min-height: inherit;
  22. }
  23. &__header {
  24. display: flex;
  25. align-items: center;
  26. justify-content: space-between;
  27. padding: 10px;
  28. background: var(--bg-head);
  29. color: var(--text-normal);
  30. h1 {
  31. font-size: 1.125rem;
  32. font-weight: 700;
  33. margin: 0;
  34. }
  35. }
  36. &__close {
  37. width: 32px;
  38. height: 32px;
  39. background: transparent;
  40. font-size: 1.25rem;
  41. cursor: pointer;
  42. &:hover {
  43. background: var(--bg-subtle);
  44. color: var(--text-primary);
  45. }
  46. }
  47. &__body {
  48. padding: 16px 20px 24px;
  49. }
  50. &__label {
  51. font-size: 0.8125rem;
  52. font-weight: 600;
  53. color: var(--text-secondary);
  54. margin-bottom: 10px;
  55. display: block;
  56. }
  57. &__amount-input {
  58. width: 100%;
  59. padding: 6px 14px;
  60. border: 1px solid var(--border-default);
  61. border-radius: 8px;
  62. font-size: 1.125rem;
  63. font-weight: 600;
  64. outline: none;
  65. text-align: right;
  66. background: var(--bg-page);
  67. color: var(--fg-default);
  68. &:focus {
  69. border-color: #3b82f6;
  70. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  71. }
  72. }
  73. &__quick-btns {
  74. display: flex;
  75. gap: 6px;
  76. margin-top: 8px;
  77. }
  78. &__quick-btn {
  79. flex: 1;
  80. padding: 8px 0;
  81. border: 1px solid var(--border-default);
  82. border-radius: 8px;
  83. font-size: 0.75rem;
  84. font-weight: 500;
  85. background: var(--bg-page, #fff);
  86. color: var(--fg-default);
  87. cursor: pointer;
  88. transition: all 0.15s;
  89. &:hover {
  90. background: var(--bg-subtle);
  91. border-color: #3b82f6;
  92. color: #bb1a98;
  93. }
  94. }
  95. &__method-section {
  96. margin-top: 16px;
  97. }
  98. &__method-grid {
  99. display: grid;
  100. grid-template-columns: repeat(4, 1fr);
  101. gap: 6px;
  102. margin-top: 8px;
  103. @media (max-width: 600px) {
  104. grid-template-columns: repeat(3, 1fr);
  105. }
  106. @media (max-width: 360px) {
  107. grid-template-columns: repeat(2, 1fr);
  108. }
  109. }
  110. &__method-btn {
  111. display: flex;
  112. flex-direction: column;
  113. align-items: center;
  114. gap: 4px;
  115. padding: 10px 4px;
  116. border: 1px solid var(--border-default);
  117. border-radius: 8px;
  118. font-size: 0.6875rem;
  119. font-weight: 500;
  120. background: var(--bg-page);
  121. color: var(--fg-default);
  122. cursor: pointer;
  123. transition: all 0.15s;
  124. &:hover:not(&--active):not(&--disabled) {
  125. background: var(--bg-subtle);
  126. }
  127. &--active {
  128. border-color: #3b82f6;
  129. background: rgba(59, 130, 246, 0.08);
  130. color: #3b82f6;
  131. font-weight: 600;
  132. }
  133. &--disabled {
  134. opacity: 0.4;
  135. filter: grayscale(0.6);
  136. cursor: not-allowed;
  137. pointer-events: none;
  138. background: var(--bg-subtle);
  139. color: var(--text-muted);
  140. .charge-page__method-icon > svg {
  141. fill: var(--text-muted);
  142. }
  143. }
  144. }
  145. &__method-icon {
  146. font-size: 1.125rem;
  147. line-height: 1;
  148. padding: 2px 27px;
  149. > svg {
  150. fill: var(--text-primary);
  151. }
  152. }
  153. &__receipt {
  154. width: 100%;
  155. margin-top: 20px;
  156. padding: 16px;
  157. background: var(--bg-subtle);
  158. border-radius: 8px;
  159. }
  160. &__receipt-row {
  161. display: flex;
  162. justify-content: space-between;
  163. font-size: 0.8125rem;
  164. padding: 4px 0;
  165. color: var(--text-secondary);
  166. &--total {
  167. font-size: 0.9375rem;
  168. font-weight: 700;
  169. color: var(--fg-default);
  170. border-top: 1px solid var(--border-default);
  171. margin-top: 8px;
  172. padding-top: 10px;
  173. }
  174. }
  175. &__submit {
  176. width: 100%;
  177. padding: 10px 0;
  178. margin-top: 16px;
  179. border: none;
  180. border-radius: 8px;
  181. background: #2a8db3;
  182. color: #fff;
  183. font-size: 1rem;
  184. font-weight: 600;
  185. cursor: pointer;
  186. transition: background 0.15s;
  187. &:hover {
  188. background: #82b917;
  189. }
  190. &:disabled {
  191. background: var(--text-muted);
  192. cursor: not-allowed;
  193. }
  194. }
  195. &__reset {
  196. width: 100%;
  197. padding: 8px 0;
  198. margin-top: 8px;
  199. border: 1px solid var(--border-default);
  200. border-radius: 8px;
  201. background: var(--bg-page);
  202. color: var(--text-secondary);
  203. font-size: 0.875rem;
  204. font-weight: 500;
  205. cursor: pointer;
  206. transition: all 0.15s;
  207. &:hover:not(:disabled) {
  208. background: var(--bg-subtle);
  209. }
  210. &:disabled {
  211. opacity: 0.5;
  212. cursor: not-allowed;
  213. }
  214. }
  215. &__error {
  216. margin-top: 12px;
  217. padding: 10px 12px;
  218. border-radius: 8px;
  219. background: #fee2e2;
  220. color: #dc2626;
  221. font-size: 0.8125rem;
  222. font-weight: 500;
  223. }
  224. // 토스 위젯 컨테이너 (SDK 가 내부 UI 를 렌더링)
  225. &__toss-methods {
  226. margin-top: 12px;
  227. }
  228. &__toss-agreement {
  229. margin-top: 4px;
  230. }
  231. // 결제 결과
  232. &__result {
  233. padding: 40px 20px;
  234. min-height: inherit;
  235. display: flex;
  236. flex-direction: column;
  237. align-items: center;
  238. justify-content: center;
  239. }
  240. &__result-icon {
  241. width: 56px;
  242. height: 56px;
  243. border-radius: 50%;
  244. display: inline-flex;
  245. align-items: center;
  246. justify-content: center;
  247. font-size: 1.5rem;
  248. font-weight: 700;
  249. margin-bottom: 16px;
  250. &--success {
  251. background: #dcfce7;
  252. color: #16a34a;
  253. }
  254. &--waiting {
  255. background: #fef9c3;
  256. color: #ca8a04;
  257. }
  258. &--error {
  259. background: #fee2e2;
  260. color: #dc2626;
  261. }
  262. }
  263. &__result-message {
  264. font-size: 1rem;
  265. font-weight: 600;
  266. }
  267. &__result-code {
  268. font-size: 0.75rem;
  269. color: var(--text-muted);
  270. margin-bottom: 16px;
  271. }
  272. &__spinner {
  273. width: 40px;
  274. height: 40px;
  275. border: 3px solid var(--border-default);
  276. border-top-color: #3b82f6;
  277. border-radius: 50%;
  278. animation: charge-spin 0.8s linear infinite;
  279. margin: 0 auto 16px;
  280. }
  281. }
  282. @keyframes charge-spin {
  283. to { transform: rotate(360deg); }
  284. }