Krishya | affe810 | 2025-06-08 00:44:46 +0800 | [diff] [blame] | 1 | /* CommentForm.css */ |
| 2 | .comment-form-container { |
| 3 | margin-top: 1rem; |
| 4 | padding: 1rem; |
| 5 | background-color: #f8f4e9; /* 米白色背景 */ |
| 6 | border-radius: 8px; |
| 7 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| 8 | transition: all 0.3s ease; |
| 9 | } |
| 10 | |
| 11 | .comment-form { |
| 12 | display: flex; |
| 13 | flex-direction: column; |
| 14 | } |
| 15 | |
| 16 | .form-group { |
| 17 | position: relative; |
| 18 | margin-bottom: 1rem; |
| 19 | } |
| 20 | |
| 21 | .comment-input { |
| 22 | width: 100%; |
| 23 | min-height: 80px; |
| 24 | padding: 1rem; |
| 25 | border: 1px solid #e6d5b8; /* 米棕色边框 */ |
| 26 | border-radius: 6px; |
| 27 | background-color: #fff; |
| 28 | font-size: 1rem; |
| 29 | line-height: 1.5; |
| 30 | resize: vertical; |
| 31 | transition: all 0.3s ease; |
| 32 | outline: none; |
| 33 | } |
| 34 | |
| 35 | .comment-input:focus { |
| 36 | border-color: #d4a5a5; /* 粉色边框 */ |
| 37 | box-shadow: 0 0 0 3px rgba(212, 165, 165, 0.2); /* 粉色阴影 */ |
| 38 | } |
| 39 | |
| 40 | .floating-label { |
| 41 | position: absolute; |
| 42 | top: -8px; |
| 43 | left: 12px; |
| 44 | padding: 0 4px; |
| 45 | background-color: #fff; |
| 46 | color: #8c7a51; /* 深棕色文本 */ |
| 47 | font-size: 0.875rem; |
| 48 | transition: all 0.2s ease; |
| 49 | pointer-events: none; |
| 50 | opacity: 0; |
| 51 | transform: translateY(10px); |
| 52 | } |
| 53 | |
| 54 | .form-group.focused .floating-label, |
| 55 | .comment-input:not(:placeholder-shown) + .floating-label { |
| 56 | opacity: 1; |
| 57 | transform: translateY(0); |
| 58 | } |
| 59 | |
| 60 | .form-actions { |
| 61 | display: flex; |
| 62 | justify-content: flex-end; |
| 63 | gap: 0.75rem; |
| 64 | } |
| 65 | |
| 66 | .cancel-button, |
| 67 | .submit-button { |
| 68 | padding: 0.5rem 1.25rem; |
| 69 | border: none; |
| 70 | border-radius: 4px; |
| 71 | font-size: 0.9rem; |
| 72 | font-weight: 500; |
| 73 | cursor: pointer; |
| 74 | transition: all 0.3s ease; |
| 75 | } |
| 76 | |
| 77 | .cancel-button { |
| 78 | background-color: transparent; |
| 79 | color: #8c7a51; /* 深棕色文本 */ |
| 80 | } |
| 81 | |
| 82 | .cancel-button:hover { |
| 83 | background-color: #f5f5f5; |
| 84 | } |
| 85 | |
| 86 | .submit-button { |
| 87 | background-color: #d4a5a5; /* 粉色背景 */ |
| 88 | color: #fff; |
| 89 | } |
| 90 | |
| 91 | .submit-button:hover { |
| 92 | background-color: #c28d8d; /* 深粉色 */ |
| 93 | transform: translateY(-1px); |
| 94 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); |
| 95 | } |
| 96 | |
| 97 | .submit-button:disabled { |
| 98 | background-color: #e6d5b8; /* 米棕色 */ |
| 99 | cursor: not-allowed; |
| 100 | } |