Files
2026-02-10 17:22:53 +08:00

424 lines
7.7 KiB
Plaintext

/** pages/plant-detail/edit/index.wxss **/
page {
height: 100%;
overflow: hidden;
}
.add-plant-page {
background-color: #F4F6F0;
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
.page-content {
height: calc(100vh - 140rpx - env(safe-area-inset-bottom));
padding: 24rpx 32rpx;
background: #F4F6F0;
box-sizing: border-box;
}
::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
}
/* ======== Upload Section ======== */
.upload-section {
margin: 0 0 24rpx;
display: flex;
justify-content: center;
}
.image-upload-area {
width: 100%;
height: 240rpx;
border-radius: 28rpx;
border: 4rpx dashed #C5E1A5;
background: #FAFFF5;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
transition: all 0.2s;
}
.image-upload-area:active { opacity: 0.9; }
.image-upload-area.has-image {
border: none;
height: 360rpx;
}
.image-upload-area .uploaded-img {
width: 100%;
height: 100%;
}
.upload-placeholder {
display: flex;
flex-direction: column;
align-items: center;
gap: 16rpx;
}
.upload-placeholder text {
color: #9CA3AF;
font-size: 26rpx;
}
.edit-overlay {
position: absolute;
bottom: 24rpx;
right: 24rpx;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(10rpx);
padding: 12rpx 24rpx;
border-radius: 30rpx;
display: flex;
align-items: center;
gap: 8rpx;
color: #FFF;
font-size: 24rpx;
font-weight: 500;
}
/* ======== Section Cards ======== */
.form-section {
background: #FFFFFF;
border-radius: 28rpx;
padding: 32rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.03);
}
.section-title-bar {
display: flex;
align-items: center;
gap: 12rpx;
margin-bottom: 28rpx;
}
.section-dot {
width: 8rpx;
height: 32rpx;
border-radius: 4rpx;
background: linear-gradient(180deg, #558B2F, #689F38);
}
.section-title-text {
font-size: 30rpx;
font-weight: 700;
color: #1F2937;
flex: 1;
}
/* ======== Form Fields ======== */
.form-group {
margin-bottom: 28rpx;
}
.form-group:last-child {
margin-bottom: 0;
}
.field-label {
display: block;
font-size: 26rpx;
font-weight: 600;
color: #374151;
margin-bottom: 12rpx;
}
.custom-input-box {
background: #F9FAFB;
border: 2rpx solid #E5E7EB;
border-radius: 20rpx;
padding: 22rpx 28rpx;
color: #1F2937;
font-size: 28rpx;
transition: all 0.2s;
}
.custom-input-box:focus-within {
background: #FFFFFF;
border-color: #558B2F;
box-shadow: 0 0 0 4rpx rgba(85, 139, 47, 0.1);
}
.input-placeholder { color: #9CA3AF; }
.native-input {
width: 100%;
height: 100%;
}
.picker-box {
display: flex;
justify-content: space-between;
align-items: center;
}
/* Two-column layout */
.form-row {
display: flex;
gap: 20rpx;
margin-bottom: 28rpx;
}
.form-row:last-child {
margin-bottom: 0;
}
.form-group.half {
flex: 1;
margin-bottom: 0;
}
/* ======== Care Plan Section ======== */
.add-task-btn-small {
font-size: 24rpx;
color: #558B2F;
background: #F1F8E9;
border: 2rpx dashed #A5D6A7;
padding: 10rpx 20rpx;
border-radius: 16rpx;
display: flex;
align-items: center;
gap: 6rpx;
margin-left: auto;
}
.add-task-btn-small:active {
background: #E8F5E9;
}
/* Care empty state */
.care-empty {
display: flex;
flex-direction: column;
align-items: center;
padding: 48rpx 0 16rpx;
gap: 16rpx;
}
.care-empty-text {
font-size: 24rpx;
color: #9CA3AF;
}
.care-list-styled {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.care-row-styled {
display: flex;
align-items: center;
gap: 12rpx;
position: relative;
}
/* New task highlight */
.care-row-new {
background: #FAFFF5;
border: 2rpx dashed #C5E1A5;
border-radius: 24rpx;
padding: 12rpx;
margin: -12rpx;
margin-bottom: 0;
}
.new-badge {
position: absolute;
top: -4rpx;
right: -4rpx;
background: linear-gradient(135deg, #558B2F, #689F38);
color: #fff;
font-size: 18rpx;
font-weight: 700;
padding: 2rpx 12rpx;
border-radius: 12rpx 24rpx 12rpx 12rpx;
z-index: 1;
}
.care-input-col.task-col { flex: 1; }
.care-input-col.freq-col { flex-shrink: 0; }
.small-box {
padding: 20rpx;
background: #F9FAFB;
}
.flex-row {
display: flex;
align-items: center;
padding-right: 16rpx;
}
.center-text { text-align: center; }
.suffix-text {
color: #9CA3AF;
font-size: 26rpx;
font-weight: 500;
}
/* Care Icon Button */
.care-icon-btn {
width: 80rpx;
height: 80rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.2s;
}
.care-icon-btn:active { transform: scale(0.95); }
.delete-btn-pink {
width: 80rpx;
height: 80rpx;
background: #FFF5F5;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
color: #EF5350;
flex-shrink: 0;
transition: all 0.15s;
}
.delete-btn-pink:active {
background: #FFEBEE;
transform: scale(0.95);
}
/* ======== Delete Plant ======== */
.delete-page-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
color: #EF5350;
font-size: 28rpx;
font-weight: 500;
padding: 24rpx;
border: 2rpx solid #FFCDD2;
border-radius: 24rpx;
background: #FFF9F9;
}
.delete-page-btn:active { background: #FFEBEE; }
/* ======== Footer ======== */
.page-footer {
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: 24rpx 32rpx calc(24rpx + env(safe-area-inset-bottom));
background: white;
z-index: 100;
box-shadow: 0 -4rpx 16rpx rgba(0,0,0,0.03);
}
.page-footer t-button {
--td-button-font-weight: 600;
--td-button-primary-bg-color: #558B2F;
--td-button-primary-border-color: #558B2F;
box-shadow: 0 8rpx 32rpx rgba(85, 139, 47, 0.3);
}
/* ======== Icon Picker Popup ======== */
.icon-picker-mask {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: all 0.3s;
}
.icon-picker-mask.show {
opacity: 1;
visibility: visible;
}
.icon-picker-popup {
position: fixed;
left: 0; right: 0; bottom: 0;
background: #fff;
border-radius: 32rpx 32rpx 0 0;
z-index: 1001;
transform: translateY(100%);
transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
padding-bottom: env(safe-area-inset-bottom);
}
.icon-picker-popup.show { transform: translateY(0); }
.icon-picker-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 40rpx;
border-bottom: 2rpx solid #f5f5f5;
}
.icon-picker-title {
font-size: 34rpx;
font-weight: 600;
color: #333;
}
.icon-picker-close {
width: 64rpx;
height: 64rpx;
display: flex;
align-items: center;
justify-content: center;
}
.icon-picker-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 24rpx;
padding: 32rpx 40rpx;
max-height: 60vh;
overflow-y: auto;
}
.icon-picker-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 12rpx;
padding: 20rpx 0;
}
.icon-picker-item:active { opacity: 0.7; }
.icon-circle {
width: 96rpx;
height: 96rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
}
.icon-name {
font-size: 24rpx;
color: #666;
}