/**
 * Maltings Cloud — front end styles.
 *
 * Deliberately restrained: colours and fonts inherit from the theme wherever
 * possible, so these blocks look like the rest of the site rather than like a
 * plugin. The site's palette (the dark navy from the old calendar) is kept as
 * custom properties so it can be retuned in one place.
 */

/**
 * A note on specificity.
 *
 * These blocks are dropped into an Elementor page whose theme styles headings,
 * links and buttons with rules like `.entry-content a` — two classes, which
 * beats a single `.mlc-button`. So anything whose colour matters is written as
 * `.mlc .thing` or `.mlc a.thing`, and the text colours are set explicitly
 * rather than left to inherit. Inheriting is what put white headings on a white
 * background and dark blue button text on a dark blue button.
 */

.mlc {
	--mlc-ink: #121126;
	--mlc-accent: #363478;
	--mlc-line: #dcdce4;
	--mlc-muted: #6b6b7b;
	--mlc-free: #34b847;
	--mlc-part: #f2af40;
	--mlc-full: #ed4242;
	--mlc-closed: #ececed;
	--mlc-radius: 10px;

	/* Breathing room, because a shortcode usually lands straight inside a
	   full-bleed section with no padding of its own. Kept modest sideways so
	   it does not double up when the section already has its own gutter. */
	padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 2vw, 1.5rem);
	color: var(--mlc-ink);
	font: inherit;
}

.mlc *,
.mlc *::before,
.mlc *::after {
	box-sizing: border-box;
}

/* Every heading inside a block, whatever the theme does to h1-h4. */
.mlc h1,
.mlc h2,
.mlc h3,
.mlc h4,
.mlc .mlc-title,
.mlc .mlc-panel-title,
.mlc legend {
	color: var(--mlc-ink);
}

.mlc p,
.mlc li,
.mlc dd,
.mlc dt,
.mlc label,
.mlc td,
.mlc th {
	color: var(--mlc-ink);
}

.mlc .mlc-title {
	margin: 0 0 0.75rem;
}

.mlc .mlc-panel-title {
	margin: 0 0 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 1rem;
}

.mlc .mlc-subtitle {
	margin: 1.25rem 0 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.8125rem;
	color: var(--mlc-muted);
}

.mlc-help {
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
	color: var(--mlc-muted);
}

/* --- forms ------------------------------------------------------------- */

.mlc-form {
	max-width: 32rem;
}

.mlc-field {
	margin-bottom: 1rem;
	border: 0;
	padding: 0;
}

.mlc-field > label,
.mlc-field > legend {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
	font-size: 0.9375rem;
}

.mlc .mlc-field input[type="text"],
.mlc .mlc-field input[type="email"],
.mlc .mlc-field input[type="password"],
.mlc .mlc-field input[type="tel"],
.mlc .mlc-field input[type="url"],
.mlc .mlc-field input[type="search"],
.mlc .mlc-field textarea,
.mlc .mlc-field select {
	width: 100%;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--mlc-line);
	border-radius: var(--mlc-radius);
	font: inherit;
	background: #fff;
	color: var(--mlc-ink);
}

.mlc .mlc-field input::placeholder,
.mlc .mlc-field textarea::placeholder {
	color: var(--mlc-muted);
	opacity: 1;
}

.mlc-field input:focus-visible,
.mlc-field textarea:focus-visible,
.mlc-field select:focus-visible,
.mlc-button:focus-visible,
.mlc-daybtn:focus-visible,
.mlc-letter:focus-visible {
	outline: 2px solid var(--mlc-accent);
	outline-offset: 2px;
}

.mlc-field-row {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.mlc-field-row > .mlc-field {
	flex: 1 1 12rem;
}

.mlc-checkboxes {
	display: grid;
	gap: 0.35rem;
	max-height: 18rem;
	overflow-y: auto;
}

.mlc-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.9375rem;
	line-height: 1.35;
	cursor: pointer;
}

.mlc-checkbox input {
	margin-top: 0.2rem;
	flex: 0 0 auto;
}

/* a.mlc-button and button.mlc-button both, so a theme's link colour cannot
   repaint the label into the background colour. */
.mlc .mlc-button,
.mlc a.mlc-button,
.mlc button.mlc-button,
.mlc input[type="submit"].mlc-button {
	display: inline-block;
	padding: 0.65rem 1.25rem;
	border: 0;
	border-radius: var(--mlc-radius);
	background: var(--mlc-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	text-decoration: none;
	-webkit-appearance: none;
	appearance: none;
}

.mlc .mlc-button:hover,
.mlc a.mlc-button:hover,
.mlc button.mlc-button:hover,
.mlc .mlc-button:focus,
.mlc a.mlc-button:focus,
.mlc button.mlc-button:focus,
.mlc a.mlc-button:visited {
	background: var(--mlc-accent);
	color: #fff;
	opacity: 0.9;
}

.mlc .mlc-button[disabled],
.mlc .mlc-button.is-busy {
	opacity: 0.6;
	cursor: progress;
}

.mlc .mlc-button-quiet,
.mlc a.mlc-button-quiet,
.mlc button.mlc-button-quiet {
	background: transparent;
	color: var(--mlc-accent);
	box-shadow: inset 0 0 0 1px var(--mlc-line);
}

.mlc .mlc-button-quiet:hover,
.mlc a.mlc-button-quiet:hover,
.mlc button.mlc-button-quiet:hover,
.mlc .mlc-button-quiet:focus,
.mlc a.mlc-button-quiet:focus,
.mlc button.mlc-button-quiet:focus {
	background: transparent;
	color: var(--mlc-accent);
}

/* Ordinary links inside a block, which the theme may also be colouring. */
.mlc .mlc-links a,
.mlc .mlc-back a,
.mlc .mlc-listing-contact a,
.mlc .mlc-result-name a {
	color: var(--mlc-accent);
	text-decoration: underline;
}

.mlc-actions {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
}

.mlc .mlc-links {
	margin-top: 1rem;
	font-size: 0.9375rem;
}

/* A block composed inside another one (the listing editor on the account page)
   must not stack a second lot of outer padding. */
.mlc .mlc {
	padding-top: 0;
	padding-bottom: 0;
}

.mlc .mlc-tenant-note {
	margin-top: 2rem;
	padding: 1.25rem 1.4rem;
	border-radius: var(--mlc-radius);
	background: #f6f6f9;
	border-left: 4px solid var(--mlc-accent);
}

.mlc .mlc-tenant-note h3 {
	margin: 0 0 0.5rem;
	font-size: 1.125rem;
}

.mlc .mlc-tenant-note p {
	margin: 0 0 0.75rem;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.mlc .mlc-tenant-note p:last-child {
	margin-bottom: 0;
}

.mlc .mlc-tenant-note a {
	color: var(--mlc-accent);
	text-decoration: underline;
}

.mlc-message {
	margin: 0 0 1rem;
	padding: 0.7rem 0.9rem;
	border-radius: var(--mlc-radius);
	border-left: 4px solid var(--mlc-muted);
	background: #f6f6f9;
	font-size: 0.9375rem;
}

.mlc-message-error {
	border-left-color: var(--mlc-full);
	background: #fdecec;
}

.mlc-message-success {
	border-left-color: var(--mlc-free);
	background: #eaf8ec;
}

.mlc-message-info {
	border-left-color: var(--mlc-accent);
	background: #eef0fa;
}

/* --- account ----------------------------------------------------------- */

.mlc-card-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	margin: 1.5rem 0;
}

.mlc-card {
	padding: 1.25rem;
	border: 1px solid var(--mlc-line);
	border-radius: var(--mlc-radius);
}

.mlc-card h3 {
	margin: 0 0 0.5rem;
}

.mlc-plain-list {
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}

.mlc-pill {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
}

.mlc-pill-pending {
	background: #fff3d8;
	color: #8a5a00;
}

.mlc-pill-live {
	background: #eaf8ec;
	color: #1d6b2a;
}

/* --- directory ----------------------------------------------------------
   Two columns: a white filter card on the left, results on the right. Section
   headings are navy caps; the A-Z is a grid of rounded squares with the active
   one filled. */

.mlc-directory-layout {
	display: grid;
	gap: 2.5rem;
	grid-template-columns: minmax(14rem, 19rem) 1fr;
	align-items: start;
}

@media (max-width: 860px) {
	.mlc-directory-layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}

.mlc .mlc-directory-filters {
	background: #fff;
	border-radius: var(--mlc-radius);
	padding: 1.5rem;
}

.mlc .mlc-directory-filters .mlc-panel-title,
.mlc .mlc-directory-results .mlc-panel-title {
	color: var(--mlc-accent);
	letter-spacing: 0.06em;
	font-size: 1.05rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--mlc-line);
	margin-bottom: 1.1rem;
}

.mlc .mlc-directory-filters .mlc-subtitle {
	color: var(--mlc-accent);
	font-size: 0.95rem;
	letter-spacing: 0.06em;
	margin-top: 1.75rem;
}

.mlc .mlc-directory-filters input[type="search"] {
	border-radius: 999px;
	padding: 0.7rem 1.1rem;
}

.mlc .mlc-types {
	display: grid;
	gap: 0.55rem;
	max-height: none;
}

.mlc .mlc-types .mlc-checkbox input {
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 4px;
	accent-color: var(--mlc-accent);
}

.mlc-letters {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 0.5rem;
}

.mlc .mlc-letter {
	aspect-ratio: 1;
	min-width: 0;
	padding: 0;
	border: 1px solid var(--mlc-line);
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-size: 0.95rem;
	color: var(--mlc-ink);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	text-transform: uppercase;
}

.mlc .mlc-letter.is-active {
	background: var(--mlc-ink);
	border-color: var(--mlc-ink);
	color: #fff;
}

.mlc .mlc-letter.is-empty {
	opacity: 0.35;
	cursor: default;
}

.mlc-count {
	font-weight: 400;
	font-size: 0.875rem;
	color: var(--mlc-muted);
	text-transform: none;
	letter-spacing: 0;
	margin-left: 0.5rem;
}

.mlc-results {
	display: block;
}

.mlc .mlc-result {
	padding: 1.6rem 0;
	border-bottom: 1px solid var(--mlc-line);
}

.mlc .mlc-result:first-child {
	padding-top: 0.4rem;
}

.mlc .mlc-result-name {
	margin: 0 0 0.35rem;
	font-size: 1.2rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.mlc .mlc-result-name a {
	color: var(--mlc-accent);
	text-decoration: none;
}

.mlc .mlc-result-name a:hover {
	text-decoration: underline;
}

.mlc .mlc-result-type {
	margin: 0 0 0.9rem;
	font-size: 0.95rem;
	color: var(--mlc-muted);
}

.mlc .mlc-result-text {
	margin: 0;
	font-size: 1rem;
	line-height: 1.6;
}

.mlc-empty,
.mlc-loading {
	color: var(--mlc-muted);
	font-style: italic;
}

/* --- single listing ----------------------------------------------------- */

.mlc .mlc-back a {
	color: var(--mlc-accent);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.mlc-listing {
	position: relative;
}

.mlc .mlc-listing-logo {
	float: right;
	max-width: 7rem;
	max-height: 5rem;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0 0 1rem 1.5rem;
}

.mlc .mlc-listing-name {
	margin: 0.5rem 0 1.25rem;
	font-size: clamp(1.9rem, 4vw, 2.6rem);
	font-weight: 400;
	line-height: 1.15;
	/* The business's own name, as they wrote it — the theme uppercases and
	   letter-spaces every heading, which turns "Sweet Delivery Ltd" into a
	   banner. */
	text-transform: none;
	letter-spacing: normal;
}

.mlc .mlc-listing-contact {
	display: block;
	margin: 0 0 1.25rem;
	font-size: 1.0625rem;
	line-height: 1.9;
}

.mlc .mlc-listing-contact dt {
	display: inline;
	font-weight: 700;
}

.mlc .mlc-listing-contact dd {
	display: inline;
	margin: 0 0 0 0.3rem;
}

.mlc .mlc-listing-contact dd::after {
	content: "";
	display: block;
}

.mlc .mlc-listing-contact a {
	color: var(--mlc-accent);
	text-decoration: none;
}

.mlc .mlc-listing-contact a:hover {
	text-decoration: underline;
}

.mlc-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	list-style: none;
	margin: 0 0 1.75rem;
	padding: 0;
}

.mlc .mlc-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	color: var(--mlc-accent);
	text-decoration: none;
}

.mlc .mlc-social:hover {
	opacity: 0.75;
}

.mlc .mlc-social svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* Tabs: About This Business / How to Find Us */

.mlc-tablist {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

.mlc .mlc-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border: 0;
	background: transparent;
	padding: 0.85rem 1.4rem;
	font: inherit;
	font-size: 1.0625rem;
	color: var(--mlc-ink);
	cursor: pointer;
	border-radius: 8px 8px 0 0;
}

.mlc .mlc-tab.is-active {
	background: var(--mlc-accent);
	color: #fff;
}

.mlc .mlc-tab-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4rem;
	height: 1.4rem;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.12);
	font-size: 0.8rem;
	line-height: 1;
}

.mlc .mlc-tab.is-active .mlc-tab-icon {
	background: rgba(255, 255, 255, 0.25);
}

.mlc .mlc-tabpanel {
	border: 1px solid var(--mlc-line);
	border-radius: 0 8px 8px 8px;
	padding: 1.75rem 2rem;
	line-height: 1.7;
}

.mlc .mlc-tabpanel p {
	margin: 0 0 1rem;
}

.mlc .mlc-tabpanel p:last-child {
	margin-bottom: 0;
}

.mlc .mlc-button-map {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.85rem;
	background: #6c757d;
}

.mlc .mlc-button-map:hover,
.mlc .mlc-button-map:focus {
	background: #5a6268;
}

.mlc-opening {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	max-width: 22rem;
}

.mlc-opening li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.2rem 0;
	border-bottom: 1px dotted var(--mlc-line);
}

.mlc .mlc-opening-title {
	margin: 1.5rem 0 0.6rem;
	font-size: 1.05rem;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* --- calendar ---------------------------------------------------------- */

.mlc-calendar-app {
	max-width: 34rem;
}

.mlc-calendar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.5rem 0.25rem;
}

.mlc-month {
	margin: 0;
	font-size: 1.0625rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.mlc-nav {
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--mlc-line);
	border-radius: 50%;
	background: #fff;
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
}

table.mlc-calendar {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

table.mlc-calendar th {
	padding: 0.5rem 0;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--mlc-muted);
	border: 0;
}

table.mlc-calendar th abbr {
	text-decoration: none;
	border: 0;
}

table.mlc-calendar td {
	padding: 0.15rem;
	text-align: center;
	border: 0;
	vertical-align: middle;
}

.mlc-daybtn,
.mlc-day .mlc-daynum {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.4rem;
	height: 2.4rem;
	border: 0;
	border-radius: 50%;
	font: inherit;
	font-size: 0.9375rem;
	background: transparent;
}

.mlc-daybtn {
	cursor: pointer;
}

.mlc-state-available .mlc-daybtn {
	background: var(--mlc-free);
	color: #fff;
}

.mlc-state-partial .mlc-daybtn {
	background: var(--mlc-part);
	color: #30240a;
}

.mlc-state-unavailable .mlc-daynum {
	background: var(--mlc-full);
	color: #fff;
}

.mlc-state-blocked .mlc-daynum,
.mlc-state-past .mlc-daynum {
	color: #a9a9b6;
	font-style: italic;
}

.mlc-day.is-today .mlc-daybtn,
.mlc-day.is-today .mlc-daynum {
	box-shadow: 0 0 0 2px var(--mlc-accent);
	font-weight: 700;
}

.mlc-daybtn:hover {
	opacity: 0.85;
}

.mlc-key {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	align-items: center;
	margin-top: 1rem;
	font-size: 0.8125rem;
	color: var(--mlc-muted);
}

.mlc-swatch {
	display: inline-block;
	width: 0.85rem;
	height: 0.85rem;
	border-radius: 50%;
	vertical-align: -0.1rem;
	margin-right: 0.15rem;
}

.mlc-swatch.mlc-state-available {
	background: var(--mlc-free);
}

.mlc-swatch.mlc-state-partial {
	background: var(--mlc-part);
}

.mlc-swatch.mlc-state-unavailable {
	background: var(--mlc-full);
}

.mlc-swatch.mlc-state-blocked {
	background: var(--mlc-closed);
}

/* --- booking dialog ---------------------------------------------------- */

body.mlc-modal-open {
	overflow: hidden;
}

.mlc-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(18, 17, 38, 0.6);
}

.mlc-modal[hidden] {
	display: none;
}

.mlc-modal-box {
	width: 100%;
	max-width: 30rem;
	max-height: 90vh;
	overflow-y: auto;
	padding: 1.25rem;
	border-radius: 16px;
	background: #fff;
	color: var(--mlc-ink);
}

.mlc-modal-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.mlc-modal-head h3 {
	margin: 0;
	font-size: 1.0625rem;
}

.mlc-modal-close {
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--mlc-muted);
}

.mlc-modal-foot {
	display: flex;
	gap: 0.75rem;
	justify-content: flex-end;
	margin-top: 1.25rem;
}

.mlc-slots {
	display: grid;
	gap: 0.5rem;
}

.mlc-slot {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.7rem 0.8rem;
	border: 1px solid var(--mlc-line);
	border-radius: var(--mlc-radius);
	cursor: pointer;
}

.mlc-slot:hover {
	border-color: var(--mlc-accent);
}

.mlc-slot-label {
	flex: 1 1 auto;
	font-size: 0.9375rem;
}

.mlc-slot-price {
	font-weight: 600;
	white-space: nowrap;
}

.mlc-slot.is-taken {
	opacity: 0.55;
	cursor: default;
	background: #f7f7f9;
}

.mlc-slot.is-taken:hover {
	border-color: var(--mlc-line);
}

.mlc-slot.is-taken .mlc-slot-price {
	font-weight: 400;
	font-style: italic;
	color: var(--mlc-muted);
}

.mlc-reference {
	font-size: 1.0625rem;
}
