/* ======================================================================
   Wedding Ceremony Overlay & Proposal Modal
   ====================================================================== */

/* ── CSS Variables (theme-aware) ─────────────────────────────────── */
:root {
  --wedding-rose: #e8607a;
  --wedding-gold: #d4a853;
  --wedding-cream: #fdf6ec;
  --wedding-muted: rgba(255, 255, 255, 0.5);
}

/* ── Wedding Overlay ─────────────────────────────────────────────── */
.wedding-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.8s ease;
  pointer-events: none;
}

.wedding-overlay.active {
  background: rgba(0, 0, 0, 0.85);
  pointer-events: auto;
}

.wedding-overlay.leaving {
  background: rgba(0, 0, 0, 0);
  transition: background 0.5s ease;
}

/* ── Wedding Card ────────────────────────────────────────────────── */
.wedding-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 32px;
  max-width: 440px;
  width: 90%;
  opacity: 0;
  transform: translateY(40px) scale(0.92);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wedding-overlay.active .wedding-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.wedding-overlay.leaving .wedding-card {
  opacity: 0;
  transform: translateY(-30px) scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ── Wedding Image ───────────────────────────────────────────────── */
.wedding-image-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.wedding-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.wedding-image-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid var(--wedding-gold);
  animation: weddingGlow 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes weddingGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(212, 168, 83, 0.4); }
  50% { box-shadow: 0 0 28px rgba(212, 168, 83, 0.7); }
}

.wedding-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--wedding-muted);
  font-size: 13px;
}

/* ── Wedding Content ─────────────────────────────────────────────── */
.wedding-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wedding-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wedding-gold);
  opacity: 0;
  animation: weddingFadeIn 0.6s 0.3s forwards;
}

.wedding-names {
  font-size: 28px;
  font-weight: 300;
  color: var(--wedding-cream);
  letter-spacing: 1px;
  opacity: 0;
  animation: weddingFadeIn 0.6s 0.5s forwards;
}

.wedding-ampersand {
  color: var(--wedding-rose);
  font-style: italic;
  margin: 0 8px;
}

.wedding-date {
  font-size: 12px;
  color: var(--wedding-muted);
  opacity: 0;
  animation: weddingFadeIn 0.6s 0.7s forwards;
}

.wedding-tagline {
  font-size: 15px;
  font-style: italic;
  color: var(--wedding-cream);
  opacity: 0;
  animation: weddingFadeIn 0.6s 0.9s forwards;
  margin-top: 4px;
}

@keyframes weddingFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Continue Button ─────────────────────────────────────────────── */
.wedding-continue {
  margin-top: 16px;
  padding: 10px 32px;
  background: var(--wedding-rose);
  border: none;
  border-radius: 20px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  opacity: 0;
  animation: weddingFadeIn 0.6s 1.1s forwards;
}

.wedding-continue:hover {
  transform: translateY(-2px);
  background: #d4536d;
}

/* ── Falling Petals ──────────────────────────────────────────────── */
.wedding-petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 501;
  overflow: hidden;
}

.wedding-petal {
  position: absolute;
  top: -30px;
  font-size: 18px;
  animation: petalFall linear forwards;
  opacity: 0.7;
}

@keyframes petalFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0.7;
  }
  100% {
    transform: translateY(110vh) rotate(720deg) translateX(var(--drift, 80px));
    opacity: 0;
  }
}

/* ── Proposal Modal ──────────────────────────────────────────────── */
.proposal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.proposal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.proposal-modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 420px;
  width: 90%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.proposal-overlay.active .proposal-modal {
  transform: translateY(0) scale(1);
}

.proposal-header {
  text-align: center;
}

.proposal-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--rose, #c2697a);
  margin-bottom: 8px;
}

.proposal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.proposal-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.proposal-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}

.proposal-textarea:focus {
  outline: none;
  border-color: var(--rose);
}

.proposal-body {
  position: relative;
}

.proposal-char-count {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}

.proposal-char-count.over {
  color: var(--red, #ef4444);
}

.proposal-actions {
  display: flex;
  gap: 10px;
}

.proposal-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.proposal-btn:hover {
  transform: translateY(-1px);
}

.proposal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.proposal-btn-cancel {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}

.proposal-btn-send {
  background: var(--wedding-rose);
  color: white;
}

.proposal-btn-send:hover:not(:disabled) {
  background: #d4536d;
}

/* Proposal response overlay (acceptance/decline reveal) */
.proposal-response {
  text-align: center;
  max-width: 380px;
}

.proposal-response-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.proposal-response-text {
  font-family: "Cormorant Garamond", "Playfair Display", serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  color: var(--cream, #f0e8e0);
  margin-bottom: 20px;
  max-height: 200px;
  overflow-y: auto;
}

.proposal-response--accepted { border: 1px solid var(--rose) }
.proposal-response--declined { border: 1px solid var(--muted) }

.proposal-response-dismiss {
  flex: none;
  width: auto;
  padding: 10px 32px;
}

/* Proposal inline blocks in chat */
.msg-proposal,
.msg-proposal-response {
  border-left: 3px solid var(--rose);
  background: rgba(194, 105, 122, 0.08);
  padding: 10px 14px;
}

.msg-proposal-response--accepted {
  border-left-color: var(--rose);
  background: rgba(194, 105, 122, 0.1);
}

.msg-proposal-response--declined {
  border-left-color: var(--muted);
  background: rgba(100, 100, 100, 0.08);
}

.msg-proposal-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--rose-l, #e8899a);
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}

.msg-proposal-response--declined .msg-proposal-label {
  color: var(--muted);
}

.msg-proposal-text {
  font-family: "Cormorant Garamond", "Playfair Display", serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}
