diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 9a76a31..298b112 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -61,7 +61,8 @@ export const routes: Routes = [ }, { path: 'decisions/:decisionId/edit', - loadComponent: () => import('./components/decision-form/decision-form.component').then(m => m.DecisionFormComponent) + redirectTo: 'decisions', + pathMatch: 'full' }, { path: '', redirectTo: 'decisions', pathMatch: 'full' } ] diff --git a/src/app/components/decision-form/decision-form.component.css b/src/app/components/decision-form/decision-form.component.css index d4a3e61..19a29d9 100644 --- a/src/app/components/decision-form/decision-form.component.css +++ b/src/app/components/decision-form/decision-form.component.css @@ -1,90 +1,487 @@ -.form-container { - max-width: 600px; - margin: 8px auto 20px; - padding: 20px; - border: 1px solid #ddd; - border-radius: 12px; - background-color: #fff; +.decision-shell { + display: grid; + grid-template-columns: minmax(360px, 1.15fr) minmax(300px, 0.85fr); + gap: 18px; +} + +.decision-card, +.preview-panel { + border-radius: 18px; + border: 1px solid rgba(0, 0, 0, 0.14); + position: relative; + overflow: hidden; + animation: rise-in 0.4s ease; +} + +.decision-card { + background: rgba(255, 255, 255, 0.94); + padding: 24px; +} + +.decision-card::before, +.preview-panel::before { + content: ""; + position: absolute; + inset: 0; + pointer-events: none; + background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.56) 1px, transparent 0); + background-size: 18px 18px; + opacity: 0.09; +} + +.decision-header, +.progress-block, +.decision-form, +.loading-state { + position: relative; + z-index: 1; +} + +.eyebrow { + margin: 0 0 8px; + font-size: 11px; + font-weight: 700; + letter-spacing: 0.13em; + text-transform: uppercase; + color: rgba(0, 0, 0, 0.56); } -.form-header { +.header-row { display: flex; justify-content: space-between; align-items: center; - gap: 12px; - margin-bottom: 16px; + gap: 10px; } -.form-header h2 { +.header-row h2 { margin: 0; + font-family: var(--font-display); + font-size: clamp(28px, 3.8vw, 38px); + line-height: 1.05; + letter-spacing: -0.03em; +} + +.header-copy { + margin: 10px 0 0; + color: rgba(0, 0, 0, 0.65); + line-height: 1.55; +} + +.btn-ghost { + display: inline-flex; + align-items: center; + justify-content: center; + min-height: 34px; + padding: 0 12px; + border-radius: 999px; + border: 1px solid rgba(0, 0, 0, 0.2); + background: #fff; + color: #111; + text-decoration: none; + font-size: 13px; + font-weight: 600; + transition: transform 0.2s ease, box-shadow 0.2s ease; +} + +.btn-ghost:hover { + transform: translateY(-1px); + box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1); +} + +.loading-state { + min-height: 260px; + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + color: #222; + font-weight: 600; +} + +.spinner { + width: 18px; + height: 18px; + border: 2px solid rgba(0, 0, 0, 0.18); + border-top-color: #000; + border-radius: 50%; + animation: spin 0.8s linear infinite; +} + +.progress-block { + margin-top: 14px; + border: 1px solid rgba(0, 0, 0, 0.12); + border-radius: 12px; + background: #fff; + padding: 12px 14px; +} + +.progress-meta { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 11px; + letter-spacing: 0.08em; + text-transform: uppercase; + font-weight: 700; + margin-bottom: 8px; +} + +.progress-track { + height: 8px; + border-radius: 999px; + background: rgba(0, 0, 0, 0.08); + overflow: hidden; +} + +.progress-fill { + height: 100%; + width: 0; + border-radius: inherit; + background: linear-gradient(90deg, #000000 0%, #444 100%); + transition: width 0.3s ease; +} + +.decision-form { + margin-top: 16px; + display: grid; + gap: 14px; } .form-group { - margin-bottom: 15px; + display: grid; + gap: 8px; } -.form-group label { - display: block; - margin-bottom: 5px; - font-weight: bold; +.label-row { + display: flex; + justify-content: space-between; + align-items: center; +} + +label { + font-size: 13px; + font-weight: 700; +} + +.counter { + font-size: 11px; + color: rgba(0, 0, 0, 0.52); + font-weight: 600; } .form-control { width: 100%; - padding: 10px 11px; - border: 1px solid #ced4da; - border-radius: 8px; + padding: 12px 14px; + border-radius: 12px; + border: 1px solid rgba(0, 0, 0, 0.18); + background: #fff; + color: #111; + font-size: 14px; + line-height: 1.45; + transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; box-sizing: border-box; - /* Ensures padding doesn't increase width */ +} + +.form-control::placeholder { + color: rgba(0, 0, 0, 0.45); +} + +.form-control:hover { + border-color: rgba(0, 0, 0, 0.3); +} + +.form-control:focus, +.form-control.active { + outline: none; + border-color: #000; + box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.07); + transform: translateY(-1px); } .form-control.is-invalid { - border-color: #dc3545; + border-color: #b4233c; } .invalid-feedback { - color: #dc3545; + margin-top: -2px; + color: #b4233c; font-size: 12px; - margin-top: 5px; + font-weight: 600; +} + +.chip-row { + display: flex; + flex-wrap: wrap; + gap: 8px; +} + +.chip { + border: 1px solid rgba(0, 0, 0, 0.18); + border-radius: 999px; + min-height: 30px; + padding: 0 12px; + background: #fff; + color: #111; + font-size: 12px; + font-weight: 600; + cursor: pointer; + transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease; +} + +.chip-wide { + border-radius: 12px; + text-align: left; + padding: 8px 10px; +} + +.chip:hover:not(:disabled) { + background: #000; + color: #fff; + transform: translateY(-1px); +} + +.chip:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +.status-row { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 8px; +} + +.status-chip { + border: 1px solid rgba(0, 0, 0, 0.15); + border-radius: 12px; + padding: 10px; + text-align: left; + background: #fff; + color: #111; + cursor: pointer; + transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease; +} + +.status-chip span { + display: block; + font-size: 13px; + font-weight: 700; +} + +.status-chip small { + display: block; + margin-top: 3px; + font-size: 11px; + color: rgba(0, 0, 0, 0.58); +} + +.status-chip.active { + background: #000; + color: #fff; + border-color: #000; +} + +.status-chip.active small { + color: rgba(255, 255, 255, 0.76); +} + +.status-chip:hover:not(:disabled) { + transform: translateY(-1px); +} + +.status-chip:disabled { + opacity: 0.55; + cursor: not-allowed; +} + +.error-msg { + margin: 0; + border: 1px solid rgba(176, 0, 32, 0.35); + border-radius: 10px; + background: rgba(255, 229, 234, 0.8); + color: #7f0015; + font-size: 13px; + font-weight: 600; + padding: 10px 12px; } .form-actions { display: flex; justify-content: flex-end; gap: 10px; - margin-top: 20px; + margin-top: 4px; +} + +.btn-primary, +.btn-secondary { + min-height: 40px; + border-radius: 10px; + padding: 0 14px; + text-decoration: none; + display: inline-flex; + align-items: center; + justify-content: center; + font-size: 14px; + font-weight: 700; } .btn-primary { - background-color: #111; + border: none; + background: #000; color: #fff; - padding: 8px 14px; - border: 1px solid #111; - border-radius: 8px; + gap: 8px; cursor: pointer; + font-family: var(--font-display); + transition: transform 0.2s ease, box-shadow 0.2s ease; +} + +.btn-primary:hover:not(:disabled) { + transform: translateY(-1px); + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28); } .btn-primary:disabled { - background-color: #888; - border-color: #888; + opacity: 0.6; cursor: not-allowed; } .btn-secondary { - background-color: #fff; + background: #fff; color: #111; - padding: 8px 14px; - border: 1px solid #cfcfcf; - border-radius: 8px; - cursor: pointer; + border: 1px solid rgba(0, 0, 0, 0.2); } -.btn-ghost { - background: #fff; - color: #111; - padding: 8px 12px; - text-decoration: none; - border-radius: 8px; - border: 1px solid #cfcfcf; +.preview-panel { + background: + radial-gradient(circle at 80% 16%, rgba(255, 255, 255, 0.12), transparent 34%), + linear-gradient(170deg, #060606 0%, #191919 100%); + color: #f7f7f7; + padding: 22px; +} + +.preview-eyebrow { + margin: 0; + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.14em; + font-weight: 700; + color: rgba(255, 255, 255, 0.64); +} + +.preview-panel h3 { + margin: 14px 0 12px; + font-family: var(--font-display); + font-size: clamp(24px, 3.3vw, 34px); + line-height: 1.08; + letter-spacing: -0.03em; +} + +.preview-description { + margin: 0; + color: rgba(255, 255, 255, 0.84); + line-height: 1.6; + min-height: 74px; +} + +.preview-stats { + margin-top: 18px; + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 8px; +} + +.stat-tile { + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 10px; + padding: 10px 8px; + background: rgba(255, 255, 255, 0.06); +} + +.stat-label { + display: block; + font-size: 10px; + text-transform: uppercase; + letter-spacing: 0.1em; + color: rgba(255, 255, 255, 0.65); +} + +.stat-value { + display: block; + margin-top: 5px; font-size: 13px; + font-weight: 700; +} + +.preview-stream { + margin-top: 16px; + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 12px; + padding: 14px; + background: rgba(255, 255, 255, 0.05); +} + +.stream-title { + margin: 0 0 10px; + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.11em; + font-weight: 700; + color: rgba(255, 255, 255, 0.72); +} + +.preview-stream ul { + margin: 0; + padding-left: 17px; + display: grid; + gap: 8px; + color: rgba(255, 255, 255, 0.85); + line-height: 1.45; +} + +.preview-stream li.complete { + color: #ffffff; + font-weight: 600; +} + +@media (max-width: 1024px) { + .decision-shell { + grid-template-columns: 1fr; + } + + .decision-card, + .preview-panel { + padding: 18px; + } +} + +@media (max-width: 640px) { + .status-row { + grid-template-columns: 1fr; + } + + .preview-stats { + grid-template-columns: 1fr; + } + + .form-actions { + flex-direction: column-reverse; + align-items: stretch; + } +} + +@keyframes rise-in { + from { + opacity: 0; + transform: translateY(8px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +@keyframes spin { + to { + transform: rotate(360deg); + } } diff --git a/src/app/components/decision-form/decision-form.component.html b/src/app/components/decision-form/decision-form.component.html index 19b3cac..2562c0d 100644 --- a/src/app/components/decision-form/decision-form.component.html +++ b/src/app/components/decision-form/decision-form.component.html @@ -1,44 +1,151 @@ -