diff --git a/wwwroot/icons/journal-alt.svg b/wwwroot/icons/journal-alt.svg new file mode 100644 index 0000000..2cc7599 --- /dev/null +++ b/wwwroot/icons/journal-alt.svg @@ -0,0 +1,4 @@ + + diff --git a/wwwroot/icons/square-plus.svg b/wwwroot/icons/square-plus.svg new file mode 100644 index 0000000..d9e4ae1 --- /dev/null +++ b/wwwroot/icons/square-plus.svg @@ -0,0 +1,2 @@ + + diff --git a/wwwroot/poc-checkout.html b/wwwroot/poc-checkout.html index b7162e3..55af769 100644 --- a/wwwroot/poc-checkout.html +++ b/wwwroot/poc-checkout.html @@ -253,12 +253,160 @@ /* Cart item card */ .cart-item { + background: var(--color-surface); + border-radius: 6px; + overflow: hidden; + transition: box-shadow 200ms ease; + } + + .cart-item.expanded { + box-shadow: 0 2px 8px rgba(0,0,0,0.1); + } + + .cart-item-main { display: flex; align-items: center; gap: 16px; padding: 12px 16px; + cursor: pointer; + transition: background 150ms ease; + } + + .cart-item-main:hover { + background: var(--color-background-hover); + } + + .cart-item.expanded .cart-item-main { + border-bottom: 1px solid var(--color-border); + } + + .cart-item-main::after { + content: ''; + width: 8px; + height: 8px; + border-right: 2px solid var(--color-text-secondary); + border-bottom: 2px solid var(--color-text-secondary); + transform: rotate(45deg); + transition: transform 200ms ease; + margin-left: 4px; + opacity: 0.5; + } + + .cart-item:hover .cart-item-main::after { + opacity: 1; + } + + .cart-item.expanded .cart-item-main::after { + transform: rotate(-135deg); + opacity: 1; + } + + /* Expandable edit section */ + .cart-item-edit { + max-height: 0; + opacity: 0; + overflow: hidden; + transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1), + opacity 250ms ease, + padding 300ms ease; + padding: 0 16px; + background: var(--color-background-alt); + } + + .cart-item.expanded .cart-item-edit { + max-height: 200px; + opacity: 1; + padding: 16px; + } + + .edit-row { + display: flex; + gap: 12px; + margin-bottom: 12px; + } + + .edit-row:last-child { + margin-bottom: 0; + } + + .edit-field { + flex: 1; + } + + .edit-field-label { + font-size: 11px; + color: var(--color-text-secondary); + text-transform: uppercase; + letter-spacing: 0.5px; + margin-bottom: 6px; + } + + .edit-field-input { + width: 100%; + padding: 8px 10px; + border: 1px solid var(--color-border); + border-radius: 4px; + font-size: 13px; + transition: border-color 150ms ease; + } + + .edit-field-input:focus { + outline: none; + border-color: var(--color-teal); + } + + .edit-field-input.mono { + font-family: var(--font-mono); + text-align: right; + } + + .edit-field-select { + width: 100%; + padding: 8px 10px; + border: 1px solid var(--color-border); + border-radius: 4px; + font-size: 13px; background: var(--color-surface); - border-radius: 6px; + cursor: pointer; + } + + .edit-field-select:focus { + outline: none; + border-color: var(--color-teal); + } + + .discount-row { + display: flex; + gap: 8px; + align-items: center; + } + + .discount-type { + display: flex; + gap: 4px; + } + + .discount-type-btn { + padding: 6px 10px; + border: 1px solid var(--color-border); + background: var(--color-surface); + font-size: 12px; + cursor: pointer; + transition: all 150ms ease; + } + + .discount-type-btn:first-child { + border-radius: 4px 0 0 4px; + } + + .discount-type-btn:last-child { + border-radius: 0 4px 4px 0; + } + + .discount-type-btn.active { + background: var(--color-teal); + border-color: var(--color-teal); + color: white; } .item-qty { @@ -307,10 +455,46 @@ text-align: right; } + .item-original-price { + font-family: var(--font-mono); + font-size: 12px; + color: var(--color-text-secondary); + text-decoration: line-through; + max-height: 0; + opacity: 0; + overflow: hidden; + transition: max-height 200ms ease, opacity 150ms ease; + } + + .item-original-price.visible { + max-height: 20px; + opacity: 1; + } + .item-total { font-family: var(--font-mono); font-size: 15px; font-weight: 600; + transition: color 200ms ease; + } + + .cart-item:has(.item-discount.visible) .item-total { + color: var(--color-teal); + } + + .item-discount { + font-size: 11px; + color: var(--color-teal); + font-weight: 500; + max-height: 0; + opacity: 0; + overflow: hidden; + transition: max-height 200ms ease, opacity 150ms ease; + } + + .item-discount.visible { + max-height: 20px; + opacity: 1; } .item-remove { @@ -463,15 +647,127 @@ font-size: 14px; font-weight: 500; cursor: pointer; + transition: background 200ms ease, opacity 200ms ease, transform 150ms ease; } - .btn-add-payment:hover { + .btn-add-payment:hover:not(:disabled) { background: #00796b; } + .btn-add-payment:active:not(:disabled) { + transform: scale(0.98); + } + .btn-add-payment:disabled { background: #ccc; cursor: not-allowed; + opacity: 0.7; + } + + /* Giftcard lookup */ + .giftcard-lookup { + max-height: 0; + opacity: 0; + overflow: hidden; + transition: max-height 300ms cubic-bezier(0.4, 0, 0.2, 1), + opacity 250ms ease, + margin-bottom 300ms ease, + padding-bottom 300ms ease; + margin-bottom: 0; + padding-bottom: 0; + border-bottom: 1px solid transparent; + } + + .giftcard-lookup.visible { + max-height: 150px; + opacity: 1; + margin-bottom: 16px; + padding-bottom: 16px; + border-bottom-color: var(--color-border); + } + + .giftcard-lookup-label { + font-size: 11px; + color: var(--color-text-secondary); + text-transform: uppercase; + letter-spacing: 0.5px; + margin-bottom: 8px; + } + + .giftcard-lookup-row { + display: flex; + gap: 10px; + } + + .giftcard-input { + flex: 1; + padding: 10px 12px; + border: 1px solid var(--color-border); + border-radius: 6px; + font-family: var(--font-mono); + font-size: 14px; + letter-spacing: 1px; + } + + .giftcard-input:focus { + outline: none; + border-color: var(--color-teal); + } + + .btn-lookup { + padding: 10px 16px; + border: 1px solid var(--color-teal); + border-radius: 6px; + background: var(--color-surface); + color: var(--color-teal); + font-size: 13px; + font-weight: 500; + cursor: pointer; + transition: background 150ms ease, transform 150ms ease; + } + + .btn-lookup:hover { + background: rgba(0, 137, 123, 0.08); + } + + .btn-lookup:active { + transform: scale(0.97); + } + + .giftcard-result { + margin-top: 0; + padding: 0 12px; + border-radius: 6px; + font-size: 13px; + max-height: 0; + opacity: 0; + overflow: hidden; + transition: max-height 250ms ease, + opacity 200ms ease, + margin-top 250ms ease, + padding 250ms ease; + } + + .giftcard-result.visible { + max-height: 50px; + opacity: 1; + margin-top: 10px; + padding: 10px 12px; + } + + .giftcard-result.success { + background: rgba(0, 137, 123, 0.1); + color: var(--color-teal); + } + + .giftcard-result.error { + background: rgba(229, 57, 53, 0.1); + color: var(--color-red); + } + + .giftcard-balance { + font-family: var(--font-mono); + font-weight: 600; } /* Registered payments */ @@ -675,35 +971,99 @@