Files
2026-04-28 10:36:51 +08:00

952 lines
16 KiB
Plaintext

/** pages/plant-detail/index.wxss **/
page {
height: 100%;
overflow: hidden;
}
.plant-detail {
background-color: #F4F6F0;
height: 100vh;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Header */
.detail-header {
position: relative;
height: 500rpx;
overflow: hidden;
}
.settings-btn-detail {
position: absolute;
top: 88rpx;
right: 32rpx;
z-index: 100;
background: rgba(255, 255, 255, 0.85);
backdrop-filter: blur(10px);
border: 2rpx solid rgba(255, 255, 255, 0.5);
width: 88rpx;
height: 88rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.1);
}
.settings-btn-detail:active {
transform: scale(0.92);
}
.header-gallery {
height: 500rpx;
position: relative;
}
.header-gradient {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 240rpx;
background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.6));
pointer-events: none;
z-index: 10;
}
/* Image Counter Badge */
.carousel-counter {
position: absolute;
bottom: 100rpx;
right: 48rpx;
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
color: white;
font-size: 22rpx;
font-weight: 600;
padding: 6rpx 18rpx;
border-radius: 12rpx;
z-index: 30;
letter-spacing: 2rpx;
}
.header-info {
position: absolute;
bottom: 80rpx;
left: 48rpx;
right: 48rpx;
z-index: 20;
color: white;
}
.header-title {
font-size: 56rpx;
font-weight: 800;
text-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.3);
display: block;
}
/* Content */
.detail-content {
flex: 1;
background: #F4F6F0;
border-top-left-radius: 64rpx;
border-top-right-radius: 64rpx;
margin-top: -64rpx;
position: relative;
z-index: 30;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Custom Tabs */
.pd-tabs {
display: flex;
padding: 48rpx 48rpx 0;
border-bottom: 2rpx solid rgba(0, 0, 0, 0.05);
background: rgba(255, 255, 255, 0.95);
flex-shrink: 0;
gap: 8rpx;
}
.pd-tab-btn {
flex: 1;
text-align: center;
padding: 24rpx 32rpx;
font-size: 28rpx;
font-weight: 500;
color: #6B7280;
background: none;
border: none;
position: relative;
border-radius: 20rpx 20rpx 0 0;
transition: all 0.3s ease;
}
.pd-tab-btn.active {
color: #2E7D32;
font-weight: 700;
background: rgba(85, 139, 47, 0.06);
}
.pd-tab-btn.active::after {
content: '';
position: absolute;
bottom: -2rpx;
left: 20%;
right: 20%;
height: 6rpx;
background: linear-gradient(90deg, #689F38, #33691E);
border-radius: 4rpx;
transition: all 0.3s ease;
}
/* Content Area */
.pd-content {
flex: 1;
overflow-y: auto;
padding: 48rpx;
padding-bottom: 48rpx;
-webkit-overflow-scrolling: touch;
}
/* Hide scrollbar for pd-content */
.pd-content::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
.fadeIn {
animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Section Title */
.section-title {
margin-bottom: 32rpx;
}
.h3 {
font-size: 34rpx;
font-weight: 800;
color: #263238;
}
/* Care Log List - Timeline Style */
.care-log-list {
display: flex;
flex-direction: column;
gap: 0;
margin-bottom: 40rpx;
position: relative;
padding-left: 20rpx;
}
.care-log-list::before {
content: '';
position: absolute;
left: 6rpx;
top: 32rpx;
bottom: 32rpx;
width: 3rpx;
background: linear-gradient(to bottom, #C8E6C9, #E8F5E9);
border-radius: 2rpx;
}
.care-log-item {
background: white;
border-radius: 32rpx;
padding: 32rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
position: relative;
margin-bottom: 20rpx;
margin-left: 24rpx;
transition: transform 0.2s ease;
}
.care-log-item::before {
content: '';
position: absolute;
left: -30rpx;
top: 40rpx;
width: 14rpx;
height: 14rpx;
background: #81C784;
border-radius: 50%;
border: 4rpx solid #F4F6F0;
z-index: 1;
}
.care-log-item:active {
transform: scale(0.98);
}
.log-left {
display: flex;
align-items: center;
gap: 24rpx;
}
.log-date-v {
display: flex;
flex-direction: column;
align-items: center;
min-width: 80rpx;
border-right: 2rpx solid #F0F0F0;
padding-right: 24rpx;
}
.l-day {
font-size: 36rpx;
font-weight: 700;
color: #333;
}
.l-month {
font-size: 22rpx;
color: #999;
}
.log-type-icon {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
background: #FAFAFA;
display: flex;
align-items: center;
justify-content: center;
}
.log-info {
flex: 1;
}
.log-header-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8rpx;
}
.log-type-name {
font-weight: 600;
font-size: 30rpx;
color: #333;
}
.log-time {
font-size: 24rpx;
color: #999;
}
.log-remark {
font-size: 26rpx;
color: #666;
margin: 0;
line-height: 1.4;
}
/* Load More Button */
.load-more-btn {
width: 100%;
padding: 24rpx;
margin-top: 24rpx;
background: #f5f5f5;
border: 2rpx dashed #e0e0e0;
border-radius: 24rpx;
color: #666;
font-size: 28rpx;
font-weight: 500;
display: flex;
justify-content: center;
align-items: center;
gap: 8rpx;
}
.load-more-btn:active {
background: #EEEEEE;
color: #558B2F;
border-color: #558B2F;
}
/* Archive View */
.archive-view {
padding: 0;
}
/* Identity Card */
.archive-identity-card {
background: white;
border-radius: 40rpx;
padding: 48rpx;
margin-bottom: 48rpx;
box-shadow: 0 16rpx 40rpx rgba(0, 0, 0, 0.06);
border: 2rpx solid rgba(0, 0, 0, 0.02);
text-align: center;
position: relative;
overflow: hidden;
}
.archive-identity-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 10rpx;
background: linear-gradient(90deg, #81C784, #2E7D32, #81C784);
}
.archive-identity-card::after {
content: '🌿';
position: absolute;
top: -20rpx;
right: -10rpx;
font-size: 120rpx;
opacity: 0.08;
transform: rotate(-15deg);
pointer-events: none;
}
.aic-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40rpx;
}
.aic-badge {
background: rgba(255, 255, 255, 0.9);
padding: 12rpx 24rpx;
border-radius: 40rpx;
font-size: 24rpx;
font-weight: 600;
color: #2E7D32;
display: inline-flex;
align-items: center;
gap: 8rpx;
}
.aic-location {
display: flex;
align-items: center;
font-size: 26rpx;
color: #388E3C;
background: rgba(255, 255, 255, 0.6);
padding: 8rpx 20rpx;
border-radius: 24rpx;
gap: 8rpx;
}
.aic-desc-box {
background: #F1F8E9;
padding: 24rpx;
border-radius: 24rpx;
font-size: 26rpx;
color: #33691E;
line-height: 1.5;
text-align: left;
margin-bottom: 32rpx;
}
.aic-stats {
display: flex;
justify-content: space-between;
}
.aic-stat-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
}
.aic-stat-item .label {
font-size: 22rpx;
color: #558B2F;
margin-bottom: 8rpx;
opacity: 0.8;
}
.aic-stat-item .value {
font-size: 32rpx;
font-weight: 700;
color: #1B5E20;
}
.aic-extra-info {
margin-top: 40rpx;
padding-top: 32rpx;
border-top: 1rpx solid rgba(0, 0, 0, 0.05);
display: flex;
flex-direction: column;
gap: 16rpx;
text-align: left;
}
.aic-info-row {
display: flex;
align-items: flex-start;
font-size: 26rpx;
line-height: 1.5;
}
.aic-info-row .label {
color: #558B2F;
font-weight: 600;
width: 140rpx;
flex-shrink: 0;
}
.aic-info-row .value {
color: #455A64;
flex: 1;
}
/* Section Header */
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
}
/* Timeline */
.archive-timeline {
position: relative;
padding-left: 48rpx;
border-left: 4rpx solid transparent;
border-image: linear-gradient(to bottom, #81C784, #C8E6C9, #E8F5E9) 1;
margin-left: 24rpx;
margin-bottom: 80rpx;
}
.timeline-item {
position: relative;
margin-bottom: 48rpx;
}
.timeline-item:last-child {
margin-bottom: 0;
}
.timeline-dot {
position: absolute;
left: -62rpx;
top: 0;
width: 24rpx;
height: 24rpx;
background: white;
border: 6rpx solid #81C784;
border-radius: 50%;
z-index: 1;
box-shadow: 0 0 0 8rpx #F4F6F0;
}
.timeline-item:first-child .timeline-dot {
background: #558B2F;
border-color: #558B2F;
animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse {
0%, 100% { box-shadow: 0 0 0 8rpx #F4F6F0; }
50% { box-shadow: 0 0 0 16rpx rgba(85, 139, 47, 0.15); }
}
.timeline-date {
font-size: 22rpx;
color: #81C784;
margin-bottom: 16rpx;
font-weight: 600;
background: rgba(129, 199, 132, 0.1);
display: inline-block;
padding: 4rpx 16rpx;
border-radius: 8rpx;
}
.timeline-content-box {
background: white;
border-radius: 28rpx;
padding: 32rpx;
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
border: 2rpx solid rgba(0, 0, 0, 0.02);
border-left: 6rpx solid #81C784;
position: relative;
overflow: hidden;
}
.timeline-content-box:active {
transform: scale(0.98);
}
.timeline-title {
font-size: 30rpx;
font-weight: 600;
color: #333;
margin-bottom: 16rpx;
display: flex;
align-items: center;
gap: 16rpx;
}
.timeline-type-badge {
width: 52rpx;
height: 52rpx;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.timeline-desc {
font-size: 28rpx;
color: #546E7A;
line-height: 1.5;
display: block;
margin-bottom: 16rpx;
}
.timeline-img {
border-radius: 24rpx;
margin-top: 16rpx;
overflow: hidden;
}
/* Popup Styles */
.popup-content {
background: white;
border-radius: 48rpx 48rpx 0 0;
padding-bottom: env(safe-area-inset-bottom);
}
.popup-header {
padding: 48rpx;
text-align: center;
}
.popup-title {
font-size: 36rpx;
font-weight: 800;
color: #263238;
}
.form-section {
padding: 0 0 32rpx;
}
.chip-group-td {
padding: 0 32rpx;
display: flex;
flex-wrap: wrap;
gap: 16rpx;
}
/* Edit Modal - Matching Prototype */
.edit-modal {
background: white;
width: 680rpx;
max-width: 90vw;
border-radius: 48rpx;
padding: 48rpx;
box-shadow: 0 20rpx 80rpx rgba(0, 0, 0, 0.2);
animation: modalSlideUp 0.3s ease-out;
max-height: 85vh;
display: flex;
flex-direction: column;
position: relative;
overflow: hidden;
}
@keyframes modalSlideUp {
from {
opacity: 0;
transform: translateY(40rpx);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40rpx;
flex-shrink: 0;
}
.modal-title {
font-size: 40rpx;
font-weight: 700;
color: #333;
}
.close-btn {
width: 64rpx;
height: 64rpx;
background: #f5f5f5;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.close-btn:active {
background: #e0e0e0;
}
.modal-body {
max-height: 55vh;
flex: 1;
overflow-y: auto;
padding-right: 0;
-webkit-overflow-scrolling: touch;
}
/* Hide scrollbar but keep scrollable */
.modal-body::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
/* Form Styles */
.form-group {
margin-bottom: 40rpx;
}
.form-label {
display: block;
font-size: 28rpx;
font-weight: 600;
color: #666;
margin-bottom: 20rpx;
}
.form-input {
width: 100%;
height: 88rpx;
padding: 0 24rpx;
border: 2rpx solid #e0e0e0;
border-radius: 24rpx;
font-size: 30rpx;
box-sizing: border-box;
background: #FAFAFA;
transition: all 0.2s;
display: flex;
align-items: center;
}
.form-input:focus {
background: white;
border-color: #558B2F;
box-shadow: 0 0 0 6rpx rgba(85, 139, 47, 0.1);
}
.date-picker {
display: flex;
justify-content: space-between;
align-items: center;
}
.date-picker .placeholder {
color: #999;
}
/* Modal Footer */
.modal-footer {
margin-top: 40rpx;
flex-shrink: 0;
padding-top: 16rpx;
}
.submit-btn {
width: 100%;
padding: 28rpx;
background: linear-gradient(135deg, #689F38, #558B2F);
border-radius: 32rpx;
color: white;
text-align: center;
font-size: 32rpx;
font-weight: 600;
box-shadow: 0 8rpx 24rpx rgba(85, 139, 47, 0.4);
}
.submit-btn:active {
transform: scale(0.98);
filter: brightness(0.95);
}
/* Keep existing add-btn style */
.add-btn {
background: #558B2F;
color: white;
padding: 16rpx 32rpx;
border-radius: 40rpx;
font-size: 26rpx;
font-weight: 600;
display: flex;
align-items: center;
gap: 12rpx;
box-shadow: 0 8rpx 24rpx rgba(85, 139, 47, 0.3);
}
.add-btn:active {
transform: scale(0.96);
}
/* Care Type Icons */
.icon-water {
color: #2196F3;
background: #E1F5FE;
}
.icon-fertilize {
color: #FFD700;
background: #FFFDE7;
}
.icon-prune {
color: #757575;
background: #F5F5F5;
}
.icon-repot {
color: #8D6E63;
background: #EFEBE9;
}
/* Chip Group */
.chip-group {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
}
.chip {
padding: 16rpx 24rpx;
background: #F5F5F5;
border-radius: 32rpx;
font-size: 26rpx;
color: #666;
display: flex;
align-items: center;
gap: 8rpx;
border: 2rpx solid transparent;
transition: all 0.2s;
}
.chip.active {
background: #E8F5E9;
color: #558B2F;
border-color: #558B2F;
font-weight: 500;
}
.chip:active {
transform: scale(0.96);
}
/* Form Textarea */
.form-textarea {
width: 100%;
min-height: 160rpx;
padding: 24rpx;
border: 2rpx solid #e0e0e0;
border-radius: 24rpx;
font-size: 30rpx;
box-sizing: border-box;
background: #FAFAFA;
line-height: 1.5;
}
.form-textarea:focus {
background: white;
border-color: #558B2F;
box-shadow: 0 0 0 6rpx rgba(85, 139, 47, 0.1);
}
/* Record Image Upload */
.record-image-upload {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
margin-top: 8rpx;
}
.upload-add-btn {
width: 160rpx;
height: 160rpx;
background: #FAFAFA;
border: 2rpx dashed #d9d9d9;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s;
}
.upload-add-btn:active {
background: #F0F0F0;
border-color: #558B2F;
}
.uploaded-image-box {
position: relative;
width: 160rpx;
height: 160rpx;
}
.remove-img-btn {
position: absolute;
top: -12rpx;
right: -12rpx;
width: 36rpx;
height: 36rpx;
background: rgba(0, 0, 0, 0.5);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 10;
backdrop-filter: blur(4rpx);
}
/* Empty State */
.plant-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 64rpx 0;
gap: 32rpx;
background: white;
border-radius: 32rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
}
.plant-empty-img {
width: 200rpx;
height: 200rpx;
opacity: 0.8;
}
.plant-empty-text {
display: flex;
flex-direction: column;
align-items: center;
gap: 12rpx;
font-size: 28rpx;
font-weight: 500;
color: #90A4AE;
}
.delete-plant-box {
display: flex;
align-items: center;
justify-content: center;
gap: 12rpx;
padding: 24rpx;
margin-top: 40rpx;
background: #FFF;
border-radius: 24rpx;
box-shadow: 0 4rpx 12rpx rgba(239, 83, 80, 0.1);
}
.delete-text {
font-size: 28rpx;
color: #EF5350;
font-weight: 500;
}
/* No-image Placeholder */
.header-empty-placeholder {
width: 100%;
height: 500rpx;
background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 50%, #A5D6A7 100%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16rpx;
}
.empty-plant-emoji {
font-size: 120rpx;
opacity: 0.6;
animation: gentleBounce 3s ease-in-out infinite;
}
@keyframes gentleBounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-16rpx); }
}
.empty-photo-hint {
font-size: 26rpx;
color: rgba(46, 125, 50, 0.5);
font-weight: 500;
}