:root {
  --invite-border-image: url("./assets/invite-border.png?v=1");
  --bg-top: #eef3fb;
  --bg-bottom: #bfd0ea;
  --bg-accent: #6d86b3;
  --bg-deep: #3d5f97;
  --panel: rgba(252, 253, 255, 0.82);
  --panel-edge: rgba(255, 255, 255, 0.88);
  --border: rgba(70, 102, 154, 0.16);
  --text: #294066;
  --text-soft: rgba(41, 64, 102, 0.72);
  --accept: #6b86ba;
  --accept-deep: #41639b;
  --decline: rgba(255, 255, 255, 0.72);
  --shadow: 0 34px 120px rgba(49, 76, 118, 0.18);
  --font-display: "IBM Plex Sans Arabic", "Noto Kufi Arabic", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.4), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.86), transparent 20%),
    radial-gradient(circle at 15% 16%, rgba(146, 170, 215, 0.62), transparent 30%),
    radial-gradient(circle at 84% 68%, rgba(61, 95, 151, 0.2), transparent 26%),
    radial-gradient(circle at bottom left, rgba(125, 153, 204, 0.36), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
  opacity: 0.22;
  pointer-events: none;
}

#app {
  min-height: 100svh;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.7;
  pointer-events: none;
}

.ambient-a {
  width: 460px;
  height: 460px;
  top: 1%;
  right: -120px;
  background: radial-gradient(circle, rgba(191, 210, 239, 0.88), rgba(191, 210, 239, 0));
}

.ambient-b {
  width: 380px;
  height: 380px;
  bottom: 2%;
  left: -110px;
  background: radial-gradient(circle, rgba(115, 145, 196, 0.6), rgba(115, 145, 196, 0));
}

.ambient-c {
  width: 280px;
  height: 280px;
  top: 42%;
  left: 8%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0));
}

.page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.4), transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12), transparent 44%);
  pointer-events: none;
}

.invite-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  padding: 46px 30px 32px;
  border-radius: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.94));
  border: 0;
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.invite-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 18px;
  background:
    var(--invite-border-image) center / 100% 100% no-repeat,
    radial-gradient(circle at 18px 18px, transparent 0 18px, rgba(61, 95, 151, 0.96) 18px 24px, transparent 24px) top left / 96px 96px no-repeat,
    radial-gradient(circle at calc(100% - 18px) 18px, transparent 0 18px, rgba(61, 95, 151, 0.96) 18px 24px, transparent 24px) top right / 96px 96px no-repeat,
    radial-gradient(circle at 18px calc(100% - 18px), transparent 0 18px, rgba(61, 95, 151, 0.96) 18px 24px, transparent 24px) bottom left / 96px 96px no-repeat,
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), transparent 0 18px, rgba(61, 95, 151, 0.96) 18px 24px, transparent 24px) bottom right / 96px 96px no-repeat,
    radial-gradient(circle, rgba(61, 95, 151, 0.92) 0 24%, transparent 26%) top center / 42px 42px repeat-x,
    radial-gradient(circle, rgba(61, 95, 151, 0.92) 0 24%, transparent 26%) bottom center / 42px 42px repeat-x,
    radial-gradient(circle, rgba(61, 95, 151, 0.92) 0 24%, transparent 26%) left center / 42px 42px repeat-y,
    radial-gradient(circle, rgba(61, 95, 151, 0.92) 0 24%, transparent 26%) right center / 42px 42px repeat-y,
    linear-gradient(90deg, rgba(61, 95, 151, 0.95), rgba(109, 134, 179, 0.96), rgba(61, 95, 151, 0.95)) top / calc(100% - 120px) 12px no-repeat,
    linear-gradient(90deg, rgba(61, 95, 151, 0.95), rgba(109, 134, 179, 0.96), rgba(61, 95, 151, 0.95)) bottom / calc(100% - 120px) 12px no-repeat,
    linear-gradient(180deg, rgba(61, 95, 151, 0.95), rgba(109, 134, 179, 0.96), rgba(61, 95, 151, 0.95)) left / 12px calc(100% - 120px) no-repeat,
    linear-gradient(180deg, rgba(61, 95, 151, 0.95), rgba(109, 134, 179, 0.96), rgba(61, 95, 151, 0.95)) right / 12px calc(100% - 120px) no-repeat;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.92;
  pointer-events: none;
}

.invite-panel::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(105, 130, 175, 0.08);
  pointer-events: none;
}

.panel-ornament {
  width: 78px;
  height: 7px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #96aed6, var(--bg-deep), transparent);
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: #728ab2;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.7rem);
  line-height: 1.08;
}

.note,
.event-label,
.field span,
.status {
  color: var(--text-soft);
}

.note {
  margin: 16px 0 28px;
  line-height: 1.85;
}

.location-card {
  display: block;
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(70, 102, 154, 0.14);
  box-shadow: 0 18px 40px rgba(49, 76, 118, 0.1);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.location-card-minimal {
  margin: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.location-card-minimal:hover {
  transform: none;
  box-shadow: none;
}

.location-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(49, 76, 118, 0.14);
}

.location-card.disabled {
  pointer-events: none;
  opacity: 0.75;
}

.location-preview {
  position: relative;
  height: 170px;
  background-color: #d8ccb7;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.location-copy {
  display: grid;
  gap: 6px;
  padding: 16px 18px 18px;
  text-align: right;
}

.location-kicker {
  font-size: 0.82rem;
  color: #728ab2;
}

.location-copy strong {
  font-size: 1.02rem;
}

.location-copy span:last-child {
  color: var(--text-soft);
}

.location-hint-top {
  margin: 0 0 12px;
  color: var(--text-soft);
  line-height: 1.8;
}

.result-state {
  display: grid;
  gap: 16px;
  text-align: center;
}

.result-state-accepted {
  gap: 18px;
}

.result-state-declined {
  min-height: 180px;
  place-content: center;
}

.result-message {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.9;
}

.accepted-message {
  color: #42639a;
}

.declined-message {
  color: #5976a8;
}

.field {
  display: grid;
  gap: 10px;
  text-align: right;
}

input {
  width: 100%;
  padding: 17px 18px;
  border-radius: 20px;
  border: 1px solid rgba(96, 123, 168, 0.16);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus {
  border-color: rgba(83, 112, 164, 0.42);
  box-shadow: 0 0 0 4px rgba(125, 153, 204, 0.18);
  background: rgba(255, 255, 255, 0.96);
}

input::placeholder {
  color: rgba(72, 95, 136, 0.42);
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.button {
  min-height: 58px;
  border-radius: 999px;
  border: 1px solid rgba(96, 123, 168, 0.16);
  font: inherit;
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  background: var(--decline);
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled,
input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.button.is-selected {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accept), var(--accept-deep));
  box-shadow: 0 14px 28px rgba(74, 101, 152, 0.3);
  border-color: transparent;
}

.status {
  min-height: 28px;
  margin: 20px 0 0;
  font-size: 0.95rem;
}

.status.success {
  color: #42639a;
}

.status.error {
  color: #b42318;
}

.status.pending {
  color: #5976a8;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 43, 73, 0.26);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.confirm-dialog {
  position: fixed;
  inset: 50% auto auto 50%;
  width: min(calc(100% - 32px), 420px);
  padding: 28px 24px 22px;
  border-radius: 28px;
  background: rgba(250, 252, 255, 0.94);
  border: 1px solid rgba(81, 111, 162, 0.16);
  box-shadow: 0 24px 80px rgba(34, 55, 91, 0.24);
  transform: translate(-50%, -50%);
  z-index: 16;
  text-align: center;
}

.confirm-dialog-minimal {
  width: min(calc(100% - 32px), 320px);
  padding: 20px;
}

.confirm-kicker {
  margin: 0 0 10px;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: #728ab2;
}

.confirm-dialog h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
}

.confirm-dialog p {
  margin: 0;
  line-height: 1.85;
  color: var(--text-soft);
}

.confirm-actions {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.confirm-button {
  min-height: 54px;
}

.submit-frame {
  display: none;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.confetti-piece {
  position: fixed;
  border-radius: 2px;
  opacity: 0.96;
  animation: confetti-burst 1400ms cubic-bezier(0.18, 0.82, 0.24, 1) forwards;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(95, 44, 29, 0.12);
}

.confetti-burst {
  position: fixed;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 10px rgba(125, 153, 204, 0.2);
  transform: translate(-50%, -50%);
  animation: confetti-ring 700ms ease-out forwards;
}

.decline-spark {
  position: fixed;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(73, 102, 156, 0.9), rgba(255, 255, 255, 0.2));
  transform: translate(-50%, -50%);
  animation: decline-burst 850ms ease-out forwards;
}

.decline-ripple {
  position: fixed;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(73, 102, 156, 0.55);
  transform: translate(-50%, -50%);
  animation: decline-ring 700ms ease-out forwards;
}

@keyframes confetti-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.65);
  }
}

@keyframes confetti-ring {
  0% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(0.4);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.4);
  }
}

@keyframes decline-burst {
  0% {
    opacity: 0.85;
    transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.7);
  }
}

@keyframes decline-ring {
  0% {
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(0.55);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.4);
  }
}

@media (max-width: 560px) {
  .invite-panel {
    padding: 38px 22px 26px;
    border-radius: 26px;
  }

  .invite-panel::before {
    padding: 14px;
    background:
      var(--invite-border-image) center / 100% 100% no-repeat,
      radial-gradient(circle at 14px 14px, transparent 0 14px, rgba(61, 95, 151, 0.96) 14px 19px, transparent 19px) top left / 72px 72px no-repeat,
      radial-gradient(circle at calc(100% - 14px) 14px, transparent 0 14px, rgba(61, 95, 151, 0.96) 14px 19px, transparent 19px) top right / 72px 72px no-repeat,
      radial-gradient(circle at 14px calc(100% - 14px), transparent 0 14px, rgba(61, 95, 151, 0.96) 14px 19px, transparent 19px) bottom left / 72px 72px no-repeat,
      radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), transparent 0 14px, rgba(61, 95, 151, 0.96) 14px 19px, transparent 19px) bottom right / 72px 72px no-repeat,
      radial-gradient(circle, rgba(61, 95, 151, 0.92) 0 24%, transparent 26%) top center / 30px 30px repeat-x,
      radial-gradient(circle, rgba(61, 95, 151, 0.92) 0 24%, transparent 26%) bottom center / 30px 30px repeat-x,
      radial-gradient(circle, rgba(61, 95, 151, 0.92) 0 24%, transparent 26%) left center / 30px 30px repeat-y,
      radial-gradient(circle, rgba(61, 95, 151, 0.92) 0 24%, transparent 26%) right center / 30px 30px repeat-y,
      linear-gradient(90deg, rgba(61, 95, 151, 0.95), rgba(109, 134, 179, 0.96), rgba(61, 95, 151, 0.95)) top / calc(100% - 90px) 10px no-repeat,
      linear-gradient(90deg, rgba(61, 95, 151, 0.95), rgba(109, 134, 179, 0.96), rgba(61, 95, 151, 0.95)) bottom / calc(100% - 90px) 10px no-repeat,
      linear-gradient(180deg, rgba(61, 95, 151, 0.95), rgba(109, 134, 179, 0.96), rgba(61, 95, 151, 0.95)) left / 10px calc(100% - 90px) no-repeat,
      linear-gradient(180deg, rgba(61, 95, 151, 0.95), rgba(109, 134, 179, 0.96), rgba(61, 95, 151, 0.95)) right / 10px calc(100% - 90px) no-repeat;
  }

  .invite-panel::after {
    inset: 14px;
    border-radius: 16px;
  }

  .actions {
    grid-template-columns: 1fr;
  }

}
