:root {
	/* Standardfarger – overstyres av valgene under MOLU Booking → Innstillinger. */
	--molu-accent: #1a1a1a;
	--molu-accent-text: #ffffff;
	--molu-range: #cbd5e1;
	--molu-day-bg: #f7f7f7;
	--molu-day-text: #1a1a1a;
}

.molu-booking-widget,
.molu-booking-widget *,
.molu-booking-widget *::before,
.molu-booking-widget *::after {
	box-sizing: border-box;
}

.molu-booking-widget {
	max-width: 420px;
	width: 100%;
	font-family: inherit;
	line-height: 1.5;
}

.molu-price-row {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	align-items: baseline;
	margin-bottom: 8px;
}

.molu-price {
	font-size: 1.4em;
	font-weight: 700;
	color: var(--molu-accent);
}

.molu-price-secondary {
	font-size: 1em;
	font-weight: 500;
	color: #555;
}

.molu-price-unit {
	font-size: 0.6em;
	font-weight: 400;
	color: #777;
}

.molu-min-days {
	font-size: 0.9em;
	color: #666;
	margin: 0 0 12px;
}

.molu-terms-hint,
.molu-cal-hint {
	font-size: 0.85em;
	color: #666;
	margin: 0 0 8px;
}

.molu-calendar {
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 12px;
	margin-bottom: 12px;
	background: #fff;
	max-width: 100%;
	overflow: hidden;
}

.molu-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
	font-weight: 600;
	text-transform: capitalize;
}

.molu-cal-label {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.molu-cal-nav {
	/* Mørk bakgrunn + lys pil (samme fargetokens som resten av widgeten), i
	   stedet for det tidligere flate lysgrå-på-lysgrå som ga dårlig kontrast. */
	background: var(--molu-accent);
	color: var(--molu-accent-text);
	border: none;
	border-radius: 6px;
	width: 32px;
	height: 32px;
	min-width: 32px;
	padding: 0;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1em;
	line-height: 1;
}

.molu-cal-nav:hover:not(:disabled) {
	filter: brightness(0.93);
}

.molu-cal-nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.molu-cal-grid {
	display: grid;
	/* minmax(0, 1fr) i stedet for bare 1fr – uten dette kan hver kolonne bli
	   bredere enn sin rettferdige andel (pga. knappenes egen minste-bredde),
	   som gjør at hele kalenderen sprenger skjermbredden på mobil. */
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	text-align: center;
}

.molu-cal-daylabel {
	font-size: 0.75em;
	color: #888;
	text-transform: uppercase;
	padding: 4px 0;
}

.molu-cal-day {
	aspect-ratio: 1 / 1;
	border: none;
	background: var(--molu-day-bg);
	color: var(--molu-day-text);
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.9em;
	min-height: 32px;
	min-width: 0;
	padding: 0;
	width: 100%;
}

.molu-cal-day:hover:not(:disabled) {
	/* Justerer dynamisk relativt til valgt bakgrunnsfarge, i stedet for en fast farge. */
	filter: brightness(0.93);
}

.molu-cal-day-empty {
	background: transparent;
	cursor: default;
}

.molu-cal-day-disabled {
	background: repeating-linear-gradient(45deg, #f1f1f1, #f1f1f1 4px, #e6e6e6 4px, #e6e6e6 8px);
	color: #bbb;
	cursor: not-allowed;
}

.molu-cal-day-selected {
	background: var(--molu-accent);
	color: var(--molu-accent-text);
	font-weight: 700;
}

.molu-cal-day-inrange {
	background: var(--molu-range);
}

.molu-selected-range {
	background: #f7f7f7;
	border-radius: 6px;
	padding: 8px 12px;
	margin-bottom: 12px;
	font-size: 0.95em;
}

/* Vises kun når valgt periode er en gjenkjent helgeleie (lørdag+søndag,
   henting fredag) – se MoluCalendar.prototype.updateSelectionUI() i JS. */
.molu-weekend-hint {
	background: #fff7ed;
	border: 1px solid #fdba74;
	color: #9a3412;
	border-radius: 6px;
	padding: 8px 12px;
	margin: -4px 0 12px;
	font-size: 0.85em;
}

/* «Vil du også leie fredag?» – samme synlighet som .molu-weekend-hint over. */
.molu-weekend-friday-toggle {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.85em;
	color: #444;
	margin: -6px 0 12px;
	cursor: pointer;
}

.molu-weekend-friday-toggle input {
	margin-top: 3px;
	flex: 0 0 auto;
}

.molu-promo-box {
	margin-bottom: 12px;
}

.molu-promo-box label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 0.9em;
}

.molu-promo-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.molu-promo-input {
	flex: 1 1 140px;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1em;
	text-transform: uppercase;
}

.molu-promo-apply {
	flex: 0 0 auto;
}

.molu-promo-msg {
	min-height: 1.2em;
	font-size: 0.85em;
	margin: 4px 0 0;
	color: #2a7a4a;
}

.molu-promo-msg.molu-error {
	color: #b91c1c;
}

.molu-clear-range {
	background: none;
	border: none;
	color: #b91c1c;
	cursor: pointer;
	text-decoration: underline;
	margin-left: 8px;
	font-size: 0.9em;
}

.molu-booking-form p {
	margin: 0 0 10px;
}

.molu-booking-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 0.9em;
}

.molu-booking-form input[type="text"],
.molu-booking-form input[type="email"],
.molu-booking-form input[type="tel"],
.molu-booking-form textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 1em;
}

.molu-hp-field {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.molu-submit-btn {
	background: var(--molu-accent);
	color: var(--molu-accent-text);
	border: none;
	border-radius: 6px;
	padding: 10px 20px;
	font-size: 1em;
	cursor: pointer;
}

.molu-submit-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* «Legg i kurv» + «Send forespørsel» side ved side (se
   render_booking_shortcode()/handlekurv-funksjonen i JS). */
.molu-form-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 6px;
}

.molu-add-cart-btn {
	background: #fff;
	color: var(--molu-accent);
	border: 2px solid var(--molu-accent);
	border-radius: 6px;
	padding: 9px 18px;
	font-size: 1em;
	cursor: pointer;
}

.molu-add-cart-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.molu-add-cart-btn:hover:not(:disabled) {
	background: var(--molu-day-bg);
}

.molu-cart-hint {
	font-size: 0.85em;
	color: #666;
	margin: 0;
}

.molu-form-msg {
	min-height: 1.2em;
	font-size: 0.9em;
}

.molu-form-msg.molu-error {
	color: #b91c1c;
}

.molu-price-summary {
	background: #f7f7f7;
	border-radius: 6px;
	padding: 10px 12px;
	margin-bottom: 12px;
	font-size: 0.9em;
}

.molu-price-row-line {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 2px 0;
}

.molu-price-row-total {
	border-top: 1px solid #ddd;
	margin-top: 4px;
	padding-top: 6px;
	font-weight: 700;
	color: var(--molu-accent);
}

.molu-price-row-total-vat {
	font-weight: 600;
	color: #555;
}

.molu-price-note {
	margin: 6px 0 0;
	font-size: 0.85em;
	color: #777;
}

.molu-success-msg {
	background: #ecfdf5;
	border: 1px solid #10b981;
	color: #065f46;
	border-radius: 6px;
	padding: 14px;
}

.molu-error {
	color: #b91c1c;
}

/* Maskinliste-shortcode */
.molu-machine-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.molu-machine-card {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.molu-machine-thumb img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	display: block;
}

.molu-machine-card h3 {
	margin: 10px 12px 4px;
	font-size: 1.05em;
}

.molu-machine-card .molu-price {
	margin: 0 12px 8px;
	font-size: 1.1em;
}

.molu-machine-cta {
	display: block;
	text-align: center;
	background: var(--molu-accent);
	color: var(--molu-accent-text);
	text-decoration: none;
	padding: 10px;
	margin-top: 8px;
}

@media (max-width: 480px) {
	.molu-booking-widget {
		max-width: 100%;
	}
}

/* ------------------------------------------------------------------ *
 *  Flytende handlekurv-widget (se render_cart_widget() og MoluCart i
 *  molu-booking-frontend.js) – knapp nederst i høyre hjørne som åpner et
 *  slide-over-panel med alle maskiner kunden har lagt i kurven.
 * ------------------------------------------------------------------ */

.molu-cart-widget {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 9999;
	font-family: inherit;
	line-height: 1.5;
}

.molu-cart-widget,
.molu-cart-widget *,
.molu-cart-widget *::before,
.molu-cart-widget *::after {
	box-sizing: border-box;
}

/* Skjult helt til kunden har lagt noe i kurven – da fjernes klassen under av JS. */
.molu-cart-widget:not(.molu-cart-widget-has-items) .molu-cart-toggle {
	display: none;
}

.molu-cart-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--molu-accent);
	color: var(--molu-accent-text);
	border: none;
	border-radius: 999px;
	padding: 12px 18px;
	font-size: 0.95em;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.molu-cart-count {
	background: rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	min-width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85em;
	padding: 0 6px;
}

.molu-cart-panel {
	position: fixed;
	right: 16px;
	bottom: 76px;
	top: 16px;
	width: 360px;
	max-width: calc(100vw - 32px);
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
	padding: 16px;
	overflow-y: auto;
	color: #1a1a1a;
}

.molu-cart-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.molu-cart-panel-head h3 {
	margin: 0;
	font-size: 1.1em;
}

.molu-cart-close {
	background: none;
	border: none;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
	color: #666;
	padding: 0 4px;
}

.molu-cart-empty {
	font-size: 0.9em;
	color: #666;
}

.molu-cart-line {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 10px;
	margin-bottom: 10px;
}

.molu-cart-line-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 6px;
}

.molu-cart-line-name {
	font-weight: 600;
	font-size: 0.95em;
}

.molu-cart-line-remove {
	background: none;
	border: none;
	color: #b91c1c;
	font-size: 1.2em;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
	flex: 0 0 auto;
}

.molu-cart-line-dates {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}

.molu-cart-line-dates input[type="date"] {
	flex: 1 1 120px;
	min-width: 0;
	padding: 6px 8px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 0.9em;
}

.molu-cart-line-price {
	font-weight: 700;
	font-size: 0.95em;
	text-align: right;
}

.molu-cart-line-discount-note {
	font-weight: 400;
	color: #15803d;
	font-size: 0.85em;
}

/* Samme stil-prinsipp som .molu-weekend-hint i selve kalenderen. */
.molu-cart-line-weekend-note {
	background: #fff7ed;
	border: 1px solid #fdba74;
	color: #9a3412;
	border-radius: 6px;
	padding: 6px 8px;
	margin: 6px 0 0;
	font-size: 0.8em;
}

.molu-cart-line-msg {
	color: #b91c1c;
	font-size: 0.85em;
	margin: 4px 0 0;
	min-height: 1em;
}

.molu-cart-total {
	margin: 10px 0 14px;
	font-size: 0.9em;
}

.molu-cart-terms-hint {
	font-size: 0.85em;
	color: #666;
	margin: 0 0 10px;
}

.molu-cart-customer-form .molu-promo-box {
	margin-bottom: 12px;
}

.molu-cart-submit-form p {
	margin: 0 0 10px;
}

.molu-cart-submit-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 0.9em;
}

.molu-cart-submit-form input[type="text"],
.molu-cart-submit-form input[type="email"],
.molu-cart-submit-form input[type="tel"],
.molu-cart-submit-form textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 1em;
}

.molu-cart-submit-btn {
	background: var(--molu-accent);
	color: var(--molu-accent-text);
	border: none;
	border-radius: 6px;
	padding: 10px 20px;
	font-size: 1em;
	cursor: pointer;
	width: 100%;
}

@media (max-width: 480px) {
	.molu-cart-panel {
		right: 8px;
		left: 8px;
		width: auto;
		bottom: 70px;
	}

	.molu-cart-widget {
		right: 8px;
		bottom: 8px;
	}
}
