Android_Retail/src/Pages/BookingScreen/WeightscaleApp.scss

376 lines
8.1 KiB
SCSS

.weight-scale-container {
min-height: 100vh;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 20px;
position: fixed;
top: 0;
left: 0;
overflow: auto;
.weight-scale-content {
max-width: 600px;
margin: 0 auto;
.header-card {
background: white;
border-radius: 16px;
padding: 24px;
margin-bottom: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
.header-top {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
h1 {
margin: 0;
font-size: 24px;
color: #333;
}
.connection-status {
display: flex;
align-items: center;
gap: 8px;
.status-dot {
width: 12px;
height: 12px;
border-radius: 50%;
&.connected {
background: #10b981;
box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}
&.disconnected {
background: #ef4444;
box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
}
.status-text {
font-size: 14px;
font-weight: 500;
&.connected {
color: #10b981;
}
&.disconnected {
color: #ef4444;
}
}
}
}
.websocket-info {
margin: 0;
font-size: 13px;
color: #666;
font-family: 'Courier New', monospace;
}
}
.control-card {
background: white;
border-radius: 16px;
padding: 24px;
margin-bottom: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
h2 {
margin: 0 0 16px 0;
font-size: 18px;
color: #333;
}
.button-group {
display: flex;
gap: 12px;
margin-bottom: 16px;
.control-button {
flex: 1;
padding: 14px 20px;
border: none;
border-radius: 12px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
.button-icon {
font-size: 18px;
}
&.start-button {
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
color: white;
&:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}
&:active:not(:disabled) {
transform: translateY(0);
}
&:disabled {
background: #d1d5db;
cursor: not-allowed;
opacity: 0.6;
}
}
&.stop-button {
background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
color: white;
&:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(239, 68, 68, 0.3);
}
&:active:not(:disabled) {
transform: translateY(0);
}
&:disabled {
background: #d1d5db;
cursor: not-allowed;
opacity: 0.6;
}
}
}
}
.service-status {
text-align: center;
padding: 12px;
background: #f9fafb;
border-radius: 8px;
.service-indicator {
font-size: 14px;
font-weight: 500;
&.running {
color: #10b981;
}
&.stopped {
color: #6b7280;
}
}
}
}
.weight-card {
background: white;
border-radius: 16px;
padding: 32px;
margin-bottom: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
.weight-display {
text-align: center;
.weight-value {
display: flex;
align-items: baseline;
justify-content: center;
gap: 8px;
margin-bottom: 16px;
.weight-number {
font-size: 64px;
font-weight: bold;
color: #333;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.weight-unit {
font-size: 32px;
color: #666;
}
}
.weight-meta {
display: flex;
justify-content: center;
align-items: center;
gap: 16px;
.stability-badge {
padding: 6px 12px;
border-radius: 20px;
font-size: 14px;
font-weight: 500;
&.stable {
background: #d1fae5;
color: #065f46;
}
&.measuring {
background: #fef3c7;
color: #92400e;
}
}
.timestamp {
font-size: 14px;
color: #999;
}
}
}
.weight-placeholder {
text-align: center;
padding: 40px 0;
.scale-icon {
font-size: 64px;
margin-bottom: 16px;
}
p {
margin: 0;
color: #666;
font-size: 16px;
}
}
}
.history-card {
background: white;
border-radius: 16px;
padding: 24px;
margin-bottom: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
h2 {
margin: 0 0 16px 0;
font-size: 18px;
color: #333;
}
.history-list {
display: flex;
flex-direction: column;
gap: 8px;
.history-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
background: #f9fafb;
border-radius: 8px;
.history-left {
display: flex;
align-items: center;
gap: 12px;
.history-weight {
font-size: 16px;
font-weight: 500;
color: #333;
font-family: 'Courier New', monospace;
}
.stable-tag {
padding: 2px 8px;
background: #d1fae5;
color: #065f46;
border-radius: 12px;
font-size: 12px;
}
}
.history-time {
font-size: 13px;
color: #999;
}
}
}
}
.instructions-card {
background: white;
border-radius: 16px;
padding: 24px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
h3 {
margin: 0 0 16px 0;
font-size: 18px;
color: #333;
}
p {
margin: 0 0 12px 0;
color: #666;
line-height: 1.5;
&.auto-reconnect {
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid #e5e7eb;
text-align: center;
font-style: italic;
color: #10b981;
font-weight: 500;
}
}
ul {
margin: 0;
padding-left: 20px;
li {
margin: 8px 0;
color: #666;
line-height: 1.5;
}
}
}
}
}
@media (max-width: 640px) {
.weight-scale-container {
padding: 12px;
.weight-scale-content {
.control-card {
.button-group {
flex-direction: column;
.control-button {
width: 100%;
}
}
}
.weight-card .weight-display .weight-value {
.weight-number {
font-size: 48px;
}
.weight-unit {
font-size: 24px;
}
}
}
}
}