/* ------------------------------
   GLOBAL RESET + BASE STYLES
--------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;   /* ❗ block left-right scrolling */
  overflow-y: auto;     /* ❗ allow up-down scrolling */
  background: #fffdf9;
  font-family: 'Italianno', cursive;
  margin: 0;
  padding: 0;
}



body {
  margin-top: 13vh;
  padding: 0;
  background: #fffdf9;
}

/* ------------------------------
   FLORAL BANNER
--------------------------------*/
.floral-banner {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;          /* element fits screen */
  overflow: hidden;       /* hide overflow */
}

.floral-img {
  width: 110vw;           /* image is oversized */
  max-width: none;
  transform: translateX(-5vw); /* recentre the image */
}

/*****************************************/

.gb-header {
  text-align: center;
  margin-bottom: 20px;
}

.gb-header h1 {
  font-family: 'Alex Brush', cursive;
  font-size: 2.4rem;
  margin-bottom: 5px;
}

.gb-subtitle{
font-size: 1.8rem;

}


.message-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px 0;
}

.message-card {
  position: relative;
  width: 90%;               /* new width */
  margin: 0 auto;           /* centre it */
  background: #fffdf9;
  border: 2px solid #e8d4cc;
  border-radius: 12px;
  padding: 15px 15px 35px;
  font-size: 1.2rem;
  color: #5a4a42;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  overflow: visible;
}

/* pastel glow */
.message-card::before {
  content: "";
  position: absolute;
  top: -25px;
  left: -25px;
  right: -25px;
  bottom: -25px;
  border-radius: 30px;        /* softer shape */
  filter: blur(70px);         /* stronger, broader glow */
  opacity: 0.6;               /* more visible */
  z-index: -1;
  /* default glow matches the message border colour */
  /*background: var(--glow, #e8d4cc);*/
}

.message-card {
  /* stronger subtle outer shadow to make the card sit above background */
  box-shadow: 0 12px 30px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
}




.message-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.message-card .name {
  font-family: 'Alice', serif;
  font-size: 1.4rem;
  margin: 0;
  text-align: right;
}


.like-btn {
  /* inline button placed in header */
  position: relative;
  font-size: 1.6rem;
  cursor: pointer;
  user-select: none;
  color: #c7b1aa;
  transition: transform 0.2s ease, color 0.3s ease;
}

.like-btn.liked {
  color: #e8a6b1;
  transform: scale(1.25);
}


.like-btn:active {
  transform: scale(0.9);
}

/* Header row inside message card: left = heart, right = name */
.message-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.message-card p {
  margin: 8px 0;
  line-height: 1.3;
  font-family: 'Alice', serif;
}

/* Brief highlight for newly added message */
.message-card.newly-added {
  animation: newHighlight 2.2s ease forwards;
}

@keyframes newHighlight {
  0% { box-shadow: 0 8px 30px rgba(232, 212, 204, 0.35); transform: translateY(-4px); }
  60% { box-shadow: 0 6px 20px rgba(232, 212, 204, 0.25); transform: translateY(0); }
  100% { box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
}

/* Modal background */
.messageModal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  justify-content: center;
  align-items: center;
  animation: modalFadeIn 0.6s ease forwards;
}

@keyframes modalFadeIn {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.4); }
}

/* Modal box */
.messageModal-content {
  background: #fffdf9;
  padding: 20px;
  width: 85%;
  max-width: 400px;
  border-radius: 12px;
  text-align: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  border: 6px solid #e8d4cc; /* pastel pink border */
  animation: modalContentIn 0.6s ease forwards;
  font-family: 'Alice', serif;
}

@keyframes modalContentIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


.messageModal.animate {
  animation: modalFadeIn 0.4s ease forwards;
}

.messageModal-content.animate {
  animation: modalContentIn 0.4s ease forwards;
}

.messageModal-title{
    padding-bottom:15px;
}

/* Make modal inputs comfortable and avoid mobile zoom by using 16px font-size */
.messageModal-content textarea,
.messageModal-content input[type="text"] {
  width: 90%;
  display: block;
  margin: 8px auto;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e6d9d0;
  font-size: 16px; /* prevents iOS auto-zoom when focusing */
  font-family: 'Alice', serif;
}

.messageModal-upload-btn {
  min-width: 140px;
  padding: 12px 20px;
}

/* Reuse the same pretty upload button style used on the photo wall */
.pretty-upload-btn {
  background: #e8d4cc;
  border: none;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 1.6rem;
  font-family: 'Alex Brush', cursive;
  color: #5a4a42;
  margin: 20px auto;
  display: block;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.pretty-upload-btn:active {
  transform: scale(0.95);
}

/* Close button */
.close-messageModal {
  position: absolute;
  top: -6px;
  right: 5px;
  font-size: 2rem;
  cursor: pointer;
  color: #7a6f68;
}

/* Modal upload button */
.messageModal-upload-btn {
  background: #d8c2b8;
  border: none;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 1.4rem;
  font-family: 'Alex Brush', cursive;
  color: #5a4a42;
  margin-top: 15px;
  cursor: pointer;
}

.modal-thank-you {
  font-family: 'Alex Brush', cursive;
  font-size: 1.4rem;
  color: #5a4a42;
  padding: 18px 12px;
  background: #fffdf9;
  border: 2px solid #e8d4cc;
  border-radius: 12px;
  margin-top: 8px;
}




.back-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  background: #f1e3df; /* pastel pink/cream */
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  opacity: 0;
  animation: fadeInBackBtn 0.6s ease forwards 0.4s;
}

@keyframes fadeInBackBtn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.back-btn:active {
  transform: scale(0.92);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


.back-arrow {
  font-size: 1.8rem;
  color: #5a4a42;
  display: flex;
  align-items: center;   /* extra centring insurance */
  justify-content: center;
}

body, html {
  max-width: 100%;
  overflow-x: hidden !important;
}
