notification-bell.scss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. .notification-bell {
  2. position: relative;
  3. display: inline-flex;
  4. &__button {
  5. position: relative;
  6. background: none;
  7. border: none;
  8. cursor: pointer;
  9. padding: 6px;
  10. font-size: 1.25rem;
  11. color: var(--text-head);
  12. border-radius: 50%;
  13. transition: background 0.15s;
  14. &:hover {
  15. outline: 1px solid var(--outline-default);
  16. background: var(--bg-icon);
  17. }
  18. }
  19. &__badge {
  20. position: absolute;
  21. top: 0;
  22. right: 0;
  23. background: var(--color-danger);
  24. color: #fff;
  25. border-radius: 50%;
  26. width: 18px;
  27. height: 18px;
  28. font-size: 0.625rem;
  29. font-weight: 700;
  30. display: flex;
  31. align-items: center;
  32. justify-content: center;
  33. pointer-events: none;
  34. }
  35. // ── 토스트 알림 ─────────────────────────────────────
  36. &__toast {
  37. position: fixed;
  38. top: 16px;
  39. right: 16px;
  40. background: var(--text-primary, #1f2937);
  41. color: #fff;
  42. padding: 10px 16px;
  43. border-radius: 10px;
  44. font-size: 0.8125rem;
  45. z-index: 9999;
  46. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  47. animation: notif-bell-fade-in 0.3s ease;
  48. }
  49. // ── 드롭다운 패널 ───────────────────────────────────
  50. &__dropdown {
  51. position: absolute;
  52. right: 0;
  53. top: calc(100% + 8px);
  54. width: 340px;
  55. max-height: 420px;
  56. overflow-y: auto;
  57. background: var(--bg-page);
  58. border: 1px solid var(--border-default);
  59. border-radius: 12px;
  60. box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  61. z-index: 1000;
  62. }
  63. &__header {
  64. display: flex;
  65. align-items: center;
  66. justify-content: space-between;
  67. padding: 14px 16px;
  68. border-bottom: 1px solid var(--border-default);
  69. &:hover {
  70. border: 1px solid var(--border-default);
  71. }
  72. }
  73. &__header-title {
  74. font-size: 0.875rem;
  75. font-weight: 700;
  76. }
  77. &__read-all-btn {
  78. background: none;
  79. border: none;
  80. color: var(--color-blue);
  81. cursor: pointer;
  82. font-size: 0.75rem;
  83. font-weight: 500;
  84. &:hover {
  85. text-decoration: underline;
  86. }
  87. }
  88. // ── 상태 ────────────────────────────────────────────
  89. &__loading,
  90. &__empty {
  91. padding: 24px 16px;
  92. text-align: center;
  93. color: var(--text-muted);
  94. font-size: 0.8125rem;
  95. }
  96. // ── 알림 아이템 ─────────────────────────────────────
  97. &__item {
  98. display: flex;
  99. gap: 10px;
  100. padding: 10px 16px;
  101. cursor: pointer;
  102. transition: background 0.15s;
  103. &:not(:last-child) {
  104. border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.05));
  105. }
  106. &:hover {
  107. background: var(--bg-subtle);
  108. }
  109. &--unread {
  110. background: var(--color-blue-bg);
  111. }
  112. }
  113. &__item-image {
  114. width: 36px;
  115. height: 36px;
  116. border-radius: 50%;
  117. object-fit: cover;
  118. flex-shrink: 0;
  119. }
  120. &__item-content {
  121. flex: 1;
  122. overflow: hidden;
  123. min-width: 0;
  124. }
  125. &__item-title {
  126. font-size: 0.8125rem;
  127. color: var(--text-primary);
  128. overflow: hidden;
  129. text-overflow: ellipsis;
  130. white-space: nowrap;
  131. &--unread {
  132. font-weight: 600;
  133. }
  134. &--read {
  135. font-weight: 400;
  136. }
  137. }
  138. &__item-message {
  139. font-size: 0.75rem;
  140. color: var(--text-muted);
  141. overflow: hidden;
  142. text-overflow: ellipsis;
  143. white-space: nowrap;
  144. margin-top: 1px;
  145. }
  146. &__item-time {
  147. font-size: 0.625rem;
  148. color: var(--text-muted);
  149. margin-top: 3px;
  150. }
  151. &__item-dot {
  152. width: 8px;
  153. height: 8px;
  154. border-radius: 50%;
  155. background: var(--color-blue);
  156. flex-shrink: 0;
  157. margin-top: 6px;
  158. }
  159. // ── 하단 푸터 ───────────────────────────────────────
  160. &__footer {
  161. padding: 10px 16px;
  162. text-align: center;
  163. border-top: 1px solid var(--border-default);
  164. }
  165. &__footer-link {
  166. font-size: 0.75rem;
  167. color: var(--color-blue);
  168. text-decoration: none;
  169. font-weight: 500;
  170. &:hover {
  171. text-decoration: underline;
  172. }
  173. }
  174. &__footer-divider {
  175. margin: 0 8px;
  176. color: var(--border-default);
  177. }
  178. }
  179. @keyframes notif-bell-fade-in {
  180. from {
  181. opacity: 0;
  182. transform: translateY(-8px);
  183. }
  184. to {
  185. opacity: 1;
  186. transform: translateY(0);
  187. }
  188. }