/* ==========================================================================
   DESIGN SYSTEM & VARIABLES — Crimson & Lime Green Theme
   ========================================================================== */
:root {
  --color-royal-blue: #5F6F52;        /* Sage Green */
  --color-royal-blue-light: #7E9070;  /* Light Sage Green Accent */
  --color-royal-blue-dark: #3F4E35;   /* Deep Olive / Sage Green */
  --color-gold: #A97155;              /* Clay / Terracotta Brown */
  --color-gold-light: #F5EFE6;        /* Sand Beige */
  --color-gold-dark: #8E5B41;         /* Deep Clay Brown */
  --color-accent-orange: #B87B5B;     /* Warm Terracotta Orange */
  --color-cream: #F4EFEA;             /* Warm Cream Sand Background */
  --color-cream-light: #FFFFFF;       /* Pure White Card Background */
  --color-cream-dark: #E3DACD;        /* Warm Sand Borders/Dividers */
  --color-charcoal: #403A36;          /* Dark Charcoal Brown for text */
  --color-text-light: #736B66;        /* Sandy Grayish Brown for secondary text */
  --font-royal: 'Fredoka', sans-serif;
  --font-serif: 'Fredoka', sans-serif;
  --font-sans: 'Nunito', sans-serif;
  --shadow-premium: 0 20px 40px rgba(95, 111, 82, 0.2);
  --shadow-gold: 0 0 15px rgba(169, 113, 85, 0.25);
  --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Sleek Modern Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--color-royal-blue);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-royal-blue-light);
}

/* Firefox Scrollbar Support */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-royal-blue) rgba(0, 0, 0, 0.05);
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: transparent;
  color: var(--color-charcoal);
  overflow: hidden;
  overflow-x: hidden !important;
  line-height: 1.6;
  height: 100vh;
  width: 100%;
  max-width: 100%;
}

/* Background Canvas */
#canvasBg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(135deg, rgba(63, 78, 53, 0.9) 0%, rgba(30, 36, 25, 0.96) 100%), url('prince_bg_desktop.png');
  background-size: cover;
  background-position: center;
}

#confettiCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

/* ==========================================================================
   AUDIO CONTROLS
   ========================================================================== */
.audio-controls {
  position: fixed;
  bottom: 25px;
  left: 25px;
  z-index: 1000;
}

.audio-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: var(--transition-fast);
}

.audio-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.audio-btn svg {
  display: block;
  stroke-width: 2.5;
}

/* ==========================================================================
   INTRO SCREEN (ENVELOPE)
   ========================================================================== */
.intro-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(135deg, rgba(63, 78, 53, 0.9) 0%, rgba(30, 36, 25, 0.96) 100%), url('prince_bg_desktop.png');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
  gap: 20px;
  overflow: hidden;
}

/* Floating SVG Blob Decorations */
.blob {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.blob-1 {
  width: 280px;
  height: 280px;
  top: -60px;
  left: -80px;
  animation: blobFloat1 8s ease-in-out infinite;
}

.blob-2 {
  width: 200px;
  height: 200px;
  top: 10%;
  right: -50px;
  animation: blobFloat2 10s ease-in-out infinite;
}

.blob-3 {
  width: 240px;
  height: 240px;
  bottom: -40px;
  left: 10%;
  animation: blobFloat3 9s ease-in-out infinite;
}

.blob-4 {
  width: 160px;
  height: 160px;
  bottom: 15%;
  right: 5%;
  animation: blobFloat1 7s ease-in-out infinite reverse;
}

.blob-5 {
  width: 180px;
  height: 180px;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  animation: blobFloat2 11s ease-in-out infinite;
}

@keyframes blobFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.95); }
}

@keyframes blobFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-15px, 20px) rotate(10deg); }
}

@keyframes blobFloat3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15px, -20px) scale(1.08); }
}

.intro-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.envelope-wrapper {
  perspective: 1000px;
  width: 90%;
  max-width: 450px;
  box-sizing: border-box;
}

.envelope {
  position: relative;
  background: var(--color-cream-light);
  min-height: auto;
  height: auto;
  border-radius: 30px;
  box-shadow: 0 30px 60px rgba(130, 14, 43, 0.2), var(--shadow-gold);
  border: 4px solid var(--color-cream-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 30px;
  transform-style: preserve-3d;
  transition: transform 0.8s ease-in-out;
  width: 100%;
}

.envelope::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 1px solid rgba(181, 27, 66, 0.15);
  border-radius: 22px;
  pointer-events: none;
}

.intro-title {
  font-family: var(--font-royal);
  color: var(--color-royal-blue-dark);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.envelope-prompt {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

/* Intro Form Elements */
.intro-form {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 10;
}

.select-intro-wrapper {
  position: relative;
}

.select-intro-wrapper::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  border-right: 2.5px solid var(--color-royal-blue-dark);
  border-bottom: 2.5px solid var(--color-royal-blue-dark);
  pointer-events: none;
  z-index: 10;
}

.select-intro-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 45px !important;
}

.custom-title-input-intro {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-cream-dark);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-charcoal);
  background-color: #ffffff;
  animation: slideDown 0.3s ease-out forwards;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

/* Royal Seal Button Wrapper */
.royal-seal-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  outline: none;
  transition: var(--transition-fast);
  
  /* Absolute position on the right of the envelope modal */
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  z-index: 100;
}

.royal-seal {
  width: 80px;
  height: 80px;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.royal-seal-btn:hover .royal-seal {
  transform: scale(1.1) rotate(5deg);
}

.seal-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #B51B42 0%, #820E2B 100%);
  border-radius: 50%;
  border: 4px double #FF9A00;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.seal-letter {
  font-family: var(--font-royal);
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.4);
  margin-top: -4px;
  margin-left: 3px;
}

.seal-ribbon {
  position: absolute;
  width: 22px;
  height: 55px;
  background: var(--color-accent-orange);
  z-index: -1;
  top: 40px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.seal-ribbon.left {
  left: 15px;
  transform: rotate(20deg);
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 80%, 0% 100%);
}

.seal-ribbon.right {
  right: 15px;
  transform: rotate(-20deg);
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 50% 80%, 0% 100%);
}

.envelope-subprompt {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-cream-light);
  margin-top: 0;
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  animation: pulseText 2s infinite ease-in-out;
  transition: opacity 0.5s ease;
}

@keyframes pulseText {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

.skip-intro-btn {
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-cream-light);
  cursor: pointer;
  margin-top: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: var(--transition-fast);
  z-index: 10;
}

.skip-intro-btn:hover {
  color: var(--color-gold-light);
  transform: translateY(-2px);
}

/* Tooltip Error displays for Intro Form */
.error-tooltip-intro {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #b91c1c;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 100;
  pointer-events: none;
}

.error-tooltip-intro::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #b91c1c transparent transparent transparent;
}

.form-group.invalid input,
.form-group.invalid select {
  border-color: #f87171;
  background-color: #fef2f2;
}

.form-group.invalid .error-tooltip-intro {
  display: block;
}

/* ==========================================================================
   MAIN APP CONTENT LAYOUT
   ========================================================================== */
.main-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
  height: 100vh;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
  animation: pageFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hidden {
  display: none !important;
}

@keyframes pageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Split Columns Layout */
.split-layout {
  display: grid;
  grid-template-columns: 50% 50%;
  gap: 35px;
  height: calc(100vh - 40px);
  align-items: stretch;
}

.left-column {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.graphic-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

/* Full-height graphic styling - edge-to-edge bleed inside card with strict 3:4 aspect ratio */
.graphic-wrapper {
  aspect-ratio: 3 / 4;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(130, 14, 43, 0.35);
}

picture.ecard-graphic {
  width: 100%;
  height: 100%;
  display: block;
}

.ecard-graphic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Action Buttons Container below ecard */
.left-actions-row {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  gap: 15px;
  width: auto;
}

.rsvp-floating-btn,
.wishes-floating-btn {
  padding: 16px 28px;
  color: #FFFFFF;
  font-family: var(--font-royal);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 1px;
  border: 3px solid #FFFFFF;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.rsvp-floating-btn {
  background: linear-gradient(180deg, #FF9A00 0%, #E07B00 100%) !important;
  box-shadow: 0 8px 20px rgba(224, 123, 0, 0.4), 0 0 15px rgba(169, 113, 85, 0.25) !important;
}

.wishes-floating-btn {
  display: none !important; /* hidden by default on desktop */
  background: linear-gradient(180deg, #B51B42 0%, #820E2B 100%) !important;
  box-shadow: 0 8px 20px rgba(181, 27, 66, 0.4), 0 0 15px rgba(169, 113, 85, 0.25) !important;
}

.rsvp-floating-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 25px rgba(224, 123, 0, 0.55), 0 0 20px rgba(107, 200, 32, 0.5) !important;
  background: linear-gradient(180deg, #FFAE33 0%, #FF9A00 100%) !important;
}

.wishes-floating-btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 25px rgba(181, 27, 66, 0.55), 0 0 20px rgba(107, 200, 32, 0.5) !important;
  background: linear-gradient(180deg, #FF6B8B 0%, #B51B42 100%) !important;
}

.rsvp-floating-btn:active,
.wishes-floating-btn:active {
  transform: translateY(0) scale(1);
}

.wishes-count-badge,
.rsvp-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gold);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.wish-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gold);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50%;
  min-width: 24px;
  height: 24px;
  padding: 0 4px;
  border: 1px solid var(--color-gold-light);
  box-shadow: 0 2px 4px rgba(0,0,0,0.12);
  margin-left: 8px;
  vertical-align: middle;
  line-height: 1;
}

.right-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 10px 20px 20px 20px;
  box-sizing: border-box;
}

/* Header Banner styling */
.header-banner {
  text-align: center;
  color: #ffffff;
}

.royal-crown {
  font-size: 3rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.6));
  animation: crownFloat 3s ease-in-out infinite;
  display: inline-block;
}

@keyframes crownFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

.royal-heading {
  font-family: var(--font-royal);
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #ffffff 40%, var(--color-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.sub-heading {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--color-gold-light);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   INLINE EVENTS SECTION (RIGHT COLUMN)
   ========================================================================== */
.inline-events-section {
  width: 100%;
}

.events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.event-box {
  background: var(--color-cream-light);
  border-left: 5px solid var(--color-royal-blue);
  padding: 22px;
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-premium);
  position: relative;
  transition: var(--transition-fast);
}

.event-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.event-box.event-secondary {
  border-left-color: var(--color-gold);
}

.event-badge {
  position: absolute;
  top: -10px;
  right: 15px;
  background: var(--color-royal-blue);
  color: #ffffff;
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.event-secondary .event-badge {
  background: var(--color-gold-dark);
}

.event-box h2 {
  font-family: var(--font-royal);
  font-size: 1.35rem;
  color: var(--color-royal-blue-dark);
  margin-bottom: 12px;
  font-weight: 700;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.detail-item:last-of-type {
  margin-bottom: 0;
}

.detail-icon {
  font-size: 1.1rem;
  margin-top: 2px;
}

.detail-text {
  color: var(--color-charcoal);
}

.detail-text strong {
  color: var(--color-royal-blue-dark);
}

.map-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-royal-blue-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.map-link:hover {
  color: var(--color-royal-blue);
  text-decoration: underline;
}

/* ==========================================================================
   RSVP MODAL DIALOG
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-x: hidden !important;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(61, 61, 92, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-container {
  position: relative;
  background: #FFFFFF;
  border: none;
  border-radius: 30px;
  width: 90%;
  max-width: 650px;
  padding: 35px;
  box-shadow: 0 30px 60px rgba(130, 14, 43, 0.35);
  z-index: 10;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-mini {
  max-width: 420px;
}

#rsvpModal .modal-container {
  width: 90%;
  max-width: 600px;
}

.modal.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--color-text-light);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.modal-close-btn:hover {
  color: #b91c1c;
  transform: rotate(90deg);
}

.modal-title {
  font-family: var(--font-royal);
  font-size: 1.8rem;
  color: var(--color-royal-blue-dark);
  text-align: center;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 25px;
}

/* Event selection cards inside modal */
.rsvp-cards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.rsvp-event-card {
  position: relative;
  background: #FAF6F7;
  border: 2px solid var(--color-cream-dark);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
}

.rsvp-event-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-royal-blue-light);
  box-shadow: 0 8px 20px rgba(130, 14, 43, 0.08);
}

.rsvp-event-card.selected {
  background: #FFFFFF;
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold), 0 8px 25px rgba(107, 200, 32, 0.2);
}

.rsvp-event-card h3 {
  font-family: var(--font-royal);
  font-size: 1.1rem;
  color: var(--color-royal-blue-dark);
  margin-top: 10px;
  margin-bottom: 12px;
}

.rsvp-event-card .event-badge {
  position: absolute;
  top: -10px;
  left: 15px;
  right: auto;
  font-size: 0.65rem;
  padding: 3px 8px;
  background: var(--color-royal-blue-dark);
  color: #ffffff;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.rsvp-event-card .event-badge.select-bbq {
  background: var(--color-royal-blue-dark);
}

.rsvp-detail-item {
  font-size: 0.8rem;
  color: var(--color-charcoal);
  margin-bottom: 6px;
}

/* Circle checkbox on top right */
.selection-circle {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  border: 2.5px solid var(--color-cream-dark);
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
}

.rsvp-event-card:hover .selection-circle {
  border-color: #6BC820;
}

.rsvp-event-card.selected .selection-circle {
  border-color: #6BC820;
  background: #6BC820;
}

.rsvp-event-card.selected .selection-circle::after {
  content: '✓';
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 900;
}

/* Modal Submission Form */
.rsvp-submit-form {
  border-top: 1px solid var(--color-cream-dark);
  padding-top: 20px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
  position: relative;
}

.form-group.hidden {
  display: none !important;
}

/* Floating Labels System: Fixed top-left badges, fully edge rounded fields */
.floating-group {
  position: relative;
  margin-top: 0;
  margin-bottom: 15px;
}

.floating-group input,
.floating-group select {
  width: 100%;
  box-sizing: border-box;
  padding: 18px 22px !important;
  height: 60px !important;
  border-radius: 30px !important; /* Fully edge rounded for 60px height */
}

.floating-group label {
  position: absolute;
  top: 0;
  left: 16px; /* Positioned at the top left */
  right: auto;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: normal;
  padding: 2px 10px; /* Pill padding */
  background-color: var(--color-royal-blue-dark); /* Purple peel background */
  color: #ffffff; /* White text color */
  border-radius: 20px; /* Fully rounded pill shape */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 5;
}

.floating-group input::placeholder {
  color: rgba(0, 0, 0, 0.35) !important;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 22px;
  border: 2px solid var(--color-cream-dark);
  border-radius: 30px; /* Fully edge rounded */
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-charcoal);
  background-color: #ffffff;
  transition: var(--transition-fast);
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(107, 200, 32, 0.15);
}

.form-group.invalid input,
.form-group.invalid select {
  border-color: #f87171;
  background-color: #fef2f2;
}

.form-group .error-msg {
  display: none;
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 5px;
}

.form-group.invalid .error-msg {
  display: block;
}

.submit-btn {
  position: relative;
  width: 100%;
  padding: 14px 28px;
  background: linear-gradient(180deg, #B51B42 0%, #820E2B 100%) !important;
  color: #ffffff;
  border: 2px solid #FFFFFF;
  border-radius: 35px; /* Fully rounded capsule button */
  font-family: var(--font-royal);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(181, 27, 66, 0.35);
  transition: var(--transition-fast);
  overflow: hidden;
  text-transform: uppercase;
  margin-top: 15px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(181, 27, 66, 0.55);
  background: linear-gradient(180deg, #FF6B8B 0%, #B51B42 100%) !important;
}

.submit-btn:active {
  transform: translateY(0);
}

#confirmRsvpBtn,
#publishWishBtn {
  background: linear-gradient(180deg, #FF9A00 0%, #E07B00 100%) !important;
  color: #FFFFFF !important;
  border: 3px solid #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(224, 123, 0, 0.35) !important;
}

#confirmRsvpBtn:hover,
#publishWishBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(224, 123, 0, 0.55);
  background: linear-gradient(180deg, #FFAE33 0%, #FF9A00 100%) !important;
}

.rsvp-buttons-row {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  width: 100%;
}

.rsvp-buttons-row .submit-btn {
  flex: 1;
}

.rsvp-maybe-btn {
  background: linear-gradient(180deg, #5F6F52 0%, #3F4E35 100%) !important;
  color: #FFFFFF !important;
  border: 3px solid #FFFFFF !important;
  box-shadow: 0 6px 16px rgba(63, 78, 53, 0.35) !important;
}

.rsvp-maybe-btn:hover {
  background: linear-gradient(180deg, #7E9070 0%, #5F6F52 100%) !important;
  box-shadow: 0 10px 22px rgba(63, 78, 53, 0.55) !important;
}

@media (max-width: 992px) {
  .rsvp-buttons-row {
    flex-direction: column;
    gap: 12px;
  }
  .rsvp-buttons-row .submit-btn {
    width: 100%;
  }
}

.rsvp-success-message {
  text-align: center;
  padding: 30px 10px;
  animation: fadeIn 0.5s ease forwards;
}

.success-icon {
  font-size: 3.5rem;
  margin-bottom: 15px;
}

.rsvp-success-message h3 {
  font-family: var(--font-royal);
  color: var(--color-royal-blue-dark);
  margin-bottom: 10px;
}

/* ==========================================================================
   WISHES & GUESTBOOK SECTION
   ========================================================================== */
}

.event-badge {
  position: absolute;
  top: -10px;
  left: 15px;
  right: auto;
  background: var(--color-royal-blue-dark);
  color: #ffffff;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.event-secondary .event-badge {
  background: var(--color-gold-dark);
}

.event-box h2 {
  font-family: var(--font-royal);
  font-size: 1.35rem;
  color: var(--color-royal-blue-dark);
  margin-bottom: 12px;
  font-weight: 700;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.detail-item:last-of-type {
  margin-bottom: 0;
}

.detail-icon {
  font-size: 1.1rem;
  margin-top: 2px;
}

.detail-text {
  color: var(--color-charcoal);
}

.detail-text strong {
  color: var(--color-royal-blue-dark);
}

.map-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-royal-blue-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-fast);
}

.map-link:hover {
  color: var(--color-royal-blue);
  text-decoration: underline;
}

/* ==========================================================================
   WISHES & COMMENT WALL SECTION (CONSOLIDATED COMMENTS BLOCK)
   ========================================================================== */
.wishes-section {
  margin-bottom: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 25px;
  position: relative;
}

.drawer-close-btn {
  display: none;
}

.section-title {
  font-family: var(--font-royal);
  font-size: 2.1rem;
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  margin-bottom: 6px;
}

.section-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-gold-light);
}

/* Consolidated Comments block */
.comments-block {
  background: #E0CBB6;
  border-radius: 30px;
  border: none;
  box-shadow: 0 20px 45px rgba(95, 111, 82, 0.2);
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.comments-block::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(181, 27, 66, 0.1);
  border-radius: 24px;
  pointer-events: none;
  z-index: 1;
}

/* Comments Feed List */
.comments-feed {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px 35px 16px 35px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
  background-color: #FAF9FB; /* Soft light lavender-white background */
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23B51B42' stroke-width='1.5' stroke-opacity='0.04'%3E%3Cpath d='M15 15 L17 21 L23 22 L19 26 L20 32 L15 29 L10 32 L11 26 L7 22 L13 21 Z'/%3E%3Ccircle cx='55' cy='20' r='5'/%3E%3Cpath d='M52.5 24 Q55 31 55 33'/%3E%3Cpath d='M25 55 C25 48, 38 48, 38 55 C38 62, 25 62, 25 55 Z'/%3E%3Cpath d='M60 55 L63 50 L68 50 L64 55 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 40px, rgba(0, 0, 0, 1) 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 1) 40px, rgba(0, 0, 0, 1) 100%);
}

/* Scrollbars are managed globally at the top of the stylesheet */

/* Sticky input form container at the bottom (Chat bar) */
.comments-form-sticky {
  position: sticky;
  bottom: 0;
  background: #F1ECEE;
  border-top: 1px solid #E2D3D6;
  padding: 10px 14px;
  z-index: 10;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.03);
}

/* Form layouts */
.form-row-compact {
  display: flex;
  align-items: center;
  width: 100%;
}

.form-group-compact {
  position: relative;
}

.form-group-compact input,
.form-group-compact select,
.form-group-compact textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-cream-dark);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  transition: var(--transition-fast);
}

.form-group-compact input:focus,
.form-group-compact select:focus,
.form-group-compact textarea:focus {
  outline: none;
  border-color: var(--color-royal-blue-light);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.select-compact-wrapper {
  position: relative;
}

.select-compact-wrapper::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--color-royal-blue-dark);
  border-bottom: 2px solid var(--color-royal-blue-dark);
  pointer-events: none;
  z-index: 10;
}

.select-compact-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px !important;
}

.custom-title-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-cream-dark);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  margin-bottom: 12px;
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-row-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.message-input-wrapper {
  flex: 1;
  background: #ffffff;
  border-radius: 24px;
  padding: 2px 16px;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.message-input-wrapper textarea {
  width: 100%;
  border: none !important;
  background: transparent !important;
  padding: 8px 0;
  height: 40px;
  font-size: 1.08rem;
  resize: none;
  outline: none !important;
  box-shadow: none !important;
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  overflow: hidden;
}

/* Submit Send Icon Button */
.submit-btn-compact.send-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #6BC820 0%, #4CA610 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: var(--transition-fast);
  flex-shrink: 0;
  padding: 0;
}

.submit-btn-compact.send-icon-btn:hover {
  transform: scale(1.05);
  background: linear-gradient(180deg, #D6FFA6 0%, #6BC820 100%);
  box-shadow: 0 4px 10px rgba(107,200,32,0.4), 0 0 15px rgba(107,200,32,0.35);
}

.submit-btn-compact.send-icon-btn:active {
  transform: scale(0.95);
}

.comments-footer-note {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  color: rgba(0, 0, 0, 0.38);
  text-align: center;
  margin-top: 8px;
  margin-bottom: 2px;
  width: 100%;
}

.submit-btn-compact.send-icon-btn svg {
  margin-left: 2px; /* Visual center adjustment */
}

/* Tooltip Error displays for compact layouts */
.error-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #b91c1c;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 100;
  pointer-events: none;
}

.error-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #b91c1c transparent transparent transparent;
}

.form-group-compact.invalid input,
.form-group-compact.invalid select,
.form-group-compact.invalid textarea {
  border-color: #f87171;
  background-color: #fef2f2;
}

.form-group-compact.invalid .error-tooltip {
  display: block;
}

/* No Wishes Fallback state */
.no-wishes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: rgba(0, 0, 0, 0.45);
  height: 100%;
}

.no-wishes-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  opacity: 0.7;
}

/* Minimalistic Chat Bubbles (WhatsApp / Telegram style) */
.chat-bubble {
  align-self: flex-start;
  background-color: #FFFFFF !important;
  border-radius: 8px 20px 20px 20px;
  padding: 8px 12px 20px 12px;
  max-width: 85%;
  position: relative;
  box-shadow: 0 2px 4px rgba(130,14,43,0.05);
  margin-bottom: 4px;
  animation: bubbleFadeIn 0.3s ease-out forwards;
  border: 1px solid rgba(181, 27, 66, 0.08);
}

@keyframes bubbleFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-bubble-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-author {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-royal-blue-dark);
  font-family: var(--font-sans);
}

.chat-relationship {
  background: rgba(181, 27, 66, 0.08);
  color: var(--color-royal-blue-dark);
  font-family: var(--font-royal);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(181, 27, 66, 0.15);
}

.chat-text {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--color-charcoal);
  margin: 0;
  word-break: break-word;
}

.chat-time {
  position: absolute;
  bottom: 4px;
  right: 10px;
  font-size: 0.65rem;
  color: rgba(0, 0, 0, 0.4);
  font-family: var(--font-sans);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.royal-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 15px;
}

.royal-footer p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.royal-footer .copyright {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.4);
}

/* Hamburger Menu Button (Hidden on Desktop) */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000;
  position: fixed;
  top: 24px;
  right: 20px;
  outline: none;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #FFFFFF;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* Transform to X when active */
.hamburger-menu.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(2px, -1px);
  background-color: #FFFFFF;
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(2px, 1px);
  background-color: #FFFFFF;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1250px) {
  .wishes-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 992px) {
  #canvasBg {
    background-image: linear-gradient(135deg, rgba(63, 78, 53, 0.9) 0%, rgba(30, 36, 25, 0.96) 100%), url('prince_bg_mobile.png') !important;
  }

  .intro-screen {
    background-image: linear-gradient(135deg, rgba(63, 78, 53, 0.9) 0%, rgba(30, 36, 25, 0.96) 100%), url('prince_bg_mobile.png') !important;
  }

  body {
    overflow: hidden;
  }

  /* Keep audio button in the bottom left on mobile */
  .audio-controls {
    bottom: 20px;
    left: 20px;
    top: auto;
    right: auto;
  }

  /* Full screen layout with no margins / paddings */
  .main-content {
    padding: 0;
    height: 100dvh;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  /* Slide panel drawer system */
  .split-layout {
    display: block;
    position: relative;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
  }

  /* Left column (E-Card) sits on top, slides leftwards when drawer opens */
  .left-column {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1), padding-right 0.9s cubic-bezier(0.25, 1, 0.5, 1); /* Slow, smooth transition */
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3F4E35 0%, #1E2419 100%);
    box-sizing: border-box;
    padding-right: 0;
  }

  .graphic-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    gap: 15px;
    box-sizing: border-box;
    padding: 20px;
  }

  .graphic-wrapper {
    max-height: 70vh !important;
  }

  .left-actions-row {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 15px auto 0 auto !important;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .rsvp-floating-btn,
  .wishes-floating-btn {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;
    flex: 1;
    max-width: 180px;
    font-size: 0.95rem;
    padding: 12px 16px;
  }

  .wishes-floating-btn {
    display: flex !important; /* reveal on mobile */
  }

  /* Slide ecard card to the left, leaving a 20% slice visible with a 25px padding gap and shadow */
  .split-layout.comments-open .left-column {
    transform: translateX(-80%);
    padding-right: 25px !important;
    box-shadow: 15px 0 35px rgba(0, 0, 0, 0.25); /* Faint shadow dropping onto the revealed comments drawer */
  }

  /* Right column sits behind, occupying the exposed 80% viewport width */
  .right-column {
    position: absolute;
    top: 0;
    left: 20%; /* Shifted by the 20% card slice */
    width: 80%; /* Occupies remaining 80% width */
    height: 100%;
    z-index: 10;
    padding: 0;
    background-color: #E0CBB6;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .wishes-section {
    height: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* WhatsApp Header Bar style on mobile */
  .section-title-wrapper {
    background-color: #757253;
    padding: 0 60px 0 20px; /* Right padding to avoid hamburger menu overlap */
    margin-bottom: 0;
    height: 68px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    border-bottom: 1.5px solid rgba(212, 175, 55, 0.25);
    box-sizing: border-box;
  }

  .section-title {
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 2px;
    text-shadow: none;
    text-align: left;
  }

  .section-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
  }

  /* Comments block fits full viewport height under the header bar */
  .comments-block {
    height: calc(100% - 68px);
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .comments-block::before {
    display: none;
  }

  .graphic-wrapper {
    aspect-ratio: auto !important;
    width: 90vw !important;
    max-width: 420px !important;
    height: auto !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  }

  picture.ecard-graphic {
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  .ecard-graphic img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
  }

  .comments-feed {
    padding: 12px 35px;
  }

  .comments-form-sticky {
    padding: 10px 12px;
  }

  .royal-footer {
    display: none; /* Hide footer on mobile chat wall to maximize space */
  }

  .drawer-close-btn {
    display: block;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #ffffff;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    line-height: 1;
    padding: 0;
  }

  .section-title-wrapper {
    position: relative;
    padding-right: 50px; /* leave space for the close button */
  }

  .modal-container,
  .envelope-wrapper {
    width: calc(100vw - 30px) !important;
    max-width: 450px !important;
    box-sizing: border-box;
    padding: 20px 15px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
  }

  .envelope-wrapper {
    margin-bottom: 50px !important;
  }

  .modal-container::-webkit-scrollbar,
  .envelope-wrapper::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }
  
  #rsvpModal .modal-container {
    max-width: 600px !important;
    padding: 25px 15px !important;
  }

  .royal-seal-btn {
    right: auto !important;
    top: auto !important;
    bottom: -40px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .royal-seal-btn:hover .royal-seal {
    transform: scale(1.1) rotate(5deg);
  }
}

@media (max-width: 600px) {
  .rsvp-cards-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-container,
  .envelope-wrapper {
    width: calc(100vw - 30px) !important;
    max-width: 450px !important;
    box-sizing: border-box;
    padding: 20px 15px !important;
  }
  
  #rsvpModal .modal-container {
    width: calc(100vw - 30px) !important;
    max-width: 600px !important;
    padding: 25px 15px !important;
  }

  .chat-bubble {
    max-width: 90%;
  }
}

/* ==========================================================================
   CUSTOM DROPDOWN SELECT STYLING
   ========================================================================== */
.custom-select-container {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  height: 60px;
  background-color: #FFFFFF;
  border: 2px solid var(--color-cream-dark);
  border-radius: 30px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-sizing: border-box;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-charcoal);
  transition: var(--transition-fast);
  outline: none;
  user-select: none;
}

.custom-select-trigger.placeholder-active {
  color: rgba(0, 0, 0, 0.35);
}

.custom-select-trigger:focus,
.custom-select-container.open .custom-select-trigger {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(107, 200, 32, 0.15);
  background-color: #FFFFFF;
}

.trigger-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-royal-blue-dark);
  border-bottom: 2px solid var(--color-royal-blue-dark);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -3px;
}

.custom-select-container.open .trigger-chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #FFFFFF;
  border-radius: 20px;
  border: 2.5px solid var(--color-cream-dark);
  box-shadow: 0 12px 30px rgba(130, 14, 43, 0.15);
  z-index: 200;
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 8px 0;
}

.custom-select-container.open .custom-select-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select-option {
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-charcoal);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.15s ease, color 0.15s ease;
  user-select: none;
  text-align: left;
}

.custom-select-option:hover {
  background-color: #FAF5F6;
  color: var(--color-royal-blue-dark);
}

.custom-select-option.selected {
  font-weight: 700;
  color: var(--color-royal-blue-dark);
  background-color: #FAF5F6;
}

.custom-select-option .check-icon {
  display: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-gold);
}

.custom-select-option.selected .check-icon {
  display: inline-block;
}
