diff --git a/assets/css/form.css b/assets/css/form.css index ba48d77..1a37180 100644 --- a/assets/css/form.css +++ b/assets/css/form.css @@ -27,6 +27,123 @@ --umzug-transition: 0.2s ease; } +/* ===== Color Palettes ===== */ + +/* Palette A: Deep Teal — Grounded Confidence */ +.palette-a.umzugsliste-wizard { + --umzug-primary: #1F7A7A; + --umzug-primary-light: rgba(31, 122, 122, 0.2); + --umzug-primary-dark: #155858; + --umzug-success: #4A7C59; + --umzug-success-light: rgba(74, 124, 89, 0.1); + --umzug-error: #C14E3A; + --umzug-error-light: #FCEAE6; + --umzug-bg: #FAF8F5; + --umzug-surface: #FFFFFF; + --umzug-border: #D4CEC4; + --umzug-text: #3E2E28; + --umzug-text-secondary: #6B5D56; +} + +.palette-a .room-totals { + background: #F5F2ED; +} + +.palette-a .wizard-btn-back:hover { + background: #F2EFEA; + color: var(--umzug-text); +} + +.palette-a .wizard-btn-submit:hover { + background: #3D6A4A; +} + +body.umzugsliste-standalone:has(.palette-a) { + background: #FAF8F5; +} + +/* Palette B: Slate Blue & Amber — Modern Logistics */ +.palette-b.umzugsliste-wizard { + --umzug-primary: #4A6FA5; + --umzug-primary-light: rgba(74, 111, 165, 0.2); + --umzug-primary-dark: #2F4668; + --umzug-success: #52A07B; + --umzug-success-light: rgba(82, 160, 123, 0.1); + --umzug-error: #D15847; + --umzug-error-light: #FDEAE8; + --umzug-bg: #F5F7FA; + --umzug-surface: #FFFFFF; + --umzug-border: #D8DFE8; + --umzug-text: #1A2332; + --umzug-text-secondary: #5F6B7A; +} + +.palette-b .room-totals { + background: #EDF0F5; +} + +.palette-b .wizard-btn-back:hover { + background: #ECEFF4; + color: var(--umzug-text); +} + +.palette-b .wizard-btn-submit:hover { + background: #448A69; +} + +.palette-b .wizard-btn-next { + background: #E8A63C; +} + +.palette-b .wizard-btn-next:hover { + background: #D69529; +} + +body.umzugsliste-standalone:has(.palette-b) { + background: #F5F7FA; +} + +/* Palette C: Rich Olive & Copper — Heritage & Motion */ +.palette-c.umzugsliste-wizard { + --umzug-primary: #5C6E54; + --umzug-primary-light: rgba(92, 110, 84, 0.2); + --umzug-primary-dark: #3D4738; + --umzug-success: #6B9F6F; + --umzug-success-light: rgba(107, 159, 111, 0.1); + --umzug-error: #B85A3D; + --umzug-error-light: #F8EDE8; + --umzug-bg: #F8F6F1; + --umzug-surface: #FEFDFB; + --umzug-border: #D9D3C8; + --umzug-text: #2F3126; + --umzug-text-secondary: #6B6E64; +} + +.palette-c .room-totals { + background: #F0EDE6; +} + +.palette-c .wizard-btn-back:hover { + background: #F0EDE6; + color: var(--umzug-text); +} + +.palette-c .wizard-btn-submit:hover { + background: #5A8A5E; +} + +.palette-c .wizard-btn-next { + background: #C17E5D; +} + +.palette-c .wizard-btn-next:hover { + background: #A96A4B; +} + +body.umzugsliste-standalone:has(.palette-c) { + background: #F8F6F1; +} + /* ===== Reset & Base ===== */ .umzugsliste-standalone { margin: 0; @@ -132,7 +249,7 @@ font-size: 0.8rem; font-weight: 600; color: var(--umzug-text-secondary); - transition: all var(--umzug-transition); + transition: background var(--umzug-transition), border-color var(--umzug-transition), color var(--umzug-transition); } .dot-label { @@ -167,6 +284,14 @@ font-size: 0; } +/* ===== Step Counter ===== */ +.progress-counter { + text-align: center; + font-size: 0.8rem; + color: var(--umzug-text-secondary); + margin-bottom: 16px; +} + /* ===== Running Totals Bar ===== */ .running-totals { position: sticky; @@ -175,17 +300,24 @@ right: 0; z-index: 100; background: var(--umzug-surface); - border-top: 3px solid var(--umzug-primary); + border: 1px solid var(--umzug-border); + border-radius: var(--umzug-radius); padding: 12px 20px; + margin-bottom: 12px; text-align: center; font-size: 0.95rem; font-weight: 500; - box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); - display: none; + box-shadow: var(--umzug-shadow-lg); + transform: translateY(100%); + opacity: 0; + transition: transform 0.3s, opacity 0.3s; + pointer-events: none; } .running-totals.visible { - display: block; + transform: translateY(0); + opacity: 1; + pointer-events: auto; } .running-totals-label { @@ -219,10 +351,30 @@ to { opacity: 1; transform: translateY(0); } } +@keyframes slideInForward { + from { opacity: 0; transform: translateX(30px); } + to { opacity: 1; transform: translateX(0); } +} + +@keyframes slideInBackward { + from { opacity: 0; transform: translateX(-30px); } + to { opacity: 1; transform: translateX(0); } +} + +.wizard-step.active.forward { + animation: slideInForward 0.3s ease; +} + +.wizard-step.active.backward { + animation: slideInBackward 0.3s ease; +} + .step-title { font-size: 1.5rem; font-weight: 700; - margin: 0 0 20px; + margin: 0 0 16px; + padding-bottom: 12px; + border-bottom: 1px solid var(--umzug-border); color: var(--umzug-text); } @@ -245,6 +397,32 @@ border-bottom: 1px solid var(--umzug-border); } +/* ===== Step Sections (inner dividers within a step-card) ===== */ +.step-section { + padding-top: 16px; + margin-top: 16px; + border-top: 1px solid var(--umzug-border); +} + +.step-section:first-of-type { + border-top: none; + padding-top: 0; + margin-top: 0; +} + +/* ===== Address Sections (grid items within step-card) ===== */ +.address-section { + background: var(--umzug-surface); + border: 1px solid var(--umzug-border); + border-radius: var(--umzug-radius); + padding: 16px 20px; +} + +/* Summary sections inside step-card: lighter treatment */ +.step-card #wizard-summary .summary-section { + box-shadow: none; +} + /* ===== Date Selector ===== */ .date-selector { display: flex; @@ -287,7 +465,7 @@ font-size: 0.8rem; color: var(--umzug-text-secondary); margin-top: 12px; - margin-bottom: 0; + margin-bottom: 16px; } .privacy-note a { @@ -394,27 +572,78 @@ gap: 12px; padding: 8px 0; border-bottom: 1px solid #f0f0f0; + opacity: 0.55; + transition: opacity 0.2s; +} + +.furniture-item.has-quantity, +.furniture-item:hover, +.furniture-item:focus-within { + opacity: 1; +} + +.furniture-item .montage-toggle { + display: none; +} + +.furniture-item.has-quantity .montage-toggle { + display: flex; } .furniture-item:last-of-type { border-bottom: none; } -.quantity-input { - width: 56px; - height: 36px; - padding: 0 8px; +.quantity-stepper { + display: inline-flex; + align-items: center; border: 1px solid var(--umzug-border); - border-radius: var(--umzug-radius-sm); + border-radius: var(--umzug-radius); + overflow: hidden; + flex-shrink: 0; +} + +.qty-btn { + width: 36px; + height: 36px; + border: none; + background: var(--umzug-bg); + font-size: 1.1rem; + font-weight: 600; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + transition: background var(--umzug-transition); + color: var(--umzug-text); + padding: 0; + line-height: 1; +} + +.qty-btn:hover { + background: var(--umzug-border); +} + +.qty-btn:active { + background: var(--umzug-primary-light); +} + +.quantity-stepper .quantity-input { + border: none; + border-left: 1px solid var(--umzug-border); + border-right: 1px solid var(--umzug-border); + border-radius: 0; + width: 48px; + height: 36px; + padding: 0 4px; font-size: 0.95rem; text-align: center; - flex-shrink: 0; color: var(--umzug-text); background: var(--umzug-surface); transition: border-color var(--umzug-transition), box-shadow var(--umzug-transition); } -.quantity-input:focus { +.quantity-stepper .quantity-input:focus { outline: none; border-color: var(--umzug-primary); box-shadow: 0 0 0 3px var(--umzug-primary-light); @@ -432,9 +661,9 @@ } .item-cbm { - width: 52px; + width: 75px; text-align: right; - font-size: 0.85rem; + font-size: 13px; color: var(--umzug-text-secondary); flex-shrink: 0; } @@ -446,7 +675,14 @@ } .montage-toggle .radio-label { - font-size: 0.8rem; + font-size: 13px; +} + +.montage-label { + font-size: 13px; + font-weight: 600; + color: var(--umzug-text-secondary); + white-space: nowrap; } /* ===== Room Totals ===== */ @@ -547,6 +783,98 @@ box-shadow: 0 0 0 3px var(--umzug-primary-light); } +/* ===== Step 8 Design ===== */ +.additional-field input[type="checkbox"] { + accent-color: var(--umzug-primary); +} + +.wizard-step[data-step="8"] .additional-field { + padding: 8px 0; + background: transparent; + border: none; + border-bottom: 1px solid #f0f0f0; + border-radius: 0; + opacity: 0.55; + transition: opacity 0.2s; +} + +.wizard-step[data-step="8"] .additional-field:last-child { + border-bottom: none; +} + +.wizard-step[data-step="8"] .additional-field:hover, +.wizard-step[data-step="8"] .additional-field:focus-within, +.wizard-step[data-step="8"] .additional-field:has(input:checked), +.wizard-step[data-step="8"] .additional-field:has(.qty-small:not(:placeholder-shown)) { + opacity: 1; +} + +.wizard-step[data-step="8"] .additional-field-abbau .radio-group { + display: inline-flex; + gap: 16px; + background: transparent; + border: none; + border-radius: 0; + padding: 0; +} + +.wizard-step[data-step="8"] .additional-field-abbau .radio-label { + padding: 0; + font-size: 0.9rem; +} + +.wizard-step[data-step="8"] .additional-field-abbau .radio-label input[type="radio"] { + position: static; + opacity: 1; + width: auto; + height: auto; + margin: 0; +} + +/* ===== Dev Auto-Fill ===== */ +.dev-autofill-btn { + position: fixed; + bottom: 60px; + right: 16px; + z-index: 300; + background: #ff6b35; + color: #fff; + border: none; + border-radius: 20px; + padding: 6px 14px; + font-size: 0.75rem; + font-weight: 600; + cursor: pointer; + opacity: 0.6; + transition: opacity var(--umzug-transition); +} + +.dev-autofill-btn:hover { + opacity: 1; +} + +/* ===== Palette Switcher (WP_DEBUG) ===== */ +.dev-palette-btn { + position: fixed; + bottom: 90px; + right: 16px; + z-index: 300; + background: #7c3aed; + color: #fff; + border: none; + border-radius: 20px; + padding: 6px 14px; + font-size: 0.75rem; + font-weight: 600; + cursor: pointer; + opacity: 0.6; + transition: opacity var(--umzug-transition); +} + +.dev-palette-btn:hover { + opacity: 1; +} + /* ===== Sonstiges ===== */ .sonstiges-textarea { width: 100%; @@ -619,7 +947,7 @@ } #wizard-summary .summary-item-cbm { - width: 60px; + width: 80px; text-align: right; color: var(--umzug-text-secondary); } @@ -630,6 +958,19 @@ font-size: 0.8rem; } +.summary-edit { + float: right; + font-size: 0.8rem; + font-weight: 500; + color: var(--umzug-primary); + cursor: pointer; + text-decoration: none; +} + +.summary-edit:hover { + text-decoration: underline; +} + #wizard-summary .summary-grand-total { background: var(--umzug-primary); color: #fff; @@ -730,7 +1071,8 @@ flex-basis: calc(100% - 80px); } - .quantity-input { + .quantity-input, + .quantity-stepper { order: 2; } @@ -745,6 +1087,15 @@ padding-left: 0; } + .montage-label { + flex-basis: 100%; + margin-bottom: -4px; + } + + .wizard-step[data-step="8"] .additional-field { + padding: 6px 0; + } + .additional-field-abbau { flex-direction: column; align-items: flex-start; @@ -769,18 +1120,34 @@ font-size: 0.95rem; } + .progress-dot { + min-width: 44px; + min-height: 44px; + display: flex; + align-items: center; + justify-content: center; + } + .dot-label { display: none; } + .progress-dot.active .dot-label { + display: block; + font-size: 0.6rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + .dot-number { - width: 28px; - height: 28px; + width: 36px; + height: 36px; font-size: 0.7rem; } .progress-track { - top: 14px; + top: 18px; } } diff --git a/assets/js/form.js b/assets/js/form.js index 687990f..ffe8e82 100644 --- a/assets/js/form.js +++ b/assets/js/form.js @@ -48,14 +48,20 @@ function showStep(n) { if (n < 1 || n > TOTAL_STEPS) return; - // Hide all steps + // Determine direction + var direction = n > currentStep ? 'forward' : 'backward'; + + // Hide all steps and remove direction classes qsa('.wizard-step').forEach(function(el) { - el.classList.remove('active'); + el.classList.remove('active', 'forward', 'backward'); }); - // Show target step + // Show target step with direction var target = qs('.wizard-step[data-step="' + n + '"]'); - if (target) target.classList.add('active'); + if (target) { + target.classList.add(direction); + target.classList.add('active'); + } currentStep = n; if (n > highestStep) highestStep = n; @@ -103,6 +109,12 @@ var pct = ((highestStep - 1) / (TOTAL_STEPS - 1)) * 100; fill.style.width = pct + '%'; } + + // Update step counter + var counter = qs('#progress-counter'); + if (counter) { + counter.textContent = (l10n.stepLabel || 'Step') + ' ' + currentStep + ' ' + (l10n.stepOf || 'of') + ' ' + TOTAL_STEPS; + } } function updateNavButtons() { @@ -271,6 +283,11 @@ // ===== Summary Generation ===== + function summaryHeading(text, gotoStep) { + var editLabel = escHtml(l10n.summaryEdit || 'Edit'); + return '
' + escHtml(sonstiges) + '
'; html += '