Files
kedaimaster/src/components/ItemLister.module.css
karyamanswasta 6ed982d6ef ok
2025-08-27 07:00:14 +07:00

454 lines
9.2 KiB
CSS

/* ItemLister.module.css */
.item-lister {
width: 100%;
padding: 16px;
box-sizing: border-box;
white-space: break-spaces;
background-color: #ffffff;
border-radius: 16px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
margin-bottom: 20px;
position: relative;
z-index: 0 !important; /* ensure behind modal overlay */
}
.fullscreen {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: white;
z-index: 100; /* keep above page, below modal overlays (>=200) */
overflow-y: auto;
}
.grid-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 16px;
height: calc(52vw - 20px);
padding: 16px;
background-color: #f8f9fa;
border-radius: 12px;
margin-bottom: 24px;
}
@media (min-height: 0px) {
.grid-container {
height: 30vh;
}
}
@media (min-height: 630px) {
.grid-container {
height: 30vh;
}
}
@media (min-height: 636px) {
.grid-container {
height: 32vh;
}
}
@media (min-height: 650px) {
.grid-container {
height: 38vh;
}
}
@media (min-height: 705px) {
.grid-container {
height: 41vh;
}
}
@media (min-height: 735px) {
.grid-container {
height: 42vh;
}
}
@media (min-height: 759px) {
.grid-container {
height: 44vh;
}
}
@media (min-height: 819px) {
.grid-container {
height: 48vh;
}
}
@media (min-height: 830px) {
.grid-container {
height: 51vh;
}
}
@media (min-height: 892px) {
.grid-container {
height: 53vh;
}
}
.title-container {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
background-color: #f8f9fa;
border-radius: 12px;
margin-bottom: 20px;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
position: relative;
z-index: 0 !important; /* ensure behind modal overlay */
}
.titleActions {
display: inline-flex;
align-items: center;
gap: 10px;
}
.iconBtn {
width: 40px;
height: 40px;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid #e6e6e6;
background: #ffffff;
color: #2d2d2d;
border-radius: 10px;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
position: relative;
z-index: 0 !important; /* ensure behind modal overlay */
}
.iconBtn:disabled {
opacity: 0.5;
cursor: default;
}
.iconBtn:hover:not(:disabled) {
background: var(--brand-sage-50, #F0F6F2);
border-color: var(--brand-sage, #6B8F71);
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.title {
background-color: transparent;
font-family: "Plus Jakarta Sans", sans-serif;
font-weight: 600;
font-style: normal;
font-size: 22px;
color: rgba(88, 55, 50, 1);
text-align: left;
width: calc(70% - 12px);
padding-left: 12px;
text-transform: capitalize;
border: none;
outline: none;
position: relative;
z-index: 151;
}
.edit-typeItem-button {
margin-left: auto;
padding: 10px 16px;
font-size: 14px;
background-color: #007bff;
color: #fff;
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
position: relative;
z-index: 152;
}
.edit-typeItem-button:hover {
background-color: #0069d9;
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.add-item-button {
margin: 0; /* follow parent gap for top/bottom spacing */
display: inline-block;
width: 275px; /* requested size */
height: 275px; /* requested size */
padding: 0; /* match image padding (none) */
border: none;
background: transparent; /* card drawn via ::before */
color: transparent; /* no visible text */
border-radius: 12px; /* match portrait image radius */
cursor: pointer;
transition: none;
box-shadow: none;
position: relative;
z-index: 1; /* behind modal overlay */
}
.add-item-button::before {
content: "";
position: absolute;
inset: 0; /* fill container */
border-radius: 12px; /* match portrait image radius */
background:
/* vertical bar */
linear-gradient(var(--brand-sage, #6B8F71), var(--brand-sage, #6B8F71)) center/5px 20% no-repeat,
/* horizontal bar */
linear-gradient(var(--brand-sage, #6B8F71), var(--brand-sage, #6B8F71)) center/20% 5px no-repeat,
/* base */
var(--brand-sage-50, #F0F6F2);
border: 2px dashed var(--brand-sage, #6B8F71);
box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}
.add-item-button:focus-visible {
outline: 2px solid var(--brand-sage, #6B8F71);
outline-offset: 2px;
border-radius: 12px;
}
/* Overlay text inside the left tile area */
.add-item-button::after { content: none; }
.add-item-button:hover {
background-color: #ffffff;
box-shadow: none;
}
.item-list {
display: flex;
flex-direction: column;
gap: 16px;
position: relative;
z-index: 0 !important; /* ensure behind modal overlay */
}
/* Generic switch row styling reused in multiple spots */
.switch-container {
display: inline-flex;
align-items: center;
gap: 8px;
}
.switch-label {
font-size: 13px;
font-weight: 600;
color: #333;
}
/* Grid layout for portrait cards on cafe page */
.item-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16px;
}
@media (min-width: 600px) {
.item-grid {
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
}
@media (min-width: 992px) {
.item-grid {
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
}
.border {
border: 1px solid #000000;
}
.noborder {
border: 1px solid #ffffff00;
}
.itemWrapper {
position: relative;
background-color: #ffffff;
border-radius: 12px;
box-shadow: 0 1px 5px rgba(0,0,0,0.08);
transition: all 0.2s ease;
overflow: hidden;
position: relative;
z-index: 150;
}
.itemWrapper:hover { /* remove hover effect */ }
.editModeLayout {
/* Turn full-width bar into subtle corner controls over image */
position: absolute;
inset: 0;
z-index: 155; /* above itemWrapper */
pointer-events: none; /* only children are interactive */
}
/* Left badge: availability switch + label */
.editModeLayout > div:first-child {
position: absolute;
top: 16px;
left: 16px;
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(0, 0, 0, 0.55);
color: #fff;
border-radius: 999px;
padding: 6px 10px;
pointer-events: auto;
backdrop-filter: blur(2px);
}
/* Right badge: edit/unmark button */
.editModeLayout > div:last-child {
position: absolute;
top: 16px;
right: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
background: rgba(0, 0, 0, 0.55);
color: #fff;
border-radius: 999px;
pointer-events: auto;
cursor: pointer;
transition: background 0.2s ease, transform 0.2s ease;
backdrop-filter: blur(2px);
}
.editModeLayout > div:last-child:hover {
background: rgba(0, 0, 0, 0.7);
transform: translateY(-1px);
}
/* When label exists, keep it compact and readable */
.editModeLayout .switch-label {
font-size: 12px;
font-weight: 600;
color: #fff;
white-space: nowrap;
}
.PaymentOption {
overflow-x: hidden;
background-color: #ffffff;
display: flex;
flex-direction: column;
justify-content: center;
font-size: calc(12px + 2vmin);
color: rgba(88, 55, 50, 1);
border-radius: 20px 20px 0 0;
position: fixed;
bottom: 0;
right: 0;
left: 0;
z-index: 300; /* Menurunkan z-index agar tidak menutupi material list */
box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.1);
padding: 20px;
}
.TotalContainer {
display: flex;
justify-content: space-between;
width: 80vw;
margin: 0 auto;
font-family: "Plus Jakarta Sans", sans-serif;
font-weight: 600;
font-style: normal;
font-size: 1.8em;
padding: 15px 0;
border-bottom: 1px solid #e6e6e6;
}
.OptionContainer {
display: flex;
justify-content: space-between;
width: 80vw;
margin: 0 auto;
font-family: "Plus Jakarta Sans", sans-serif;
font-weight: 500;
font-style: normal;
font-size: 1.1em;
padding: 15px 0;
align-items: center;
}
.OptionContainer span:first-child {
color: #555;
}
.PayButton {
font-family: "Plus Jakarta Sans", sans-serif;
font-weight: 500;
font-style: normal;
font-size: 32px;
width: 80vw;
height: 56px;
border-radius: 50px;
background-color: rgba(88, 55, 50, 1);
color: white;
border: none;
margin: 0px auto;
cursor: pointer;
margin-bottom: 23px;
transition: all 0.2s ease;
box-shadow: 0 4px 12px rgba(88, 55, 50, 0.2);
position: relative;
z-index: 301;
}
.PayButton:hover {
background-color: rgba(70, 45, 40, 1);
box-shadow: 0 6px 16px rgba(88, 55, 50, 0.3);
}
.Pay2Button {
text-align: center;
color: rgba(88, 55, 50, 1);
font-size: 1.2em;
font-weight: 500;
margin-bottom: 10px;
cursor: pointer;
padding: 12px;
border-radius: 8px;
transition: all 0.2s ease;
position: relative;
z-index: 301;
}
.Pay2Button:hover {
background-color: #f0f0f0;
}
.item-list-title {
margin-top: 46px;
margin-left: 0px;
font-family: "Plus Jakarta Sans", sans-serif;
font-weight: 500;
font-style: normal;
font-size: 6vw;
color: black;
text-align: left;
}
/* Harga dalam item list - dikurangi ukurannya agar proporsional */
.itemPriceList {
font-family: "Plus Jakarta Sans", sans-serif;
font-weight: 700;
font-size: 14px;
color: #1c1d1d;
margin: 2px 0;
white-space: nowrap;
}
.itemPriceList.promo {
color: #e53935;
font-size: 13px;
}
.itemPriceList.original {
color: #727272;
font-size: 12px;
text-decoration: line-through;
}