/* ========================================================
   10. MODAL DIALOGS (RSVP & TOAST NOTIFICATION)
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #fbf8f2;
  border-radius: 18px;
  width: min(450px, 92vw);
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  position: relative;
  border: 1px solid rgba(27, 56, 88, 0.18);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-sizing: border-box;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

/* ========================================================
   RSVP MODAL — layout/size chuẩn thiệp 8 (navy thiệp 2)
   ======================================================== */
#rsvp-modal {
  --rsvp-font: "Cormorant Garamond", Georgia, serif;
  --rsvp-accent: #1b3858;
  --rsvp-muted: #5e7d9b;
  --rsvp-border: rgba(27, 56, 88, 0.22);
  font-family: var(--rsvp-font);
}

#rsvp-modal.modal-overlay {
  padding: 16px;
  overflow-y: auto;
}

#rsvp-modal .modal-box,
#rsvp-modal .rsvp-modal-box {
  background: #fbf8f2;
  border: 1px solid rgba(27, 56, 88, 0.18);
  width: min(450px, 92vw);
  max-width: 450px;
  padding: 28px 24px 24px;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-sizing: border-box;
  display: block;
  font-family: var(--rsvp-font);
}

#rsvp-modal .modal-close,
#rsvp-modal #rsvp-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(27, 56, 88, 0.08);
  color: var(--rsvp-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  font-family: var(--rsvp-font);
}

#rsvp-modal .modal-close:hover,
#rsvp-modal #rsvp-modal-close:hover {
  background: rgba(27, 56, 88, 0.16);
  color: #162f4a;
}

#rsvp-modal .modal-title,
#rsvp-modal #rsvp-modal-title {
  font-family: var(--rsvp-font) !important;
  color: var(--rsvp-accent);
  font-size: 1.42rem;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.35;
  text-align: center;
  letter-spacing: normal;
}

#rsvp-modal .modal-subtitle {
  font-family: var(--rsvp-font) !important;
  color: var(--rsvp-muted);
  font-size: 0.90rem;
  line-height: 1.45;
  margin: 0 0 20px;
  text-align: center;
}

#rsvp-modal #rsvp-modal-form {
  display: block;
  margin: 0;
  padding: 0;
  text-align: left;
  font-family: var(--rsvp-font);
}

#rsvp-modal .rsvp-form-group,
#rsvp-modal #rsvp-guests-group {
  display: block;
  margin: 0 0 15px;
  padding: 0;
}

#rsvp-modal .rsvp-form-label {
  display: block;
  font-family: var(--rsvp-font) !important;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--rsvp-accent);
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
}

#rsvp-modal .form-input,
#rsvp-modal .rsvp-input,
#rsvp-modal #rsvp-modal-form select {
  display: block;
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 9px 14px;
  font-family: var(--rsvp-font) !important;
  font-size: 16px; /* >=16px: Safari iOS không auto-zoom khi focus */
  line-height: 1.35;
  color: var(--rsvp-accent);
  background: #ffffff;
  border: 1.2px solid var(--rsvp-border);
  border-radius: 10px;
  box-shadow: none;
  box-sizing: border-box;
  outline: none;
  appearance: auto;
  -webkit-appearance: auto;
}

#rsvp-modal #rsvp-modal-form select {
  -webkit-appearance: menulist;
  cursor: pointer;
}

#rsvp-modal .form-input::placeholder,
#rsvp-modal .rsvp-input::placeholder {
  color: #8da4bc;
  font-size: 16px; /* giữ >=16px cùng input */
  opacity: 1;
  font-family: var(--rsvp-font);
}

#rsvp-modal .form-input:focus,
#rsvp-modal .rsvp-input:focus,
#rsvp-modal #rsvp-modal-form select:focus {
  border-color: rgba(27, 56, 88, 0.45);
  box-shadow: none;
  background: #ffffff;
}

#rsvp-modal .rsvp-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

#rsvp-modal .rsvp-radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  min-height: 42px;
  font-family: var(--rsvp-font) !important;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--rsvp-accent);
  background: #ffffff;
  border: 1.2px solid rgba(27, 56, 88, 0.2);
  border-radius: 10px;
  box-sizing: border-box;
  cursor: pointer;
  margin: 0;
  width: 100%;
}

#rsvp-modal .rsvp-radio-label input {
  accent-color: var(--rsvp-accent);
  width: 17px;
  height: 17px;
  margin: 0;
  flex-shrink: 0;
}

#rsvp-modal .rsvp-radio-label:has(input:checked) {
  border-color: var(--rsvp-accent);
  background: rgba(27, 56, 88, 0.08);
  color: var(--rsvp-accent);
  font-weight: 600;
}

#rsvp-modal .form-textarea,
#rsvp-modal .rsvp-textarea,
#rsvp-modal #rsvp-modal-form textarea {
  display: block;
  width: 100%;
  height: 72px;
  min-height: 72px;
  max-height: 110px;
  padding: 10px 14px;
  font-family: var(--rsvp-font) !important;
  font-size: 16px; /* >=16px: Safari iOS không auto-zoom khi focus */
  line-height: 1.45;
  color: var(--rsvp-accent);
  background: #ffffff;
  border: 1.2px solid var(--rsvp-border);
  border-radius: 10px;
  box-sizing: border-box;
  resize: vertical;
  box-shadow: none;
  outline: none;
}

#rsvp-modal .form-textarea::placeholder,
#rsvp-modal .rsvp-textarea::placeholder {
  color: #8da4bc;
  font-size: 16px;
  opacity: 1;
  font-family: var(--rsvp-font);
}

#rsvp-modal .rsvp-btn-submit,
#rsvp-modal #rsvp-modal-form button[type="submit"] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  margin-top: 14px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--rsvp-accent);
  background-image: none;
  color: #ffffff;
  font-family: var(--rsvp-font) !important;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: 0 4px 12px rgba(27, 56, 88, 0.25);
  cursor: pointer;
  gap: 0;
}

#rsvp-modal .rsvp-btn-submit:hover,
#rsvp-modal #rsvp-modal-form button[type="submit"]:hover {
  background: #162f4a;
  transform: none;
  box-shadow: 0 6px 16px rgba(27, 56, 88, 0.32);
}

@media (max-width: 480px) {
  #rsvp-modal.modal-overlay {
    padding: 8px;
  }

  #rsvp-modal .modal-box,
  #rsvp-modal .rsvp-modal-box {
    padding: 24px 18px 20px;
    border-radius: 16px;
    width: min(420px, 92vw);
  }

  #rsvp-modal .modal-title,
  #rsvp-modal #rsvp-modal-title {
    font-size: 1.30rem;
    margin-bottom: 5px;
  }

  #rsvp-modal .modal-subtitle {
    font-size: 0.86rem;
    margin-bottom: 16px;
  }

  #rsvp-modal .rsvp-form-group,
  #rsvp-modal #rsvp-guests-group {
    margin-bottom: 13px;
  }

  #rsvp-modal .rsvp-form-label {
    font-size: 0.88rem;
    margin-bottom: 5px;
  }

  #rsvp-modal .form-input,
  #rsvp-modal .rsvp-input,
  #rsvp-modal #rsvp-modal-form select {
    height: 42px;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 16px; /* giữ >=16px chống zoom */
  }

  #rsvp-modal .rsvp-choices {
    gap: 7px;
  }

  #rsvp-modal .rsvp-radio-label {
    padding: 9px 12px;
    min-height: 40px;
    font-size: 0.88rem;
  }

  #rsvp-modal .form-textarea,
  #rsvp-modal .rsvp-textarea,
  #rsvp-modal #rsvp-modal-form textarea {
    height: 66px;
    min-height: 66px;
    padding: 8px 12px;
    font-size: 16px; /* giữ >=16px chống zoom */
  }

  #rsvp-modal .rsvp-btn-submit,
  #rsvp-modal #rsvp-modal-form button[type="submit"] {
    height: 44px;
    font-size: 0.98rem;
    padding: 10px 18px;
    margin-top: 12px;
  }
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: linear-gradient(135deg, #466e92 0%, #2b4f70 100%);
  color: #ffffff;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 10px 28px rgba(35, 65, 95, 0.35), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

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

/* ========================================================
   11. FLOATING LANGUAGE SWITCHER (DROPDOWN)
   ======================================================== */
.floating-lang {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1001;
  user-select: none;
}

.lang-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(160, 190, 220, 0.7);
  border-radius: 999px;
  padding: 7px 10px 7px 12px;
  font-family: var(--font-body), "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #3b6082;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(45, 75, 105, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  min-width: 64px;
  justify-content: center;
}

.lang-trigger-btn:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(120, 160, 200, 0.9);
  color: #1e4166;
  box-shadow: 0 6px 20px rgba(45, 75, 105, 0.2);
  transform: translateY(-1px);
}

.lang-trigger-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.floating-lang.is-open .lang-trigger-chevron {
  transform: rotate(180deg);
}

.floating-lang.is-open .lang-trigger-btn {
  background: rgba(255, 255, 255, 0.98);
  color: #1e4166;
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(160, 190, 220, 0.7);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(45, 75, 105, 0.18);
}

.lang-dropdown[hidden] {
  display: none;
}

.lang-btn {
  background: transparent;
  border: 0;
  outline: none;
  font-family: var(--font-body), "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: #3b6082;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.lang-btn:hover {
  color: #1e4166;
  background: rgba(79, 119, 156, 0.1);
}

.lang-btn.active {
  background: linear-gradient(135deg, #4f779c 0%, #355d82 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(45, 80, 115, 0.35);
}

@media (max-width: 480px) {
  .floating-lang {
    top: 14px;
    right: 14px;
  }
  .lang-trigger-btn {
    font-size: 0.68rem;
    padding: 6px 10px 6px 12px;
  }
  .lang-btn {
    font-size: 0.7rem;
    padding: 7px 12px;
  }
}

/* ========================================================
   FLOATING MUSIC PLAYER (PASTEL BLUE & WHITE)
   ======================================================== */
.floating-music {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a4c9ee 0%, #70a2d2 100%);
  color: #ffffff;
  border: 2px solid #ffffff;
  box-shadow: 
    0 8px 22px rgba(80, 125, 175, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.floating-music:hover {
  transform: scale(1.1);
  background: linear-gradient(135deg, #b5d5f5 0%, #7cb0e0 100%);
  box-shadow: 0 10px 26px rgba(80, 125, 175, 0.42);
}

.floating-music .music-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.3s ease;
}

.floating-music .music-icon svg {
  width: 100%;
  height: 100%;
  fill: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(25, 55, 90, 0.2));
}

.floating-music.playing .music-icon {
  animation: spin-vinyl 4s linear infinite;
}

@keyframes spin-vinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .floating-music {
    bottom: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
  .floating-music .music-icon {
    width: 18px;
    height: 18px;
  }
}

/* ========================================================
   12. DRESS CODE COMPONENT
   ======================================================== */
.dresscode-card {
  background: linear-gradient(180deg, #fffcf8 0%, #f8f3eb 100%);
  border: 1px solid rgba(197, 160, 89, 0.4);
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 14px 40px rgba(45, 10, 15, 0.08);
  position: relative;
  overflow: hidden;
}

.dresscode-card .card-heading {
  color: var(--primary-navy);
  font-family: var(--font-title);
  font-size: 1.35rem;
  letter-spacing: 0.16em;
  margin-bottom: 2px;
}

.dresscode-icon-wrap {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(27, 56, 88, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-navy);
}

.dresscode-subtitle {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
  margin-top: 4px;
}

.dresscode-note {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 0.96rem;
  line-height: 1.6;
  color: #5c4347;
  max-width: 440px;
  margin: 14px auto 24px;
}

.dresscode-palettes {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(8px, 3vw, 24px);
  margin-top: 10px;
  width: 100%;
}

.dresscode-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 80px;
  min-width: 0;
  transition: transform 0.25s ease;
}

.dresscode-item:hover {
  transform: translateY(-3px);
}

.dresscode-swatch {
  width: clamp(40px, 11vw, 52px);
  height: clamp(40px, 11vw, 52px);
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15), inset 0 0 0 2px rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(197, 160, 89, 0.35);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.dresscode-item:hover .dresscode-swatch {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.dresscode-name {
  font-size: clamp(0.72rem, 2.2vw, 0.82rem);
  font-weight: 600;
  color: #3b2227;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.25;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .dresscode-card {
    padding: 26px 14px;
  }
  .dresscode-palettes {
    gap: 6px;
  }
  .dresscode-name {
    font-size: 0.72rem;
  }
}

