/* ==========================================================================
   Lympne Castle — Castle Closures
   Front-end styles.

   Everything is driven by the custom properties below, taken from the site's
   Elementor globals. To retheme, redeclare any of them further down your
   theme stylesheet — e.g.  .lcc { --lcc-gold: #b8973f; }
   ========================================================================== */

.lcc {
	--lcc-gold: #cfaf58;   /* Elementor: 2b3922d */
	--lcc-ink: #2f3528;    /* Elementor: text    */
	--lcc-cream: #f8f5ed;  /* Elementor: c2aae28 */
	--lcc-sage: #74825f;   /* Elementor: primary */

	--lcc-rule: rgba(47, 53, 40, 0.12);
	--lcc-muted: rgba(47, 53, 40, 0.62);
	--lcc-font-display: ivypresto-display, "Playfair Display", "Times New Roman", Georgia, serif;
	--lcc-font-body: "Work Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	box-sizing: border-box;
	color: var(--lcc-ink);
	font-family: var(--lcc-font-body);
}

.lcc *,
.lcc *::before,
.lcc *::after {
	box-sizing: inherit;
}

/* --------------------------------------------------------------------------
   Listing — wrapper
   The shortcode outputs the dates only; headings and intro copy come from
   Elementor, so this fills whatever container it is dropped into.
   -------------------------------------------------------------------------- */

.lcc-listing {
	width: 100%;
}

/* --------------------------------------------------------------------------
   Listing — month headings
   -------------------------------------------------------------------------- */

.lcc-month {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 34px 0 14px;
	font-family: var(--lcc-font-body);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.26em;
	line-height: 1;
	text-transform: uppercase;
	color: var(--lcc-sage);
}

.lcc-month:first-child {
	margin-top: 0;
}

.lcc-month::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--lcc-rule);
}

/* --------------------------------------------------------------------------
   Listing — items (card style)
   -------------------------------------------------------------------------- */

.lcc-item {
	display: grid;
	grid-template-columns: 76px 1fr auto;
	align-items: center;
	gap: clamp(14px, 2.4vw, 26px);
	padding: 18px clamp(16px, 2.4vw, 24px);
	background: var(--lcc-cream);
	border: 1px solid var(--lcc-rule);
	border-left: 3px solid var(--lcc-gold);
	margin-bottom: 10px;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lcc-item:last-child {
	margin-bottom: 0;
}

@media (hover: hover) {
	.lcc-item:hover {
		transform: translateY(-1px);
		box-shadow: 0 10px 26px -18px rgba(47, 53, 40, 0.55);
	}
}

.lcc-item.is-current {
	border-left-color: var(--lcc-sage);
	background: #fff;
}

.lcc-item.is-past {
	opacity: 0.5;
	border-left-color: var(--lcc-rule);
}

/* Date tile */

.lcc-item__tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 74px;
	padding: 8px 6px;
	background: #fff;
	border: 1px solid var(--lcc-rule);
	border-top: 2px solid var(--lcc-gold);
	text-align: center;
	line-height: 1;
}

.lcc-item.is-current .lcc-item__tile {
	background: var(--lcc-cream);
}

.lcc-tile__day {
	display: block;
	font-family: var(--lcc-font-display);
	font-size: 34px;
	font-weight: 500;
	color: var(--lcc-ink);
}

.lcc-tile__day--range {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 2px;
	font-size: 24px;
}

.lcc-tile__day--range i {
	font-style: normal;
	font-size: 15px;
	color: var(--lcc-gold);
}

.lcc-tile__month {
	display: block;
	margin-top: 7px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--lcc-sage);
}

.lcc-tile__span {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1px;
	font-family: var(--lcc-font-body);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--lcc-ink);
}

.lcc-tile__span i {
	font-style: normal;
	color: var(--lcc-gold);
	line-height: 0.8;
}

/* Body */

.lcc-item__body {
	min-width: 0;
}

.lcc-item__dates {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	margin: 0;
	font-family: var(--lcc-font-display);
	font-size: clamp(17px, 2vw, 21px);
	font-weight: 500;
	line-height: 1.3;
	color: var(--lcc-ink);
}

.lcc-item__nights {
	font-family: var(--lcc-font-body);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--lcc-sage);
	white-space: nowrap;
}

.lcc-item__reason {
	margin-top: 6px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--lcc-muted);
}

.lcc-item__reason p {
	margin: 0 0 0.35em;
}

.lcc-item__reason p:last-child {
	margin-bottom: 0;
}

.lcc-item__reason a {
	color: var(--lcc-ink);
	text-decoration: underline;
	text-decoration-color: var(--lcc-gold);
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: color 0.2s ease;
}

.lcc-item__reason a:hover,
.lcc-item__reason a:focus-visible {
	color: var(--lcc-gold);
}

/* Badge */

.lcc-item__badge {
	margin: 0;
}

.lcc-item__badge span {
	display: inline-block;
	padding: 6px 12px;
	background: var(--lcc-gold);
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.18em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.lcc-item.is-current .lcc-item__badge span {
	background: var(--lcc-sage);
}

.lcc-item.is-past .lcc-item__badge span {
	background: transparent;
	color: var(--lcc-muted);
	border: 1px solid var(--lcc-rule);
}

/* --------------------------------------------------------------------------
   Listing — empty state
   -------------------------------------------------------------------------- */

.lcc-empty {
	padding: clamp(28px, 5vw, 48px) 24px;
	background: var(--lcc-cream);
	border: 1px solid var(--lcc-rule);
	text-align: center;
}

.lcc-empty__mark {
	display: block;
	width: 30px;
	height: 1px;
	margin: 0 auto 18px;
	background: var(--lcc-gold);
}

.lcc-empty p {
	margin: 0;
	font-family: var(--lcc-font-display);
	font-size: clamp(17px, 2.2vw, 21px);
	font-weight: 500;
	line-height: 1.5;
	color: var(--lcc-muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 600px) {
	.lcc-item {
		grid-template-columns: 62px 1fr;
		grid-template-areas:
			"tile body"
			"badge badge";
		row-gap: 12px;
	}

	.lcc-item__tile {
		grid-area: tile;
		min-height: 62px;
	}

	.lcc-item__body {
		grid-area: body;
	}

	.lcc-item__badge {
		grid-area: badge;
	}

	.lcc-tile__day {
		font-size: 27px;
	}

	.lcc-tile__day--range {
		font-size: 19px;
	}
}

/* ==========================================================================
   Popup
   ========================================================================== */

.lcc-popup {
	/* Distance from the bottom/side edge. Raise if it ever clashes with a
	   cookie bar or chat bubble. */
	--lcc-offset: 24px;

	position: fixed;
	z-index: 9000;
	bottom: var(--lcc-offset);
	right: var(--lcc-offset);
	width: min(348px, calc(100vw - 32px));
	font-family: var(--lcc-font-body);
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
	pointer-events: none;
}

.lcc-popup[hidden] {
	display: none;
}

.lcc-popup.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.lcc-popup.is-leaving {
	opacity: 0;
	transform: translateY(10px) scale(0.98);
	pointer-events: none;
}

.lcc-popup__inner {
	background: var(--lcc-cream);
	border: 1px solid var(--lcc-rule);
	border-top: 2px solid var(--lcc-gold);
	box-shadow: 0 24px 60px -28px rgba(13, 26, 19, 0.55);
	padding: 16px 18px 14px;
}

/* Head */

.lcc-popup__head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--lcc-rule);
}

.lcc-popup__crest {
	display: inline-flex;
	color: var(--lcc-gold);
	flex: 0 0 auto;
}

.lcc-popup__title {
	flex: 1 1 auto;
	margin: 0;
	font-family: var(--lcc-font-display);
	font-size: 19px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: var(--lcc-ink);
	text-transform: none;
}

.lcc-popup__close {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: -4px -5px -4px 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	color: var(--lcc-muted);
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.lcc-popup__close:hover,
.lcc-popup__close:focus-visible {
	color: var(--lcc-ink);
	background: rgba(47, 53, 40, 0.07);
}

.lcc-popup__intro {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.55;
	color: var(--lcc-muted);
}

/* List */

.lcc-popup__list {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

/* Divider on the top edge, not the bottom — the last DOM child may be a hidden
   .is-extra row, which would otherwise leave a stray rule above the footer. */
.lcc-popup__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 9px 0;
	border-top: 1px solid var(--lcc-rule);
}

.lcc-popup__item:first-child {
	border-top: 0;
}

.lcc-popup__item.is-extra {
	display: none;
}

.lcc-popup.is-expanded .lcc-popup__item.is-extra {
	display: flex;
}

.lcc-popup__dot {
	flex: 0 0 auto;
	width: 5px;
	height: 5px;
	margin-top: 7px;
	background: var(--lcc-gold);
	transform: rotate(45deg);
}

.lcc-popup__item.is-current .lcc-popup__dot {
	background: var(--lcc-sage);
}

.lcc-popup__text {
	flex: 1 1 auto;
	min-width: 0;
}

.lcc-popup__date {
	display: block;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.35;
	color: var(--lcc-ink);
}

.lcc-popup__reason {
	display: block;
	margin-top: 2px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--lcc-muted);
}

.lcc-popup__reason p {
	margin: 0;
	display: inline;
}

.lcc-popup__reason a {
	color: var(--lcc-ink);
	text-decoration: underline;
	text-decoration-color: var(--lcc-gold);
	text-underline-offset: 2px;
}

.lcc-popup__now {
	flex: 0 0 auto;
	align-self: center;
	padding: 4px 8px;
	background: var(--lcc-sage);
	color: #fff;
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	text-transform: uppercase;
}

/* Foot */

.lcc-popup__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--lcc-rule);
}


button.lcc-popup__toggle[type="button"]:focus, button.lcc-popup__toggle[type="button"]:hover{
	background:#F8F5ED;
}

.lcc-popup__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--lcc-sage);
	font-family: inherit;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
	transition: color 0.2s ease;
}

.lcc-popup__toggle span,
.lcc-popup__toggle svg{
		color: var(--lcc-sage);
}

.lcc-popup__toggle:hover,
.lcc-popup__toggle:focus-visible {
	color: var(--lcc-ink);
}

.lcc-popup__chev {
	transition: transform 0.25s ease;
}

.lcc-popup.is-expanded .lcc-popup__chev {
	transform: rotate(180deg);
}

/* No margin-left:auto — with a toggle present, space-between separates the two;
   alone, the link sits flush left. */
.lcc-popup__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--lcc-ink);
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid var(--lcc-gold);
	padding-bottom: 2px;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.lcc-popup__all:hover,
.lcc-popup__all:focus-visible {
	color: var(--lcc-gold);
	border-color: currentColor;
}

/* Small screens — sit flush along the bottom edge */

@media (max-width: 520px) {
	.lcc-popup {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
	}

	.lcc-popup__inner {
		padding: 14px 15px 12px;
	}

	.lcc-popup__title {
		font-size: 17px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lcc-popup,
	.lcc-item,
	.lcc-popup__chev {
		transition-duration: 0.01ms;
	}
}
