/*
  Wedding theme colours
  Change these CSS variables to recolour the whole website.
  The HTML uses Tailwind-style classes such as bg-primary, text-accent,
  bg-secondary/40, border-border, text-muted-foreground, etc.
*/
:root {
  --radius: .75rem;
  --background: oklch(98.5% .012 80);
  --foreground: oklch(22% .04 25);
  --card: oklch(99.5% .008 80);
  --card-foreground: oklch(22% .04 25);
  --popover: oklch(99.5% .008 80);
  --popover-foreground: oklch(22% .04 25);
  --primary: oklch(38% .13 25);
  --primary-foreground: oklch(98.5% .012 80);
  --secondary: oklch(94% .025 75);
  --secondary-foreground: oklch(30% .08 25);
  --muted: oklch(95% .018 75);
  --muted-foreground: oklch(48% .04 40);
  --accent: oklch(70% .12 60);
  --accent-foreground: oklch(98.5% .012 80);
  --destructive: oklch(55% .22 27);
  --destructive-foreground: oklch(98.5% 0 0);
  --border: oklch(88% .02 70);
  --input: oklch(90% .02 70);
  --ring: oklch(38% .13 25);
  --font-display: "Cormorant Garamond", ui-serif, Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

.country-menu {
  display: none;
  position: absolute;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 15rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: var(--popover);
  color: var(--popover-foreground);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
  padding: .35rem;
}

.country-menu.open {
  display: block;
}

.country-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: .55rem .7rem;
  border-radius: .5rem;
  font-size: .875rem;
  transition: background .2s ease;
}

.country-menu button:hover {
  background: color-mix(in oklab, var(--secondary) 75%, transparent);
}

.theme-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(1rem);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 999px;
  padding: .75rem 1.1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
  transition: opacity .25s ease, transform .25s ease;
  font-size: .875rem;
}

.theme-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mini admin dashboard helpers */
.admin-input,
.admin-textarea {
  width: 100%;
  margin-top: .375rem;
  border: 1px solid var(--input);
  background: transparent;
  color: var(--foreground);
  border-radius: .5rem;
  padding: .55rem .75rem;
  font-size: .875rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  outline: none;
}

.admin-input:focus,
.admin-textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring);
}

.admin-textarea {
  min-height: 10rem;
  resize: vertical;
}

.admin-table {
  border-collapse: collapse;
  min-width: 1150px;
}

.admin-table th,
.admin-table td {
  padding: .8rem .9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  background: color-mix(in oklab, var(--secondary) 75%, transparent);
  color: var(--muted-foreground);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
}

.admin-table td {
  max-width: 18rem;
  color: color-mix(in oklab, var(--foreground) 88%, transparent);
}

.admin-photo-preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: .75rem;
  border: 1px solid var(--border);
  background: var(--secondary);
}

/*wished*/
.wish-popup {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(1rem);
  z-index: 9998;
  width: min(92vw, 420px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.wish-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.wish-popup-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .9rem;
  align-items: start;
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.wish-popup-initials {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--secondary) 70%, transparent);
  color: var(--foreground);
  font-weight: 700;
  letter-spacing: .03em;
}

.wish-popup-label {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .25rem;
}

.wish-popup-message {
  font-size: .9rem;
  line-height: 1.45;
  color: color-mix(in oklab, var(--foreground) 88%, transparent);
}

.wish-popup-author {
  margin-top: .55rem;
  font-size: .75rem;
  color: var(--muted-foreground);
}

.wish-popup-close {
  border: 0;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: .1rem;
}

.wish-popup-close:hover {
  color: var(--foreground);
}