This commit is contained in:
everythingonblack
2025-08-18 13:19:39 +07:00
parent d4073506bd
commit ec2eb0d619
2 changed files with 438 additions and 440 deletions

View File

@@ -1,240 +1,212 @@
/* Layout wrapper */
.page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
box-sizing: border-box;
}
.checkoutCard {
border-radius: 1rem; /* rounded-2xl */
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
border-radius: 12px;
border: 1px solid #e5e7eb;
box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
overflow: hidden;
display: flex;
flex-direction: column; /* default mobile: vertical stack */
max-width: 28rem; /* max-w-md */
margin-left: auto;
margin-right: auto;
flex-grow: 1; /* agar bisa melebar dalam container flex */
flex-direction: column;
max-width: 64rem; /* desktop width */
width: 100%;
background: #fff;
}
.cartSection, .checkoutSection {
flex: 1; /* agar keduanya bisa melebar seimbang */
}
/* Sections */
.cartSection, .checkoutSection { flex: 1; }
.cartSection {
padding: 1.5rem 1.5rem; /* p-6 */
background-color: #ececec; /* gray-50 */
border-bottom: 1px solid #F3F4F6; /* border-gray-100 */
}
.cartTitle {
font-size: 1.25rem; /* text-xl */
font-weight: 600; /* font-semibold */
color: #1F2937; /* gray-800 */
margin-bottom: 1rem;
}
.cartList {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 1rem; /* space-y-4 */
}
.cartItem {
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
}
.itemDetails {
display: flex;
align-items: center;
gap: 1rem;
}
.productImage {
width: 3.5rem; /* 14 */
height: 3.5rem;
border-radius: 0.5rem;
object-fit: cover;
}
.itemText {
font-weight: 500;
color: #1F2937;
margin: 0;
}
.itemPrice {
font-size: 0.875rem; /* text-sm */
color: #6B7280; /* gray-500 */
margin: 0;
}
.removeBtn {
font-weight: 700;
font-size: 1.25rem;
color: #EF4444; /* red-500 */
background: none;
border: none;
cursor: pointer;
transition: color 0.2s ease-in-out;
}
.removeBtn:hover {
color: #B91C1C; /* red-700 */
padding: 2rem;
background: #ffffff;
border-bottom: 1px solid #f3f4f6;
}
.checkoutSection {
padding: 2rem; /* p-8 */
padding: 2rem 3rem;
display: flex;
flex-direction: column;
justify-content: space-between;
flex-grow: 1;
background-color: white;
}
/* Header invoice */
.invHeader {
display: flex;
justify-content: space-between;
align-items: flex-start;
border-bottom: 1px solid #e5e7eb;
padding-bottom: 1rem;
margin-bottom: 1rem;
}
.brand {
font-size: 1.25rem;
font-weight: 800;
color: #2563eb;
}
.brandLight { font-weight: 500; }
.greeting { margin-top: .5rem; font-size: .875rem; color: #374151; }
.orderInfo { text-align: right; font-size: .875rem; color: #6b7280; }
.invoiceLabel { font-size: 1rem; color: #4b5563; }
.orderMeta { margin-top: .125rem; }
/* Table */
.table {
width: 100%;
border-collapse: collapse;
margin-top: .5rem;
margin-bottom: 1rem;
font-size: .9rem;
}
.table th, .table td { padding: .75rem 0; }
.table th {
border-bottom: 1px solid #d1d5db;
text-align: left;
color: #374151;
font-weight: 600;
}
.table td { color: #1f2937; border-bottom: 1px solid #f3f4f6; }
.textRight { text-align: right; }
.actionsCol { width: 2rem; }
/* Remove button (small) */
.removeBtn {
font-weight: 700;
font-size: 1.25rem;
line-height: 1;
color: #ef4444;
background: none;
border: none;
cursor: pointer;
}
.removeBtn:hover { color: #b91c1c; }
/* Summary */
.summary { margin-top: 1rem; text-align: left; }
.summaryRow, .summaryTotal {
display: flex;
justify-content: space-between;
font-size: .9rem;
color: #374151;
margin-top: .25rem;
}
.summaryTotal {
font-weight: 700;
font-size: 1.125rem;
margin-top: .5rem;
}
/* Right side */
.checkoutTitle {
font-size: 1.25rem;
font-weight: 600;
color: #1F2937;
margin-bottom: 1.5rem;
font-weight: 700;
color: #111827;
margin-bottom: 1rem;
}
.paymentInfo { margin-bottom: 1rem; }
.paymentHeading {
font-size: .75rem;
font-weight: 700;
color: #374151;
letter-spacing: .04em;
margin-bottom: .5rem;
}
.radioLabel {
display: block;
margin-bottom: .4rem;
font-size: .95rem;
color: #374151;
}
.inputGroup { margin-bottom: 1rem; }
.inputNote {
width: 100%; /* tetap full width agar input memenuhi container */
padding: 0.75rem 1rem;
border: 1px solid #D1D5DB; /* gray-300 */
border-radius: 0.5rem;
width: 100%;
padding: .75rem 1rem;
border: 1px solid #d1d5db;
border-radius: .5rem;
font-size: 1rem;
transition: box-shadow 0.2s ease, border-color 0.2s ease;
box-sizing: border-box; /* pastikan padding masuk ke width */
box-sizing: border-box;
}
.inputNote:focus {
outline: none;
border-color: #3B82F6; /* blue-500 */
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
border-color: #3b82f6;
box-shadow: 0 0 0 2px rgba(59,130,246,.4);
}
.paymentBtn {
width: 100%; /* tombol harus full lebar */
background-color: #2563EB; /* blue-600 */
color: white;
width: 100%;
background: #8b5cf6;
color: #fff;
font-weight: 700;
padding: 0.75rem 0;
border-radius: 0.5rem;
font-size: 1.125rem; /* text-lg */
cursor: pointer;
padding: .75rem 0;
border-radius: .5rem;
font-size: 1.05rem;
border: none;
box-shadow: 0 4px 6px rgba(37, 99, 235, 0.5);
transition: background-color 0.2s ease;
}
.paymentBtn:hover {
background-color: #1D4ED8; /* blue-700 */
cursor: pointer;
box-shadow: 0 4px 6px rgba(139,92,246,.45);
transition: background-color .2s ease;
}
.paymentBtn:hover { background: #7c3aed; }
/* Footer */
.footerText {
font-size: 0.75rem; /* text-xs */
color: #6B7280; /* gray-500 */
font-size: .75rem;
color: #6b7280;
text-align: center;
margin-top: 2rem;
}
.footerHighlight { font-weight: 700; color: #374151; }
.footerLink {
/* QR view */
.qrTitle { font-size: .95rem; color: #374151; }
.qrBox {
margin-top: 2rem;
text-align: center;
position: relative;
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 0.375rem;
color: inherit;
text-decoration: none;
transition: background-color 0.2s ease;
}
.footerLink:hover {
background-color: #E5E7EB; /* gray-200 */
}
.footerHighlight {
font-weight: 600;
color: #374151; /* gray-700 */
}
/* Responsive layout for desktop */
@media (min-width: 641px) {
.checkoutCard {
flex-direction: row; /* dua kolom berdampingan */
max-width: 64rem; /* lebar container desktop */
}
.cartSection {
border-bottom: none; /* hilangkan border bawah */
border-right: 1px solid #F3F4F6; /* border kanan */
padding: 2rem;
}
.checkoutSection {
padding: 2rem 3rem;
}
}
/* Responsive layout for small screens */
@media (max-width: 640px) {
.checkoutCard {
max-width: 100%;
}
}
/* Checkmark animation (as-is from your logic) */
.CheckmarkOverlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(255, 255, 255, 0.5);
background: rgba(255,255,255,.5);
width: 130px;
height: 130px;
display: flex;
align-items: center;
justify-content: center;
display: flex; align-items: center; justify-content: center;
border-radius: 50%;
pointer-events: none;
z-index: 10;
}
.CheckmarkSvg {
width: 100px;
height: 100px;
display: block;
}
.Checkmark { width: 100px; height: 100px; display: block; }
.CheckmarkCircle {
fill: none;
stroke: #4BB543;
stroke-width: 4;
stroke-dasharray: 157; /* 2πr where r = 25 */
stroke-dashoffset: 157;
transform: rotate(-90deg);
transform-origin: center;
fill: none; stroke: #4BB543; stroke-width: 4;
stroke-dasharray: 157; stroke-dashoffset: 157;
transform: rotate(-90deg); transform-origin: center;
animation: CircleFill 1s ease forwards;
}
.CheckmarkCheck {
fill: none;
stroke: #4BB543;
stroke-width: 4;
stroke-dasharray: 48;
stroke-dashoffset: 48;
animation: DrawCheck 0.5s ease forwards;
animation-delay: 1s;
fill: none; stroke: #4BB543; stroke-width: 4;
stroke-dasharray: 48; stroke-dashoffset: 48;
animation: DrawCheck .5s ease forwards; animation-delay: 1s;
}
@keyframes CircleFill { to { stroke-dashoffset: 0; } }
@keyframes DrawCheck { to { stroke-dashoffset: 0; } }
/* Circle fills in a clockwise motion */
@keyframes CircleFill {
to {
stroke-dashoffset: 0;
}
/* Responsive */
@media (min-width: 768px) {
.checkoutCard { flex-direction: row; }
.cartSection { border-right: 1px solid #f3f4f6; border-bottom: none; }
}
/* Checkmark is drawn after circle is full */
@keyframes DrawCheck {
to {
stroke-dashoffset: 0;
}
@media (max-width: 767px) {
.checkoutCard { flex-direction: column; }
}