:root { --mgb-accent: #4a3226; --mgb-ink: #231a14; --mgb-muted: #76675c; --mgb-line: #e9e0d8; --mgb-soft: #faf6f2; }

.mgb-lock, .mgb-lock body { overflow: hidden; }
.mgb-muted { color: var(--mgb-muted); font-size: 14px; }
.mgb-error { margin: 10px 0 0; color: #b42318; font-size: 14px; }
.mgb-hp { position: absolute !important; left: -9999px !important; }

.mgb-btn, .mgb-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; margin: 0; padding: 0 22px; border: 1px solid var(--mgb-accent); border-radius: 99px; background: var(--mgb-accent); color: #fff; font: inherit; font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none; text-transform: none; letter-spacing: 0; cursor: pointer; transition: opacity .15s, transform .15s; }
.mgb-btn:hover, .mgb-button:hover { color: #fff; opacity: .88; }
.mgb-btn:active, .mgb-button:active { transform: translateY(1px); }
.mgb-btn:focus-visible, .mgb-button:focus-visible { outline: 2px solid var(--mgb-accent); outline-offset: 2px; }
.mgb-btn:disabled { opacity: .55; cursor: default; }
.mgb-btn--ghost, .mgb-btn--ghost:hover { background: transparent; color: var(--mgb-accent); }

/* Modal */
.mgb-modal { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(35, 26, 20, .55); }
.mgb-modal.is-open { display: flex; }
.mgb-modal__dialog { display: flex; flex-direction: column; width: 100%; max-width: 760px; max-height: 100%; overflow: hidden; border-radius: 16px; background: #fff; color: var(--mgb-ink); outline: 0; box-shadow: 0 24px 60px rgba(35, 26, 20, .3); }
.mgb-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--mgb-line); }
.mgb-modal__head h3 { margin: 0; color: inherit; font-size: 18px; }
.mgb-x { width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--mgb-soft); color: var(--mgb-ink); font-size: 20px; line-height: 1; cursor: pointer; }
.mgb-x:hover { background: var(--mgb-line); }
.mgb-modal__body { flex: 1; min-height: 0; padding: 16px 20px 18px; overflow-y: auto; }

.mgb-inline { padding: 20px; border: 1px solid var(--mgb-line); border-radius: 16px; background: #fff; color: var(--mgb-ink); }

/* Steps */
.mgb-steps { display: flex; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.mgb-steps li { display: flex; flex: 1; align-items: center; gap: 8px; margin: 0; color: var(--mgb-muted); font-size: 13px; }
.mgb-steps span { display: inline-grid; flex: none; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--mgb-soft); font-size: 12px; font-weight: 600; }
.mgb-steps .is-on { color: var(--mgb-ink); font-weight: 600; }
.mgb-steps .is-on span, .mgb-steps .is-done span { background: var(--mgb-accent); color: #fff; }

/* Service picker */
.mgb-services h4, .mgb-slots-wrap h4 { margin: 12px 0 8px; color: var(--mgb-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.mgb-services section:first-child h4 { margin-top: 0; }
.mgb-service { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 0; margin: 0 0 8px; padding: 8px 40px 8px 8px; border: 1px solid var(--mgb-line); border-radius: 12px; background: #fff; color: var(--mgb-ink); font: inherit; line-height: 1.3; text-align: left; text-transform: none; letter-spacing: 0; cursor: pointer; transition: border-color .15s, background .15s; }
.mgb-service:hover { border-color: var(--mgb-accent); }
.mgb-service:focus-visible { outline: 2px solid var(--mgb-accent); outline-offset: 1px; }
.mgb-service.is-on { border-color: var(--mgb-accent); background: var(--mgb-soft); }
.mgb-service img, .mgb-service__ph { flex: none; display: block; width: 56px; height: 56px; margin: 0; border-radius: 8px; background: var(--mgb-soft); object-fit: cover; }
.mgb-service__text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.mgb-service__text strong { font-size: 15px; font-weight: 600; }
.mgb-service__text em { margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: var(--mgb-accent); color: #fff; font-size: 11px; font-style: normal; font-weight: 500; }
.mgb-service__text small { color: var(--mgb-muted); font-size: 13px; }
.mgb-service__price { flex: none; font-size: 14px; font-weight: 600; }
.mgb-tick { position: absolute; top: 50%; right: 12px; width: 18px; height: 18px; margin-top: -9px; border: 1px solid var(--mgb-line); border-radius: 50%; }
.mgb-service.is-on .mgb-tick { border: 5px solid var(--mgb-accent); }

/* Date and time */
.mgb-when { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.mgb-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mgb-cal__head strong { font-size: 15px; font-weight: 600; text-transform: capitalize; }
.mgb-cal__head button { width: 32px; height: 32px; min-height: 0; margin: 0; padding: 0; border: 1px solid var(--mgb-line); border-radius: 50%; background: #fff; color: var(--mgb-ink); font-size: 18px; line-height: 1; cursor: pointer; }
.mgb-cal__head button:disabled { opacity: .35; cursor: default; }
.mgb-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mgb-cal__grid b { padding: 4px 0; color: var(--mgb-muted); font-size: 12px; font-weight: 500; text-align: center; }
.mgb-cal__grid button { aspect-ratio: 1; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--mgb-ink); font: inherit; font-size: 14px; line-height: 1; letter-spacing: 0; cursor: pointer; }
.mgb-cal__grid button:hover:not(:disabled) { background: var(--mgb-soft); }
.mgb-cal__grid button:disabled { color: #c9bfb6; cursor: default; }
.mgb-cal__grid button.is-on { background: var(--mgb-accent); color: #fff; }
.mgb-slots-wrap h4 { margin-top: 0; }
.mgb-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; }
.mgb-slots button { min-height: 38px; margin: 0; padding: 0; border: 1px solid var(--mgb-line); border-radius: 8px; background: #fff; color: var(--mgb-ink); font: inherit; font-size: 14px; letter-spacing: 0; cursor: pointer; }
.mgb-slots button:hover { border-color: var(--mgb-accent); }
.mgb-slots button.is-on { border-color: var(--mgb-accent); background: var(--mgb-accent); color: #fff; }

/* Details */
.mgb-details { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.mgb-field { display: grid; gap: 5px; margin: 0 0 10px; color: var(--mgb-ink); font-size: 13px; font-weight: 500; }
.mgb-field input, .mgb-field select, .mgb-field textarea { width: 100%; min-height: 42px; margin: 0; padding: 8px 12px; border: 1px solid var(--mgb-line); border-radius: 8px; background: #fff; color: var(--mgb-ink); box-shadow: none; font: inherit; font-size: 15px; font-weight: 400; }
.mgb-field input:focus, .mgb-field select:focus, .mgb-field textarea:focus { border-color: var(--mgb-accent); outline: 0; box-shadow: 0 0 0 3px rgba(74, 50, 38, .12); }
.mgb-review { align-self: start; padding: 14px; border-radius: 12px; background: var(--mgb-soft); font-size: 14px; }
.mgb-review ul { margin: 8px 0 0; padding: 0; list-style: none; }
.mgb-review li { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 4px; }

/* Deposit */
.mgb-deposit { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--mgb-line); }
.mgb-deposit p { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.mgb-deposit small { color: var(--mgb-muted); font-size: 12px; }
.mgb-pay { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.mgb-pay button { min-height: 36px; margin: 0; padding: 0 12px; border: 1px solid var(--mgb-line); border-radius: 8px; background: #fff; color: var(--mgb-ink); font: inherit; font-size: 13px; letter-spacing: 0; text-transform: none; cursor: pointer; }
.mgb-pay button:hover { border-color: var(--mgb-accent); }
.mgb-pay button.is-on { border-color: var(--mgb-accent); background: var(--mgb-accent); color: #fff; }
.mgb-bank { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: center; margin: 12px 0; padding: 12px; border-radius: 12px; background: var(--mgb-soft); text-align: left; }
.mgb-bank img { display: block; width: 100%; height: auto; margin: 0; border-radius: 8px; background: #fff; }
.mgb-bank dl, .mgb-manage dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; margin: 0; font-size: 14px; }
.mgb-bank dt, .mgb-manage dt { color: var(--mgb-muted); font-weight: 400; }
.mgb-bank dd, .mgb-manage dd { margin: 0; overflow-wrap: anywhere; }
.mgb-bank .mgb-muted { grid-column: 1 / -1; margin: 0; }
.mgb-paylink { margin: 12px 0; text-align: center; }
.mgb-paylink .mgb-muted { margin: 6px 0 0; }

/* Manage */
.mgb-manage { text-align: center; }
.mgb-manage h3 { margin: 0 0 8px; color: inherit; }
.mgb-manage dl { max-width: 460px; margin: 12px auto; text-align: left; }

/* Footer bar */
.mgb-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--mgb-line); }
.mgb-foot__sum { display: grid; flex: 1; min-width: 0; }
.mgb-foot__sum small { color: var(--mgb-muted); font-size: 12px; }
.mgb-foot__sum strong { font-size: 15px; }

/* Done */
.mgb-done { padding: 12px 0; text-align: center; }
.mgb-done__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--mgb-accent); color: #fff; font-size: 26px; }
.mgb-done h3 { margin: 10px 0 6px; color: inherit; }
.mgb-done p { margin: 0 0 6px; }
.mgb-code { display: inline-block; padding: 6px 16px; border-radius: 8px; background: var(--mgb-soft); font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.mgb-done__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }

/* Service cards */
.mgb-cards { display: grid; grid-template-columns: repeat(var(--mgb-cols, 3), minmax(0, 1fr)); gap: 20px; }
.mgb-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--mgb-line); border-radius: 14px; background: #fff; color: var(--mgb-ink); transition: transform .2s, box-shadow .2s; }
.mgb-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(74, 50, 38, .12); }
.mgb-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--mgb-soft); }
.mgb-card__media img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.mgb-card__body { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 16px; }
.mgb-card h3 { margin: 0 0 2px; color: inherit; font-size: 18px; }
.mgb-card__meta { margin: 0 0 8px; color: var(--mgb-muted); font-size: 13px; }
.mgb-card__body > p:not(.mgb-card__meta) { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.mgb-card ul { margin: 0 0 10px 18px; padding: 0; font-size: 14px; }
.mgb-card li { margin: 0 0 2px; }
.mgb-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.mgb-card__foot strong { font-size: 17px; }
.mgb-card__foot .mgb-button { min-height: 38px; padding: 0 18px; }

/* Lookup */
.mgb-lookup__form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.mgb-lookup__form .mgb-field { margin: 0; }
.mgb-lookup__result { margin-top: 14px; }
.mgb-lookup__result dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 10px; font-size: 14px; }
.mgb-lookup__result dt { color: var(--mgb-muted); font-weight: 400; }
.mgb-lookup__result dd { margin: 0; }
.mgb-warranties { margin: 0; padding: 0; list-style: none; }
.mgb-warranties li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin: 0 0 6px; padding: 10px 12px; border: 1px solid var(--mgb-line); border-radius: 10px; font-size: 14px; }
.mgb-warranties em { margin-left: auto; font-style: normal; font-weight: 600; }
.mgb-warranties .is-active em { color: #067647; }
.mgb-warranties .is-expired em, .mgb-warranties .is-void em { color: #b42318; }

/* Floating button */
/* Below theme popups, so it never sits on top of the mobile menu. */
.mgb-float { position: fixed; bottom: 20px; left: 20px; z-index: 1000; display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 99px; background: var(--mgb-accent); color: #fff; box-shadow: 0 10px 24px rgba(35, 26, 20, .28); font-size: 14px; font-weight: 500; text-decoration: none; }
.mgb-float:hover { color: #fff; opacity: .9; }
@media (min-width: 850px) { .mgb-float { display: none; } }

@media (max-width: 680px) {
	.mgb-modal { align-items: flex-end; padding: 0; }
	.mgb-modal__dialog { max-height: 94%; border-radius: 16px 16px 0 0; }
	.mgb-when, .mgb-details, .mgb-lookup__form { grid-template-columns: minmax(0, 1fr); }
	.mgb-cards { grid-template-columns: minmax(0, 1fr); }
	.mgb-steps li { font-size: 12px; }
	.mgb-slots { max-height: none; }
	.mgb-bank { grid-template-columns: minmax(0, 1fr); }
	.mgb-bank img { max-width: 200px; margin-inline: auto; }
}

@media (min-width: 681px) and (max-width: 960px) {
	.mgb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	.mgb-card, .mgb-btn, .mgb-button { transition: none; }
	.mgb-card:hover { transform: none; }
}
