html {
  font-size: 14px;
}

/* Ultra-small phones: show icons only in bottom nav */
@media (max-width: 420px) {
  .bottom-nav a { font-size: 0; gap: 0; padding: 0.35rem 0.5rem; }
  .bottom-nav a i { font-size: 1.25rem; margin: 0; }
}

/* Layout */
.content { padding: 0 1rem; }

.bottom-tip {
  text-align: center;
  margin-bottom: 0;
  padding-bottom: 0.5rem;
}

/* Removed legacy sidebar styles */

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

footer.footer {
  padding: 1rem 0;
}

/* Uppercase auth links in the top navbar (Register/Login) */
.login-partial a { text-transform: uppercase; }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* RSVP Form Styles */
.rsvp-card {
  max-width: 640px;
  margin: 2rem auto;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 6px 24px rgba(163,129,241,0.25);
  border: 1px solid #ffd2a6;
  padding: 2rem 1.25rem;
}
.rsvp-title {
  text-align: center;
  color: #f05a00;
  font-weight: 800;
}
.rsvp-subtitle {
  text-align: center;
  color: #4b5563;
  margin-bottom: 1.5rem;
}
.rsvp-input {
  border-radius: 0.75rem;
  border: 1px solid #ffd2a6;
  padding: 0.85rem 1rem;
}
.rsvp-input:focus {
  border-color: #ff8a3d;
  box-shadow: 0 0 0 0.2rem rgba(255,138,61,0.2);
}
.rsvp-label {
  position: relative;
  top: -2.4rem;
  left: 0.75rem;
  background: #fff0e6;
  color: #f05a00;
  padding: 0 0.35rem;
  font-weight: 600;
  border-radius: 0.25rem;
}
.rsvp-submit {
  background: linear-gradient(180deg, #ff7a1a, #e95700);
  color: #fff;
  font-weight: 700;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
}
.rsvp-submit:hover {
  background: linear-gradient(180deg, #ff8a3d, #f05a00);
  color: #fff;
}

/* CTA buttons (home page) - make equal width/size */
.cta-section-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}
.cta-section {
  flex: 1 1 0;
  min-width: 160px; /* prevents buttons from becoming too narrow */
}
.cta-section .cta-button {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  padding: 0.65rem 0.9rem;
  font-weight: 700;
  border-radius: 0.6rem;
}

@media (max-width: 576px) {
  .cta-section { flex-basis: 100%; }
}

/* Ensure object/pdf viewer allows scrolling on iOS */
.doc-viewer object, .doc-viewer iframe {
  width: 100%;
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile Bottom Navigation */
.bottom-nav { display: none; }

@media (max-width: 768px) {
  /* Bottom nav height variable for consistent spacing */
  :root { --bottom-nav-height: 56px; }

  /* Ensure page content is not under the bottom nav */
  .content { padding-bottom: calc(var(--bottom-nav-height) + max(8px, env(safe-area-inset-bottom))); }
  /* Mobile horizontal padding */
  .content { padding-left: 0.5rem; padding-right: 0.5rem; }

  main.pb-3 {
    padding-bottom: 0.5rem;
  }

  footer.footer {
    display: none;
  }

  .bottom-tip {
    margin-bottom: 0;
    padding-bottom: 0.25rem;
    
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: env(safe-area-inset-bottom);
    left: 0;
    right: 0;
    background: #6d3dd9; /* slightly deeper than #784ddd */
    border-top: 1px solid #a381f1;
    align-items: center;
    padding: 0.4rem 0.25rem;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
    /* Horizontal scroll to keep all items reachable on small screens */
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
    height: var(--bottom-nav-height);
    scroll-snap-type: x proximity;
  }

  /* Hide scrollbar visually */
  .bottom-nav::-webkit-scrollbar { display: none; }
  .bottom-nav { scrollbar-width: none; }

  .bottom-nav a {
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 40px;
    padding: 0.25rem 0;
    border-radius: 10px;
    line-height: 1;
    scroll-snap-align: center;
  }

  .bottom-nav a:hover,
  .bottom-nav a:focus {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
  }

  .bottom-nav a.active {
    background: rgba(255, 255, 255, 0.18);
  }
}
