/* Latigara Farm Booking — front-end
 * Selectors are prefixed with :is(#ltg-modal, .ltg-inline) so theme / Elementor
 * button styles can't override the popup. */
:root {
	--ltg-primary: #C5643A;
	--ltg-dark: #8E4224;
	--ltg-bg: #FBF5EC;
	--ltg-text: #2B2520;
	--ltg-muted: #7A6E62;
	--ltg-line: #EADFCE;
	--ltg-card: #FFFFFF;
	--ltg-tint: #F8EAE2;
	--ltg-tint-2: #E9C3AF;
	--ltg-radius: 16px;
}

html.ltg-lock, html.ltg-lock body { overflow: hidden !important; }

/* ---------- modal shell ---------- */
.ltg-modal { position: fixed; inset: 0; z-index: 999999; display: none; }
.ltg-modal.is-open { display: block; }
.ltg-modal__backdrop { position: absolute; inset: 0; background: rgba(43, 37, 32, .55); backdrop-filter: blur(2px); animation: ltg-fade .2s ease; }
.ltg-modal__dialog {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--ltg-bg); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
	animation: ltg-pop .25s ease;
}
.ltg-modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* Close: white outline circle sitting on the hero */
#ltg-modal .ltg-modal__close {
	position: absolute !important; top: 16px !important; right: 16px !important; z-index: 5;
	width: 38px !important; height: 38px !important; min-width: 0 !important; min-height: 0 !important;
	padding: 0 !important; margin: 0 !important;
	display: flex !important; align-items: center; justify-content: center;
	border: 1.5px solid #fff !important; border-radius: 50% !important;
	background: rgba(0, 0, 0, .18) !important; color: #fff !important;
	box-shadow: none !important; cursor: pointer; line-height: 1 !important;
	transition: background .15s, transform .15s;
}
#ltg-modal .ltg-modal__close:hover,
#ltg-modal .ltg-modal__close:focus-visible { background: rgba(255, 255, 255, .22) !important; transform: rotate(90deg); outline: none; }
#ltg-modal .ltg-modal__close svg { display: block; }
#ltg-modal.is-scrolled .ltg-modal__close { background: var(--ltg-primary) !important; border-color: var(--ltg-primary) !important; box-shadow: 0 4px 12px rgba(0, 0, 0, .18) !important; }
#ltg-modal.is-scrolled .ltg-modal__close:hover { background: var(--ltg-dark) !important; }

@keyframes ltg-fade { from { opacity: 0; } }
@keyframes ltg-pop { from { opacity: 0; transform: translate(-50%, -46%); } }

@media (max-width: 600px) {
	.ltg-modal__dialog {
		left: 0; right: 0; bottom: 0; top: auto; transform: none; width: 100%;
		max-height: 94vh; border-radius: 20px 20px 0 0; animation: ltg-up .28s ease;
	}
	@keyframes ltg-up { from { transform: translateY(40px); opacity: 0; } }
}

/* ---------- widget ---------- */
.ltg-wrap { color: var(--ltg-text); font-size: 15px; line-height: 1.5; }
.ltg-wrap *, .ltg-wrap *::before, .ltg-wrap *::after { box-sizing: border-box; }
.ltg-inline .ltg-wrap { background: var(--ltg-bg); border: 1px solid var(--ltg-line); border-radius: 20px; overflow: hidden; max-width: 620px; margin: 0 auto; }

/* hero — full width */
.ltg-head {
	width: 100%; margin: 0; padding: 28px 70px 24px 24px; color: #fff;
	background: linear-gradient(135deg, var(--ltg-primary), var(--ltg-dark));
	position: relative; overflow: hidden;
}
.ltg-head::after {
	content: ""; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%;
	background: rgba(255, 255, 255, .08); pointer-events: none;
}
.ltg-eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.ltg-wrap .ltg-head h3 { margin: 4px 0 2px; font-size: 26px; line-height: 1.2; color: #fff; }
.ltg-tagline { margin: 0; opacity: .92; }
.ltg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; position: relative; z-index: 1; }
.ltg-chip { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; }
.ltg-chip b { font-size: 14px; }
.ltg-includes { margin: 12px 0 0; font-size: 13px; opacity: .92; position: relative; z-index: 1; }
.ltg-includes span { font-weight: 700; margin-right: 4px; }

.ltg-step { padding: 20px 24px 6px; }
.ltg-wrap .ltg-step h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; line-height: 1.3; color: var(--ltg-text); }
.ltg-num {
	width: 26px; height: 26px; border-radius: 50%; flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--ltg-primary); color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
	font-variant-numeric: lining-nums tabular-nums; padding: 0 0 1px; letter-spacing: 0;
}

/* shared reset for every button inside the widget */
:is(#ltg-modal, .ltg-inline) .ltg-wrap button {
	-webkit-appearance: none; appearance: none;
	margin: 0 !important; min-width: 0 !important; min-height: 0 !important;
	box-shadow: none !important; text-transform: none !important; letter-spacing: normal !important;
	font-family: inherit !important; cursor: pointer;
}
:is(#ltg-modal, .ltg-inline) .ltg-wrap button svg { display: block; pointer-events: none; }

/* calendar */
.ltg-cal { background: var(--ltg-card); border: 1px solid var(--ltg-line); border-radius: var(--ltg-radius); padding: 12px 10px 10px; }
.ltg-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; padding: 0 2px; }
.ltg-cal__head strong { font-size: 15px; }
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-cal__nav {
	width: 34px !important; height: 34px !important; padding: 0 !important;
	display: flex !important; align-items: center; justify-content: center;
	border: 1.5px solid var(--ltg-primary) !important; border-radius: 50% !important;
	background: #fff !important; color: var(--ltg-primary) !important; line-height: 1 !important;
}
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-cal__nav:hover:not([disabled]) { background: var(--ltg-primary) !important; color: #fff !important; }
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-cal__nav[disabled] { border-color: var(--ltg-line) !important; color: #CFC6BC !important; cursor: default; }

.ltg-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 2px; transition: opacity .2s; }
.ltg-cal__grid.is-loading { opacity: .45; pointer-events: none; }
.ltg-cal__wd { text-align: center; font-size: 11px; font-weight: 600; color: var(--ltg-muted); padding: 2px 0 4px; }

/* each date = a transparent cell with a perfect circle inside */
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-day {
	display: flex !important; align-items: center; justify-content: center;
	width: 100% !important; height: 46px !important; padding: 0 !important;
	border: 0 !important; border-radius: 0 !important; background: transparent !important;
	color: var(--ltg-text) !important; text-decoration: none !important;
}
.ltg-day__n {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid transparent;
	display: flex; align-items: center; justify-content: center;
	font-size: 14px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
	background: var(--ltg-tint); color: var(--ltg-text);
	transition: background .15s, border-color .15s, transform .1s;
}
:is(#ltg-modal, .ltg-inline) .ltg-day:hover:not([disabled]) .ltg-day__n { border-color: var(--ltg-primary); transform: scale(1.05); }
.ltg-day.is-limited .ltg-day__n { background: #FFE9B8; color: #7A4F00; }
.ltg-day.is-full .ltg-day__n,
.ltg-day.is-closed .ltg-day__n { background: #EFE8E1; color: #B8ADA2; text-decoration: line-through; }
.ltg-day.is-off .ltg-day__n { background: transparent; color: #CFC6BC; }
:is(#ltg-modal, .ltg-inline) .ltg-day[disabled] { cursor: not-allowed; }
:is(#ltg-modal, .ltg-inline) .ltg-day.is-off[disabled] { cursor: default; }
.ltg-day.is-today .ltg-day__n { border-color: var(--ltg-tint-2); }
.ltg-day.is-selected .ltg-day__n,
:is(#ltg-modal, .ltg-inline) .ltg-day.is-selected:hover .ltg-day__n { background: var(--ltg-primary); color: #fff; border-color: var(--ltg-primary); }

/* counters */
.ltg-counters { background: var(--ltg-card); border: 1px solid var(--ltg-line); border-radius: var(--ltg-radius); }
.ltg-counter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.ltg-counter + .ltg-counter { border-top: 1px solid var(--ltg-line); }
.ltg-counter strong { display: block; font-size: 15px; }
.ltg-counter small { display: block; font-size: 12px; color: var(--ltg-muted); }
.ltg-stepper { display: flex; align-items: center; gap: 6px; flex: none; }
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-stepper button {
	width: 38px !important; height: 38px !important; padding: 0 !important; flex: none;
	display: flex !important; align-items: center; justify-content: center;
	border: 1.5px solid var(--ltg-primary) !important; border-radius: 50% !important;
	background: #fff !important; color: var(--ltg-primary) !important; line-height: 1 !important;
	transition: background .15s, color .15s;
}
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-stepper button:hover:not([disabled]) { background: var(--ltg-primary) !important; color: #fff !important; }
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-stepper button[disabled] { border-color: var(--ltg-line) !important; color: #CFC6BC !important; background: #fff !important; cursor: default; }
.ltg-stepper output { min-width: 30px; text-align: center; font-weight: 700; font-size: 17px; line-height: 1; font-variant-numeric: tabular-nums; }
.ltg-hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--ltg-muted); min-height: 1em; }

/* form */
.ltg-form { display: grid; gap: 10px; }
.ltg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .ltg-row { grid-template-columns: 1fr; } }
.ltg-field label { display: block; font-size: 13px; font-weight: 600; color: var(--ltg-text); }
.ltg-field em { font-weight: 400; color: var(--ltg-muted); }
:is(#ltg-modal, .ltg-inline) .ltg-field input,
:is(#ltg-modal, .ltg-inline) .ltg-field textarea {
	display: block; width: 100%; margin-top: 5px; padding: 11px 14px; font: inherit; font-size: 15px; color: var(--ltg-text);
	background: #fff; border: 1.5px solid var(--ltg-line); border-radius: 12px; outline: none; box-shadow: none; transition: border-color .15s;
}
:is(#ltg-modal, .ltg-inline) .ltg-field textarea { resize: vertical; min-height: 70px; }
:is(#ltg-modal, .ltg-inline) .ltg-field input:focus,
:is(#ltg-modal, .ltg-inline) .ltg-field textarea:focus { border-color: var(--ltg-primary); }
.ltg-phone { display: flex; margin-top: 5px; }
.ltg-phone span { display: flex; align-items: center; padding: 0 12px; background: var(--ltg-tint); border: 1.5px solid var(--ltg-line); border-right: 0; border-radius: 12px 0 0 12px; font-weight: 600; }
:is(#ltg-modal, .ltg-inline) .ltg-phone input { margin-top: 0; border-radius: 0 12px 12px 0; }
:is(#ltg-modal, .ltg-inline) .ltg-field.is-error input,
:is(#ltg-modal, .ltg-inline) .ltg-field.is-error textarea { border-color: #C0392B; background: #FFF7F6; }
.ltg-hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }
.ltg-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ltg-muted); cursor: pointer; }
.ltg-check input { margin-top: 3px; accent-color: var(--ltg-primary); width: 16px; height: 16px; }

/* summary */
.ltg-summary {
	position: sticky; bottom: 0; z-index: 2; margin-top: 18px; padding: 16px 24px 18px;
	background: #fff; border-top: 1px solid var(--ltg-line); box-shadow: 0 -10px 30px rgba(43, 37, 32, .06);
}
.ltg-sum__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ltg-sum__top small { display: block; font-size: 12px; color: var(--ltg-muted); }
.ltg-sum__top strong { font-size: 15px; }
.ltg-sum__total { text-align: right; }
.ltg-sum__total strong { font-size: 22px; color: var(--ltg-primary); }
.ltg-lines { margin: 8px 0 4px; }
.ltg-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--ltg-muted); padding: 2px 0; }
.ltg-alert { margin: 8px 0; padding: 9px 12px; border-radius: 10px; background: #FDECEA; color: #A93226; font-size: 13px; }
.ltg-msg { display: none; margin: 8px 0; padding: 9px 12px; border-radius: 10px; background: #FDECEA; color: #A93226; font-size: 13px; }
.ltg-msg.is-on { display: block; }

/* pay button — always the primary colour */
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-pay {
	display: flex !important; align-items: center; justify-content: center; gap: 8px;
	width: 100% !important; margin-top: 10px !important; padding: 14px 20px !important;
	background: var(--ltg-primary) !important; color: #fff !important;
	border: 0 !important; border-radius: 999px !important;
	font-size: 16px !important; font-weight: 700 !important; line-height: 1.2 !important;
	opacity: 1 !important; transition: background .15s, transform .1s;
}
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-pay:hover:not([disabled]) { background: var(--ltg-dark) !important; }
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-pay:active:not([disabled]) { transform: scale(.99); }
:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-pay[disabled] { opacity: .55 !important; cursor: not-allowed; }

/* standalone [ltg_book_button] */
a.ltg-btn, a.ltg-btn:visited {
	display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px;
	background: var(--ltg-primary); color: #fff !important; border-radius: 999px; font-weight: 700; text-decoration: none !important;
}
a.ltg-btn:hover { background: var(--ltg-dark); }

.ltg-secure { margin: 10px 0 0; text-align: center; font-size: 12px; color: var(--ltg-muted); }
.ltg-secure svg { vertical-align: -2px; color: #2E8B57; }
.ltg-secure a { color: var(--ltg-primary); }
.ltg-spin { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: ltg-rot .7s linear infinite; }
@keyframes ltg-rot { to { transform: rotate(360deg); } }

/* toast after redirect */
.ltg-toast {
	position: fixed; left: 50%; top: 20px; transform: translateX(-50%); z-index: 999999; max-width: calc(100vw - 32px);
	padding: 12px 44px 12px 16px; border-radius: 12px; background: #fff; color: var(--ltg-text);
	border-left: 4px solid #C0392B; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-size: 14px;
}
.ltg-toast button { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ltg-muted); }

@media (max-width: 600px) {
	.ltg-day__n { width: 36px; height: 36px; font-size: 13.5px; }
	:is(#ltg-modal, .ltg-inline) .ltg-wrap .ltg-day { height: 42px !important; }
}
@media (max-width: 420px) {
	.ltg-head { padding-left: 16px; }
	.ltg-step, .ltg-summary { padding-left: 16px; padding-right: 16px; }
	.ltg-day__n { width: 34px; height: 34px; }
}
