html {
	scrollbar-gutter: stable;
}

/* --- 90s Unified Theme --- */
:root {
	--bg-color: blanchedalmond;
	--text-color: darkslategray;
	--link-color: blue;
	--link-hover: red;
	--border-color: #999;
	--panel-bg: #fff;
	--shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

* {
	box-sizing: border-box;
}

body {
	background-color: var(--bg-color);
	font-family: "Times New Roman", Times, serif; /* Classic 90s feel */
	line-height: 1.4;
	color: var(--text-color);
	margin: 0;
	padding: 20px 10px;
}

#wrapper {
	max-width: 650px;
	margin: 0 auto;
	background: #efefef;
	border: 2px solid #fff;
	border-right-color: #888;
	border-bottom-color: #888;
	padding: 20px;
	box-shadow: var(--shadow);
}

h1,
h2 {
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* --- Navigation --- */
.navbar ul {
	list-style: none;
	padding: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	margin-bottom: 20px;
}

.navbar a {
	display: block;
	padding: 10px 15px;
	color: var(--link-color);
	font-weight: bold;
	text-decoration: underline;
}

.navbar a:hover {
	color: var(--link-hover);
}
.navbar a.active {
	color: black;
	text-decoration: none;
}

/* --- Form Aesthetics --- */
form {
	background: var(--panel-bg);
	border: 2px solid #888;
	border-right-color: #fff;
	border-bottom-color: #fff;
	padding: 20px;
	margin-bottom: 20px;
}

.form-group {
	margin-bottom: 15px;
	display: flex;
	flex-direction: column;
}

label {
	font-weight: bold;
	margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
	width: 100%;
	padding: 8px;
	border: 2px solid #888;
	border-top-color: #333;
	border-left-color: #333;
	background: #fff;
	font-family: sans-serif;
	font-size: 1rem;
}

/* --- Buttons --- */
.actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

button {
	padding: 8px 20px;
	font-weight: bold;
	cursor: pointer;
	background: #ccc;
	border: 2px solid #fff;
	border-right-color: #444;
	border-bottom-color: #444;
}

button:active {
	border: 2px solid #444;
	border-right-color: #fff;
	border-bottom-color: #fff;
}

.btn-secondary {
	background: #ddd;
	font-size: 0.8rem;
}

/* --- Mobile Logic --- */
@media (max-width: 480px) {
	.actions {
		flex-direction: column;
	}
	#wrapper {
		padding: 10px;
	}
}

/* --- Special UI Elements --- */
.hidden {
	display: none;
}

fieldset {
	border: 1px solid #999;
	margin-bottom: 15px;
}

.radio-label {
	display: block;
	font-weight: normal;
	padding: 5px 0;
}

.error-text {
	color: red;
	font-weight: bold;
}

.input-error {
	border: 2px solid red !important;
	background-color: #fff0f0 !important;
}

.success-box {
	background: #fff;
	border: 2px solid green;
	padding: 15px;
}

/* Spinner */
#loader {
	text-align: center;
	padding: 20px;
}
.spinner {
	width: 40px;
	height: 40px;
	border: 4px solid blue;
	border-bottom-color: transparent;
	border-radius: 50%;
	display: inline-block;
	animation: rotation 1s linear infinite;
}
@keyframes rotation {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* --- 90s Toast Notification --- */
#toast {
	position: fixed;
	bottom: -100px; /* Start off-screen */
	left: 50%;
	transform: translateX(-50%);
	background: #ccc;
	color: #000;
	padding: 10px 20px;
	font-family: "Courier New", Courier, monospace;
	font-weight: bold;
	border: 3px solid #fff;
	border-right-color: #444;
	border-bottom-color: #444;
	box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
	z-index: 9999;
	transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	text-align: center;
	min-width: 250px;
}

#toast.show {
	bottom: 30px; /* Slide up */
}

/* Success vs Error colors the 90s way */
#toast.success {
	border-left-color: #fff;
}
#toast.error {
	color: #a00;
	border: 3px solid red;
}

/* No new CSS needed if you are using the previous block, 
   but ensure .hidden is respected! */
#cancel-edit-button {
	margin-left: 10px;
}

/* --- Home Page Specifics --- */

.panel {
	background: var(--panel-bg);
	border: 2px solid #888;
	border-right-color: #fff;
	border-bottom-color: #fff;
	padding: 15px;
	margin-bottom: 20px;
}

.panel h2 {
	text-align: left;
	font-size: 1.2rem;
	margin-top: 0;
	border-bottom: 1px solid #ccc;
	padding-bottom: 5px;
	color: #2f4f4f;
}

.highlight {
	background: #fff9e6; /* Slight warm tint for CTA */
	border: 2px solid #d4af37; /* Wedding Gold */
}

/* Schedule Layout */
.schedule {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-family: "Courier New", Courier, monospace;
}

.schedule-row {
	display: flex;
	justify-content: space-between;
	border-bottom: 1px dashed #ccc;
}

.schedule-row span:first-child {
	font-weight: bold;
	min-width: 60px;
}

/* Make links look like buttons */
.button-link {
	display: inline-block;
	padding: 10px 20px;
	background: #ccc;
	color: #000 !important;
	text-decoration: none !important;
	font-weight: bold;
	border: 2px solid #fff;
	border-right-color: #444;
	border-bottom-color: #444;
}

.button-link:hover {
	background: #ddd;
}

.image-panel {
	text-align: center;
}

.caption {
	font-style: italic;
	font-size: 0.9rem;
	margin-top: 10px;
}

.info-block p {
	margin-bottom: 10px;
}

/* --- Table Styling --- */
.retro-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
	background: #fff;
	border: 2px solid #888;
}

.retro-table th {
	background: #ccc;
	border: 2px solid #fff;
	border-right-color: #888;
	border-bottom-color: #888;
	padding: 8px;
	text-align: left;
	text-transform: uppercase;
	font-size: 0.8rem;
}

.retro-table td {
	border: 1px solid #ccc;
	padding: 8px;
	font-size: 0.9rem;
}

/* --- High Alert Warnings --- */
.highlight-red {
	border: 2px solid red !important;
	background-color: #fff0f0;
}

.highlight-red h2 {
	color: red;
}

/* --- What3Words Styling --- */
.w3w {
	display: inline-block;
	background: #e11f26;
	color: white;
	padding: 2px 8px;
	font-family: monospace;
	font-weight: bold;
	margin-top: 5px;
}

/* Content headings */
h3 {
	font-size: 1rem;
	border-left: 4px solid var(--text-color);
	padding-left: 10px;
	margin-top: 25px;
	color: #2f4f4f;
}

a:visited {
	color: var(--link-color);
}

.badge {
	background: #333;
	color: #fff;
	padding: 5px 10px;
	font-size: 0.8rem;
	margin-bottom: 15px;
	display: inline-block;
}

/* --- Global Fixes --- */
html {
	/* Prevents the 'jump' between long and short pages */
	scrollbar-gutter: stable;
}

:root {
	--bg-color: blanchedalmond;
	--text-color: darkslategray;
	--link-color: blue;
	--link-hover: red;
	--border-color: #999;
	--panel-bg: #fff;
	--shadow: 4px 4px 0px rgba(0, 0, 0, 0.2);
}

* {
	box-sizing: border-box;
}

body {
	background-color: var(--bg-color);
	font-family: "Times New Roman", Times, serif;
	line-height: 1.4;
	color: var(--text-color);
	margin: 0;
	padding: 20px 10px;
}

/* --- Main Layout Container --- */
#wrapper {
	max-width: 650px;
	margin: 0 auto;
	background: #efefef;
	border: 2px solid #fff;
	border-right-color: #888;
	border-bottom-color: #888;
	padding: 20px;
	box-shadow: var(--shadow);
}

h1,
h2 {
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* --- Navigation --- */
.navbar ul {
	list-style: none;
	padding: 0;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	margin-bottom: 20px;
}

.navbar a {
	display: block;
	padding: 10px 15px;
	color: var(--link-color);
	font-weight: bold;
	text-decoration: underline;
}

.navbar a:hover {
	color: var(--link-hover);
}

.navbar a:visited {
	color: var(--link-color); /* Keeps links from turning purple */
}

.navbar a.active {
	color: black;
	text-decoration: none;
}

/* --- Content Panels (Home, Accom, Transport) --- */
.panel {
	background: var(--panel-bg);
	border: 2px solid #888;
	border-right-color: #fff;
	border-bottom-color: #fff;
	padding: 15px;
	margin-bottom: 20px;
}

.panel h2 {
	text-align: left;
	font-size: 1.2rem;
	margin-top: 0;
	border-bottom: 1px solid #ccc;
	padding-bottom: 5px;
	color: #2f4f4f;
}

.highlight {
	background: #fff9e6;
	border: 2px solid #d4af37;
}

.highlight-red {
	border: 2px solid red !important;
	background-color: #fff0f0;
}

.highlight-red h2 {
	color: red;
}

/* --- RSVP Form Aesthetics --- */
form {
	background: var(--panel-bg);
	border: 2px solid #888;
	border-right-color: #fff;
	border-bottom-color: #fff;
	padding: 20px;
	margin-bottom: 20px;
}

.form-group {
	margin-bottom: 15px;
	display: flex;
	flex-direction: column;
}

label {
	font-weight: bold;
	margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
	width: 100%;
	padding: 8px;
	border: 2px solid #888;
	border-top-color: #333;
	border-left-color: #333;
	background: #fff;
	font-family: sans-serif;
	font-size: 1rem;
}

/* Validation Highlighting */
.input-error {
	border: 2px solid red !important;
	background-color: #fff0f0 !important;
}

fieldset.invalid-group {
	border: 2px solid red !important;
	background-color: #fff0f0;
}

.field-error {
	color: red;
	font-size: 0.85rem;
	font-weight: bold;
	margin-top: 4px;
}

/* --- Guest Entries (RSVP Dynamic List) --- */
.guest-entry {
	background: #f4f4f4;
	border: 1px solid #ccc;
	padding: 15px;
	margin-bottom: 15px;
	position: relative;
}

.remove-guest-btn {
	position: absolute;
	top: 5px;
	right: 5px;
	background: #ff4444;
	color: white;
	border: 1px solid #000;
	cursor: pointer;
	font-weight: bold;
}

/* --- Buttons --- */
.actions {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

button {
	padding: 8px 20px;
	font-weight: bold;
	cursor: pointer;
	background: #ccc;
	border: 2px solid #fff;
	border-right-color: #444;
	border-bottom-color: #444;
}

button:active {
	border: 2px solid #444;
	border-right-color: #fff;
	border-bottom-color: #fff;
}

.btn-secondary {
	background: #ddd;
	font-size: 0.8rem;
}

/* --- Schedule & Tables --- */
.schedule {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-family: "Courier New", Courier, monospace;
}

.schedule-row {
	display: flex;
	justify-content: space-between;
	border-bottom: 1px dashed #ccc;
}

.retro-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
	background: #fff;
	border: 2px solid #888;
}

.retro-table th,
.retro-table td {
	border: 1px solid #ccc;
	padding: 8px;
}

.retro-table th {
	background: #ccc;
	text-transform: uppercase;
	font-size: 0.8rem;
}

/* --- Success State & Toasts --- */
#toast {
	position: fixed;
	bottom: -100px;
	left: 50%;
	transform: translateX(-50%);
	background: #ccc;
	color: #000;
	padding: 10px 20px;
	font-family: "Courier New", Courier, monospace;
	font-weight: bold;
	border: 3px solid #fff;
	border-right-color: #444;
	border-bottom-color: #444;
	box-shadow: var(--shadow);
	z-index: 9999;
	transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#toast.show {
	bottom: 30px;
}
#toast.error {
	color: #a00;
	border: 3px solid red;
}

.success-box {
	background: #fff;
	border: 2px solid green;
	padding: 15px;
}

/* --- Animations & Utilities --- */
.hidden {
	display: none;
}

.badge {
	background: #333;
	color: #fff;
	padding: 5px 10px;
	font-size: 0.8rem;
	display: inline-block;
}

#loader {
	text-align: center;
	padding: 20px;
}
.spinner {
	width: 40px;
	height: 40px;
	border: 4px solid blue;
	border-bottom-color: transparent;
	border-radius: 50%;
	display: inline-block;
	animation: rotation 1s linear infinite;
}
@keyframes rotation {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* 90s Marquee Success */
.success-marquee {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background: #d4af37;
	color: white;
	padding: 10px 0;
	z-index: 10000;
	overflow: hidden;
	white-space: nowrap;
}
.success-marquee span {
	display: inline-block;
	padding-left: 100%;
	animation: marquee 10s linear infinite;
}
@keyframes marquee {
	0% {
		transform: translate(0, 0);
	}
	100% {
		transform: translate(-100%, 0);
	}
}

/* Mobile Logic */
@media (max-width: 480px) {
	.actions {
		flex-direction: column;
	}
	#wrapper {
		padding: 10px;
	}
	.schedule-row {
		flex-direction: column;
	}
}
