:root {
  --black: #c85533;
  --white: #ede7d4;
  --navy: #0b3864;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cutive Mono", monospace;
  background-color: var(--white);
  color: var(--black);
}

input,
select,
textarea,
button {
  font-family: "Cutive Mono", monospace;
  color: var(--black);
}

/* Structural Layout */

.main {
  max-width: 700px;
  margin: auto;
  padding: 2rem;
}

#main-title {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  font-family: "Ovo", serif;
}

#address,
#date {
  font-size: 1rem;
}

#address p,
#date p {
  margin: 0.2rem;
}

/* Form Styling */

form {
  padding: 1rem 0;
  border-radius: 12px;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.button-row {
  margin-top: 2rem;
  justify-content: flex-end;
}

.form-row label,
.form-row span {
  font-weight: bold;
}

input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 0.25rem 0;
  border: none;
  border-bottom: 1.5px solid var(--black);
  background: transparent;
  font-size: 1rem;
  outline: none;
}

/* Custom Radios */

.custom-radio-group {
  display: flex;
  gap: 1rem;
}

.radio-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding-left: 20px;
}

.radio-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  height: 12px;
  width: 12px;
  border: 1.5px solid var(--black);
  display: inline-block;
  position: absolute;
  left: 0;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.radio-container input:checked ~ .checkmark:after {
  display: block;
}

.radio-container .checkmark:after {
  left: 4px;
  top: -6px;
  width: 4px;
  height: 12px;
  border: solid var(--black);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* RSVP Button Styling */

#submit-btn {
  padding: 0.75rem 2rem;
  border: 2px solid var(--black);
  border-radius: 0;
  background-color: transparent;
  color: var(--black);
  cursor: pointer;
  font-family:  "Cutive Mono", monospace;
  font-size: 1rem;
  font-weight: bold;
  position: relative;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  #submit-btn:hover {
    background-color: var(--white);
    box-shadow: 4px 4px 0px var(--black);
    transform: translate(-4px, -4px);
  }

  #submit-btn:active {
    box-shadow: 0px 0px 0px var(--black);
    transform: translate(0, 0);
  }
}

@media (hover: none) {
  #submit-btn:active {
    background-color: var(--white);
    color: var(--black);
    box-shadow: 4px 4px 0px var(--black);
    transform: translate(-4px, -4px);
  }
}


/* Form feedback */

#form-result {
  text-align: center;
  margin: 1rem;
  color: var(--black);
  font-family: "Ovo", serif;
  font-size: 1.2rem;
  font-weight: bold;
}

.hidden {
  display: none;
}

/* Map Stuff */

#map-container {
  overflow: hidden;
}

.map-point {
  cursor: pointer;
  transition: transform 0.15s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.map-point:hover {
  transform: rotate(0.1turn);
}

.map-point text {
  font-family: "Cutive Mono", monospace;
}

#wedding-map path,
#wedding-map line {
  stroke-linecap: round;
  stroke: var(--black);
  stroke-width: 1.5;
}

#wedding-map rect {
  fill: var(--white);
}

/* Map Popup / Modal */

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  transition: transform 0.2s ease;
  background: var(--white);
  max-width: 320px;
  width: 78vw;
  padding: 14px 14px 28px;
  border: 1.5px solid var(--navy);
  border-radius: 0;
}

.modal-content img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--navy);
}

.modal-content h3 {
  display: none;
}

.modal-content p {
  margin: 14px 4px 0;
  font-family: "Cutive Mono", monospace;
  font-size: 0.95rem;
  text-align: center;
  color: var(--navy);
}

.close-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#modal {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#modal.active {
  background: rgba(0, 0, 0, 0.35);
}

#modal.hidden {
  display: none;
}

#modal-image {
  width: 100%;
  border-radius: 8px;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 2s ease;
}
#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
}
#preloader img {
  width: 500px;
}

