| /* CommentForm.css */ |
| .comment-form-container { |
| margin-top: 1rem; |
| padding: 1rem; |
| background-color: #f8f4e9; /* 米白色背景 */ |
| border-radius: 8px; |
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| transition: all 0.3s ease; |
| } |
| |
| .comment-form { |
| display: flex; |
| flex-direction: column; |
| } |
| |
| .form-group { |
| position: relative; |
| margin-bottom: 1rem; |
| } |
| |
| .comment-input { |
| width: 100%; |
| min-height: 80px; |
| padding: 1rem; |
| border: 1px solid #e6d5b8; /* 米棕色边框 */ |
| border-radius: 6px; |
| background-color: #fff; |
| font-size: 1rem; |
| line-height: 1.5; |
| resize: vertical; |
| transition: all 0.3s ease; |
| outline: none; |
| } |
| |
| .comment-input:focus { |
| border-color: #d4a5a5; /* 粉色边框 */ |
| box-shadow: 0 0 0 3px rgba(212, 165, 165, 0.2); /* 粉色阴影 */ |
| } |
| |
| .floating-label { |
| position: absolute; |
| top: -8px; |
| left: 12px; |
| padding: 0 4px; |
| background-color: #fff; |
| color: #8c7a51; /* 深棕色文本 */ |
| font-size: 0.875rem; |
| transition: all 0.2s ease; |
| pointer-events: none; |
| opacity: 0; |
| transform: translateY(10px); |
| } |
| |
| .form-group.focused .floating-label, |
| .comment-input:not(:placeholder-shown) + .floating-label { |
| opacity: 1; |
| transform: translateY(0); |
| } |
| |
| .form-actions { |
| display: flex; |
| justify-content: flex-end; |
| gap: 0.75rem; |
| } |
| |
| .cancel-button, |
| .submit-button { |
| padding: 0.5rem 1.25rem; |
| border: none; |
| border-radius: 4px; |
| font-size: 0.9rem; |
| font-weight: 500; |
| cursor: pointer; |
| transition: all 0.3s ease; |
| } |
| |
| .cancel-button { |
| background-color: transparent; |
| color: #8c7a51; /* 深棕色文本 */ |
| } |
| |
| .cancel-button:hover { |
| background-color: #f5f5f5; |
| } |
| |
| .submit-button { |
| background-color: #d4a5a5; /* 粉色背景 */ |
| color: #fff; |
| } |
| |
| .submit-button:hover { |
| background-color: #c28d8d; /* 深粉色 */ |
| transform: translateY(-1px); |
| box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); |
| } |
| |
| .submit-button:disabled { |
| background-color: #e6d5b8; /* 米棕色 */ |
| cursor: not-allowed; |
| } |