@import url("/fonts/fonts.css");
/**
 * Event White Template - Styles
 * Uses local fonts: Raleway (titles), Nunito (body)
 */

/* =============================================================================
   FONT FACES - Local fonts from /public/fonts/
   ============================================================================= */

@font-face {
  font-family: "Raleway";
  src: url("/fonts/Raleway/Raleway-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Raleway";
  src: url("/fonts/Raleway/Raleway-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito/Nunito-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito/Nunito-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 200 1000;
  font-style: italic;
  font-display: swap;
}

/* =============================================================================
   CSS RESET & BASE STYLES
   ============================================================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
  font-size: 16px;
}

body {
  font-family: "Nunito", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: inherit;
}

/* =============================================================================
   COLOR VARIABLES (Slate/White palette)
   ============================================================================= */

:root {
  /* Slate palette */
  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;

  /* Neutrals */
  --color-white: #ffffff;
  --color-gray-100: #f3f4f6;
}

/* =============================================================================
   LAYOUT UTILITIES
   ============================================================================= */

.min-h-screen {
  min-height: 100vh;
}

.max-w-md {
  max-width: 28rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

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

/* =============================================================================
   SPACING UTILITIES
   ============================================================================= */

.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-10 { margin-top: 2.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.my-12 { margin-top: 3rem; margin-bottom: 3rem; }

.gap-2 { gap: 0.5rem; }
.gap-8 { gap: 2rem; }

.space-y-1 > :not(:last-child) { margin-bottom: 0.25rem; }
.space-y-2 > :not(:last-child) { margin-bottom: 0.5rem; }
.space-y-3 > :not(:last-child) { margin-bottom: 0.75rem; }
.space-y-4 > :not(:last-child) { margin-bottom: 1rem; }
.space-y-6 > :not(:last-child) { margin-bottom: 1.5rem; }
.space-y-8 > :not(:last-child) { margin-bottom: 2rem; }
.space-y-10 > :not(:last-child) { margin-bottom: 2.5rem; }

/* =============================================================================
   SIZING UTILITIES
   ============================================================================= */

.h-4 { height: 1rem; }
.h-56 { height: 14rem; }
.h-80 { height: 20rem; }
.h-px { height: 1px; }

.w-4 { width: 1rem; }
.w-16 { width: 4rem; }
.w-full { width: 100%; }

/* =============================================================================
   TYPOGRAPHY UTILITIES
   ============================================================================= */

.text-xs { font-size: 0.75rem; line-height: 1.5; }
.text-sm { font-size: 0.875rem; line-height: 1.5; }
.text-l { font-size: 1rem; line-height: 1.5; }
.text-2xl { font-size: 1.5rem; line-height: 1.333; }

.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }

.tracking-wide { letter-spacing: 0.025em; }
.tracking-widest { letter-spacing: 0.1em; }

.italic { font-style: italic; }

.whitespace-pre-line { white-space: pre-line; }

/* =============================================================================
   COLOR UTILITIES
   ============================================================================= */

.bg-slate-50 { background-color: var(--color-slate-50); }
.bg-slate-200 { background-color: var(--color-slate-200); }
.bg-white { background-color: var(--color-white); }
.bg-gray-100 { background-color: var(--color-gray-100); }

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to));
}

.from-slate-100 { --tw-gradient-from: var(--color-slate-100); }
.via-slate-50 { --tw-gradient-via: var(--color-slate-50); }
.to-white { --tw-gradient-to: var(--color-white); }

.text-slate-400 { color: var(--color-slate-400); }
.text-slate-500 { color: var(--color-slate-500); }
.text-slate-600 { color: var(--color-slate-600); }
.text-slate-700 { color: var(--color-slate-700); }
.text-slate-800 { color: var(--color-slate-800); }
.text-slate-900 { color: var(--color-slate-900); }

.border-slate-100 { border-color: var(--color-slate-100); }
.border-slate-200 { border-color: var(--color-slate-200); }
.border-slate-300 { border-color: var(--color-slate-300); }
.border-slate-600 { border-color: var(--color-slate-600); }
.border-slate-700 { border-color: var(--color-slate-700); }
.border-slate-900 { border-color: var(--color-slate-900); }

.border-t { border-top: 1px solid; }
.border-b { border-bottom: 1px solid; }
.border-b-2 { border-bottom: 2px solid; }

/* =============================================================================
   TRANSITION UTILITIES
   ============================================================================= */

.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* =============================================================================
   HOVER STATES
   ============================================================================= */

@media (hover: hover) {
  .hover\:text-slate-900:hover { color: var(--color-slate-900); }
  .hover\:border-slate-600:hover { border-color: var(--color-slate-600); }
  .hover\:border-slate-900:hover { border-color: var(--color-slate-900); }
}

/* =============================================================================
   TEMPLATE-SPECIFIC STYLES
   ============================================================================= */

/* Title styling - modern sans-serif */
.tpl-title,
.rich-text h1,
.rich-text h2,
.rich-text h3 {
  font-family: "Allura", ui-sans-serif, system-ui, sans-serif;
}

/* Message styling - friendly italic */
.tpl-message {
  font-family: "Nunito", ui-sans-serif, system-ui, sans-serif;
}

/* Section headings */
.tpl-section-heading {
  font-family: "Raleway", ui-sans-serif, system-ui, sans-serif;
}

/* Date/time styling */
.tpl-date,
.tpl-time,
.tpl-end-date,
.tpl-end-time {
  font-family: "Nunito", ui-sans-serif, system-ui, sans-serif;
}

/* Venue name */
.tpl-venue-name {
  font-family: "Raleway", ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
}

/* =============================================================================
   RICH TEXT EDITOR CONTENT STYLES
   ============================================================================= */

.rich-text p {
  margin-bottom: 0.75rem;
}

.rich-text p:last-child {
  margin-bottom: 0;
}

.rich-text strong {
  font-weight: bolder;
}

.rich-text em {
  font-style: italic;
}

.rich-text a {
  color: var(--color-slate-600);
  text-decoration: underline;
}

.rich-text a:hover {
  color: var(--color-slate-900);
}

/* =============================================================================
   THUMBNAIL MODE
   No special styling - thumbnail renders exactly like the sample view.
   The iframe container handles scaling.
   ============================================================================= */

/* =============================================================================
   GALLERY STYLES
   ============================================================================= */

[data-type="gallery"] img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background-color: var(--color-white);
}

/* =============================================================================
   BUTTON HOVER EFFECTS
   ============================================================================= */

button[data-action] {
  position: relative;
}

button[data-action]:focus {
  outline: 2px solid var(--color-slate-400);
  outline-offset: 2px;
}

button[data-action]:active {
  opacity: 0.8;
}

/* =============================================================================
   HERO spacing tweaks
   - Move the whole hero text block slightly down
   - Reduce vertical spacing slightly so content fits better
   ============================================================================= */

.tpl-hero-bg .tpl-hero-content {
  /* py-16 is 4rem/4rem; keep total height similar but shift content down */
  padding-top: 8rem;
  padding-bottom: 3rem;
}

.tpl-hero-bg .tpl-hero-content .mb-6 {
  margin-bottom: 1.25rem; /* was 1.5rem */
}

.tpl-hero-bg .tpl-hero-content .my-8 {
  margin-top: 1.75rem; /* was 2rem */
  margin-bottom: 1.75rem; /* was 2rem */
}

.tpl-hero-bg .tpl-hero-content .py-8 {
  padding-top: 1.75rem; /* was 2rem */
  padding-bottom: 1.75rem; /* was 2rem */
}

.tpl-hero-bg .tpl-hero-content .space-y-8 > :not(:last-child) {
  margin-bottom: 1.75rem; /* was 2rem */
}

.tpl-hero-bg .tpl-hero-content .mt-10 {
  margin-top: 2.25rem; /* was 2.5rem */
}

.tpl-hero-bg .tpl-hero-content .py-6 {
  padding-top: 1.25rem; /* was 1.5rem */
  padding-bottom: 1.25rem; /* was 1.5rem */
}

.tpl-hero-bg .tpl-hero-content .space-y-3 > :not(:last-child) {
  margin-bottom: 0.6rem; /* was 0.75rem */
}

/* ------------------------------------------------------------
   Template defaults
   ------------------------------------------------------------ */
:root {
  --template-font-family: "Nunito", sans-serif;
}

html {
  font-family: var(--template-font-family);
}

body {
  font-family: inherit;
}

/* ------------------------------------------------------------
   Hero section styling
   ------------------------------------------------------------ */
.hero-section {
  position: relative;
  min-height: 740px;
}

/* ------------------------------------------------------------
   Thumbnail mode (/?view=thumbnail)
   ------------------------------------------------------------ */
html.is-thumbnail #root {
  min-height: 0;
}

html.is-thumbnail #root > .max-w-md > section:not(.hero-section):not(.tpl-hero),
html.is-thumbnail #root > .max-w-md > .w-20,
html.is-thumbnail #root > .max-w-md > footer {
  display: none !important;
}

/* ------------------------------------------------------------
   Per-field typography tokens
   ------------------------------------------------------------ */
:root {
  /* Title (hero) */
  --tpl-title-font-family: "Allura", cursive;
  --tpl-title-font-size: 43px;
  --tpl-title-font-weight: 500;
  --tpl-title-line-height: 1.4;
  --tpl-title-color: #ffffff;

  /* Date / time */
  --tpl-date-font-family: var(--template-font-family);
  --tpl-date-font-size: 17px;
  --tpl-date-font-weight: 400;

  /* Venue name - emphasized */
  --tpl-venue-name-font-size: 17px;
  --tpl-venue-name-font-weight: 400;

  --tpl-time-font-family: var(--template-font-family);
  --tpl-time-font-size: 17px;
  --tpl-time-font-weight: 400;

  --tpl-end-date-font-family: var(--template-font-family);
  --tpl-end-date-font-size: 17px;
  --tpl-end-date-font-weight: 400;

  --tpl-end-time-font-family: var(--template-font-family);
  --tpl-end-time-font-size: 17px;
  --tpl-end-time-font-weight: 400;

  --tpl-venue-name-font-family: var(--template-font-family);
  --tpl-venue-name-font-size: 17px;
  --tpl-venue-name-font-weight: 400;

  /* Message */
  --tpl-message-font-family: "Nunito", sans-serif;
  --tpl-message-font-size: 14px;
  --tpl-message-line-height: 2;

  /* Section Headings */
  --tpl-section-heading-font-family: var(--template-font-family);
  --tpl-section-heading-font-size: 14px;
  --tpl-section-heading-font-weight: 700;
  --tpl-section-heading-letter-spacing: 0.15em;
}

/* Title */
.tpl-title {
  font-family: var(--tpl-title-font-family);
  font-size: var(--tpl-title-font-size);
  font-weight: var(--tpl-title-font-weight);
  line-height: var(--tpl-title-line-height);
  color: var(--tpl-title-color);
}
.tpl-title .tpl-title-text {
  font-family: inherit;
  font-size: var(--tpl-title-font-size);
  font-weight: var(--tpl-title-font-weight);
  line-height: var(--tpl-title-line-height);
}

/* Date/time */
.tpl-date {
  font-family: var(--tpl-date-font-family);
  font-size: var(--tpl-date-font-size);
  font-weight: var(--tpl-date-font-weight);
}
.tpl-time {
  font-family: var(--tpl-time-font-family);
  font-size: var(--tpl-time-font-size);
  font-weight: var(--tpl-time-font-weight);
}

/* Message */
.tpl-message {
  font-family: var(--tpl-message-font-family);
  font-size: var(--tpl-message-font-size);
  line-height: var(--tpl-message-line-height);
}

/* Section headings */
.tpl-section-heading {
  font-family: var(--tpl-section-heading-font-family);
  font-size: var(--tpl-section-heading-font-size);
  font-weight: var(--tpl-section-heading-font-weight);
  letter-spacing: var(--tpl-section-heading-letter-spacing);
}

/* =============================================================================
   LOCATION / CONTACT section layout polish
   ============================================================================= */

/* Make Location + Contact section titles more distinguished (without changing other headings) */
.tpl-location-heading,
.tpl-contact-heading,
.tpl-divider-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  letter-spacing: 0.18em;
  font-weight: 700 !important;
}

.tpl-location-heading::before,
.tpl-location-heading::after,
.tpl-contact-heading::before,
.tpl-contact-heading::after,
.tpl-divider-heading::before,
.tpl-divider-heading::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: var(--color-slate-200);
}

/* Tighten vertical rhythm inside Location + Contact sections */
section[data-field="venueAddress"] .space-y-10 > :not(:last-child),
section[data-fields*="contactName"] .space-y-8 > :not(:last-child) {
  margin-bottom: 1.75rem;
}

section[data-field="venueAddress"] p.text-slate-400,
section[data-fields*="contactName"] p.text-slate-400 {
  letter-spacing: 0.12em;
}

/* Location: remove the extra padded "card" so spacing matches Contact */
section[data-field="venueAddress"] .p-6 {
  padding: 0;
}

section[data-fields*="contactName"] a[data-type="emailLink"] {
  overflow-wrap: anywhere;
}

/* RSVP button: match scale to section text (avoid overpowering) */
section[data-section="rsvp"] button[data-action="rsvp"] {
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500 !important;
  letter-spacing: 0.12em !important;
}

section[data-section="rsvp"] button[data-action="rsvp"] span {
  border-bottom: 1px solid var(--color-slate-300);
}

@media (hover: hover) {
  section[data-section="rsvp"] button[data-action="rsvp"]:hover span {
    border-color: var(--color-slate-900);
  }
}

/* Rich text overrides */
*[data-html="true"] ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

*[data-html="true"] {
  white-space: pre-wrap;
}

*[data-html="true"] ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
}

*[data-html="true"] li {
  margin: 0.25rem 0;
}

*[data-html="true"].text-center ul,
*[data-html="true"].text-center ol {
  display: inline-block;
  text-align: left;
}

