comments.css 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. /* Comments System Styles */
  2. .comments-section {
  3. margin-top: 3rem;
  4. padding-top: 2rem;
  5. border-top: 1px solid #e0e0e0;
  6. }
  7. .comments-section h3 {
  8. margin-bottom: 1.5rem;
  9. color: #333;
  10. font-size: 1.5rem;
  11. }
  12. /* Comments List */
  13. .comments-list {
  14. margin-bottom: 2rem;
  15. }
  16. .comment {
  17. background: #f8f9fa;
  18. border: 1px solid #e9ecef;
  19. border-radius: 8px;
  20. padding: 1.5rem;
  21. margin-bottom: 1rem;
  22. transition: box-shadow 0.2s ease;
  23. }
  24. .comment:hover {
  25. box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  26. }
  27. .comment.admin-reply {
  28. background: #e3f2fd;
  29. border-color: #2196f3;
  30. }
  31. .comment-header {
  32. display: flex;
  33. justify-content: space-between;
  34. align-items: center;
  35. margin-bottom: 1rem;
  36. flex-wrap: wrap;
  37. gap: 0.5rem;
  38. }
  39. .comment-author {
  40. font-weight: 600;
  41. color: #333;
  42. }
  43. .comment-author strong {
  44. color: #2c3e50;
  45. }
  46. .admin-badge {
  47. background: #2196f3;
  48. color: white;
  49. padding: 2px 8px;
  50. border-radius: 12px;
  51. font-size: 0.75rem;
  52. margin-left: 0.5rem;
  53. }
  54. .comment-date {
  55. color: #6c757d;
  56. font-size: 0.875rem;
  57. }
  58. .comment-content {
  59. color: #495057;
  60. line-height: 1.6;
  61. margin-bottom: 1rem;
  62. }
  63. .reply-info {
  64. color: #6c757d;
  65. font-style: italic;
  66. margin-top: 0.5rem;
  67. }
  68. .no-comments {
  69. text-align: center;
  70. color: #6c757d;
  71. font-style: italic;
  72. padding: 2rem;
  73. background: #f8f9fa;
  74. border-radius: 8px;
  75. }
  76. /* Comment Form */
  77. .comment-form-container {
  78. background: #ffffff;
  79. border: 1px solid #e9ecef;
  80. border-radius: 8px;
  81. padding: 2rem;
  82. margin-top: 2rem;
  83. }
  84. .comment-form-container h4 {
  85. margin-bottom: 1.5rem;
  86. color: #333;
  87. }
  88. .comment-form .form-group {
  89. margin-bottom: 1.5rem;
  90. }
  91. .comment-form label {
  92. display: block;
  93. margin-bottom: 0.5rem;
  94. font-weight: 600;
  95. color: #495057;
  96. }
  97. .comment-form input,
  98. .comment-form textarea {
  99. width: 100%;
  100. padding: 0.75rem;
  101. border: 1px solid #ced4da;
  102. border-radius: 4px;
  103. font-size: 1rem;
  104. transition: border-color 0.2s ease, box-shadow 0.2s ease;
  105. }
  106. .comment-form input:focus,
  107. .comment-form textarea:focus {
  108. outline: none;
  109. border-color: #2196f3;
  110. box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
  111. }
  112. .comment-form textarea {
  113. resize: vertical;
  114. min-height: 100px;
  115. }
  116. .comment-form small {
  117. color: #6c757d;
  118. font-size: 0.875rem;
  119. margin-top: 0.25rem;
  120. display: block;
  121. }
  122. /* Captcha Styles */
  123. .captcha-container {
  124. background: #f8f9fa;
  125. border: 1px solid #e9ecef;
  126. border-radius: 4px;
  127. padding: 1rem;
  128. margin-bottom: 1.5rem;
  129. }
  130. .captcha-question {
  131. display: flex;
  132. align-items: center;
  133. gap: 0.5rem;
  134. font-size: 1.1rem;
  135. font-weight: 600;
  136. margin-bottom: 0.5rem;
  137. }
  138. .captcha-numbers {
  139. color: #2196f3;
  140. font-size: 1.2rem;
  141. }
  142. .captcha-operator {
  143. color: #495057;
  144. font-size: 1.1rem;
  145. }
  146. .captcha-equals {
  147. color: #495057;
  148. font-size: 1.1rem;
  149. }
  150. .captcha-input {
  151. width: 80px;
  152. padding: 0.5rem;
  153. border: 1px solid #ced4da;
  154. border-radius: 4px;
  155. text-align: center;
  156. font-size: 1rem;
  157. font-weight: 600;
  158. }
  159. .captcha-input:focus {
  160. outline: none;
  161. border-color: #2196f3;
  162. box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
  163. }
  164. .captcha-help {
  165. color: #6c757d;
  166. font-size: 0.875rem;
  167. font-style: italic;
  168. }
  169. /* Form Actions */
  170. .form-actions {
  171. display: flex;
  172. gap: 1rem;
  173. align-items: center;
  174. }
  175. .form-actions .btn {
  176. padding: 0.75rem 1.5rem;
  177. border: none;
  178. border-radius: 4px;
  179. font-size: 1rem;
  180. cursor: pointer;
  181. transition: background-color 0.2s ease, transform 0.1s ease;
  182. }
  183. .form-actions .btn:disabled {
  184. opacity: 0.6;
  185. cursor: not-allowed;
  186. }
  187. .form-actions .btn:hover:not(:disabled) {
  188. transform: translateY(-1px);
  189. }
  190. .btn-primary {
  191. background: #2196f3;
  192. color: white;
  193. }
  194. .btn-primary:hover:not(:disabled) {
  195. background: #1976d2;
  196. }
  197. .btn-secondary {
  198. background: #6c757d;
  199. color: white;
  200. }
  201. .btn-secondary:hover {
  202. background: #5a6268;
  203. }
  204. /* Alert Messages */
  205. .alert {
  206. padding: 1rem;
  207. border-radius: 4px;
  208. margin-bottom: 1rem;
  209. border: 1px solid transparent;
  210. }
  211. .alert-success {
  212. background: #d4edda;
  213. color: #155724;
  214. border-color: #c3e6cb;
  215. }
  216. .alert-error {
  217. background: #f8d7da;
  218. color: #721c24;
  219. border-color: #f5c6cb;
  220. }
  221. .alert-warning {
  222. background: #fff3cd;
  223. color: #856404;
  224. border-color: #ffeaa7;
  225. }
  226. /* Responsive Design */
  227. @media (max-width: 768px) {
  228. .comment-header {
  229. flex-direction: column;
  230. align-items: flex-start;
  231. }
  232. .comment-form-container {
  233. padding: 1rem;
  234. }
  235. .form-actions {
  236. flex-direction: column;
  237. align-items: stretch;
  238. }
  239. .captcha-question {
  240. font-size: 1rem;
  241. }
  242. .captcha-numbers {
  243. font-size: 1.1rem;
  244. }
  245. }
  246. /* Reply Button Styles */
  247. .reply-btn {
  248. background: #28a745;
  249. color: white;
  250. border: none;
  251. padding: 0.25rem 0.75rem;
  252. border-radius: 4px;
  253. font-size: 0.875rem;
  254. cursor: pointer;
  255. transition: background-color 0.2s ease;
  256. }
  257. .reply-btn:hover {
  258. background: #218838;
  259. }
  260. /* Comment Count Animation */
  261. .comments-section h3 {
  262. transition: color 0.3s ease;
  263. }
  264. .comments-section h3.updated {
  265. color: #28a745;
  266. }
  267. /* Loading State */
  268. .loading {
  269. opacity: 0.6;
  270. pointer-events: none;
  271. }
  272. .loading .btn {
  273. position: relative;
  274. }
  275. .loading .btn::after {
  276. content: '';
  277. position: absolute;
  278. top: 50%;
  279. left: 50%;
  280. width: 16px;
  281. height: 16px;
  282. margin: -8px 0 0 -8px;
  283. border: 2px solid transparent;
  284. border-top: 2px solid currentColor;
  285. border-radius: 50%;
  286. animation: spin 1s linear infinite;
  287. }
  288. @keyframes spin {
  289. 0% { transform: rotate(0deg); }
  290. 100% { transform: rotate(360deg); }
  291. }