/* ═══════════════════════════════════════════════════════════
   Wedding Invitation Manager — Public Styles
   Elegant cream & green aesthetic matching reference site
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Raleway:wght@200;300;400;500&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --wim-primary:     #2d6a4f;
  --wim-accent:      #c9a84c;
  --wim-bg:          #F5F0E6;
  --wim-cream-dark:  #ede8dc;
  --wim-gold-light:  #e8d5a3;
  --wim-text:        #3d3d3d;
  --wim-text-light:  #7a7a7a;
  --wim-white:       #ffffff;
  --wim-border:      rgba(201,168,76,.3);
  --wim-shadow:      0 4px 30px rgba(0,0,0,.08);
  --wim-radius:      12px;
  --ff-heading:      'Playfair Display', Georgia, serif;
  --ff-body:         'Raleway', sans-serif;
  --ff-arabic:       'Amiri', 'Cairo', serif;
  --ff-arabic-body:  'Cairo', sans-serif;
}

/* ── Reset & Base ────────────────────────────────────────── */
.wim-invitation *,
.wim-invitation *::before,
.wim-invitation *::after { box-sizing: border-box; margin: 0; padding: 0; }

.wim-invitation {
  font-family: var(--ff-body);
  background: var(--wim-bg);
  color: var(--wim-text);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ── Slides Container ────────────────────────────────────── */
.wim-slides {
  width: 100%;
  overflow: hidden;
  position: relative;
}
.wim-slide {
  display: none;
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  animation: wimFadeIn .5s ease;
}
.wim-slide.wim-active { display: flex; flex-direction: column; align-items: center; justify-content: center; }
@keyframes wimFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Card ────────────────────────────────────────────────── */
.wim-card-inv {
  background: var(--wim-white);
  border: 1.5px solid var(--wim-border);
  border-radius: var(--wim-radius);
  padding: 40px 36px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: var(--wim-shadow);
  position: relative;
}
/* Corner ornaments */
.wim-card-inv::before, .wim-card-inv::after {
  content: '';
  position: absolute;
  width: 40px; height: 40px;
  border-color: var(--wim-accent);
  border-style: solid;
}
.wim-card-inv::before { top: 10px; left: 10px; border-width: 2px 0 0 2px; }
.wim-card-inv::after  { bottom: 10px; right: 10px; border-width: 0 2px 2px 0; }

/* ── Typography ──────────────────────────────────────────── */
.wim-greeting-ar {
  font-family: var(--ff-arabic);
  font-size: clamp(15px, 4vw, 18px);
  color: var(--wim-primary);
  direction: rtl;
  margin-bottom: 6px;
  font-style: italic;
}
.wim-section-label {
  font-family: var(--ff-body);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--wim-text-light);
  margin: 16px 0 6px;
}
.wim-parents-en {
  font-family: var(--ff-heading);
  font-size: clamp(14px, 3.5vw, 16px);
  font-style: italic;
  color: var(--wim-text);
  line-height: 1.7;
}
.wim-parents-ar {
  font-family: var(--ff-arabic);
  font-size: clamp(14px, 3.5vw, 16px);
  direction: rtl;
  color: var(--wim-text);
  line-height: 1.7;
  margin-top: 4px;
}
.wim-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--wim-accent);
}
.wim-divider::before, .wim-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--wim-border);
}
.wim-divider-icon { font-size: 16px; }

.wim-honour-text {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--wim-text-light); margin: 8px 0;
}

/* ── Couple Names ────────────────────────────────────────── */
.wim-name-groom, .wim-name-bride {
  font-family: var(--ff-heading);
  font-size: clamp(52px, 14vw, 72px);
  font-weight: 400;
  color: var(--wim-primary);
  line-height: 1;
  letter-spacing: -1px;
}
.wim-ampersand-wrap {
  display: flex; align-items: center; gap: 0; margin: 8px 0;
  justify-content: center;
}
.wim-ampersand-line { flex: 1; height: 1px; background: var(--wim-accent); max-width: 60px; }
.wim-ampersand-diamond {
  width: 8px; height: 8px; background: var(--wim-accent);
  transform: rotate(45deg); margin: 0 10px;
}
.wim-wedding-date {
  font-family: var(--ff-heading);
  font-size: clamp(14px, 3.5vw, 17px);
  font-style: italic;
  color: var(--wim-text);
  margin-top: 16px;
}

/* ── Venue / Event Detail Slides ─────────────────────────── */
.wim-slide-title {
  font-family: var(--ff-heading);
  font-size: clamp(28px, 7vw, 38px);
  color: var(--wim-primary);
  font-style: italic;
  margin-bottom: 24px;
}
.wim-slide-title-ar {
  font-family: var(--ff-arabic);
  font-size: clamp(22px, 5vw, 30px);
  color: var(--wim-primary);
  direction: rtl;
  margin-bottom: 24px;
}
.wim-event-list { width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 16px; }
.wim-event-item {
  background: var(--wim-white);
  border: 1px solid var(--wim-border);
  border-radius: var(--wim-radius);
  padding: 20px 24px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.wim-event-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--wim-primary);
}
.wim-event-type-label {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--wim-accent); margin-bottom: 6px; font-weight: 600;
}
.wim-event-title { font-family: var(--ff-heading); font-size: 20px; color: var(--wim-primary); }
.wim-event-title-ar { font-family: var(--ff-arabic); font-size: 18px; color: var(--wim-primary); direction: rtl; }
.wim-event-datetime {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--wim-text-light); margin: 8px 0 4px;
}
.wim-event-venue { font-size: 14px; color: var(--wim-text); margin: 4px 0; }
.wim-event-venue-ar { font-family: var(--ff-arabic-body); direction: rtl; font-size: 13px; color: var(--wim-text-light); }
.wim-event-notes { font-size: 13px; color: var(--wim-text-light); margin-top: 8px; line-height: 1.6; }
.wim-event-notes-ar { font-family: var(--ff-arabic-body); direction: rtl; font-size: 12px; color: var(--wim-text-light); margin-top: 4px; }
.wim-event-dresscode { font-size: 12px; color: var(--wim-accent); margin-top: 6px; font-weight: 500; }
.wim-map-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px; padding: 7px 16px;
  background: var(--wim-bg); border: 1px solid var(--wim-border);
  border-radius: 100px; font-size: 12px; color: var(--wim-primary);
  text-decoration: none; transition: all .2s;
  font-family: var(--ff-body);
}
.wim-map-btn:hover { background: var(--wim-primary); color: #fff; border-color: var(--wim-primary); }

/* ── Day Ceremony Group Label ────────────────────────────── */
.wim-group-label {
  display: inline-block; padding: 4px 14px;
  background: var(--wim-cream-dark);
  border: 1px solid var(--wim-border);
  border-radius: 100px;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--wim-primary); font-weight: 600; margin-bottom: 12px;
}

/* ── RSVP Slide ──────────────────────────────────────────── */
.wim-rsvp-header-label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--wim-text-light); margin-bottom: 6px;
}
.wim-rsvp-title {
  font-family: var(--ff-heading);
  font-size: clamp(42px, 10vw, 56px);
  font-style: italic; color: var(--wim-primary); line-height: 1;
  margin-bottom: 6px;
}
.wim-rsvp-deadline { font-size: 13px; color: var(--wim-text-light); margin-bottom: 4px; }
.wim-rsvp-responding-as {
  font-family: var(--ff-arabic);
  font-style: italic; color: var(--wim-accent);
  font-size: 15px; direction: rtl; margin-bottom: 20px;
}

.wim-rsvp-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0 24px; }
.wim-rsvp-btn {
  padding: 14px 10px; border: 2px solid var(--wim-border);
  border-radius: 8px; background: transparent; cursor: pointer;
  font-family: var(--ff-body); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; font-weight: 600; color: var(--wim-text);
  transition: all .2s;
}
.wim-rsvp-btn:hover { border-color: var(--wim-primary); color: var(--wim-primary); }
.wim-rsvp-btn.wim-accept.active {
  background: var(--wim-primary); border-color: var(--wim-primary); color: #fff;
}
.wim-rsvp-btn.wim-decline.active {
  background: var(--wim-text); border-color: var(--wim-text); color: #fff;
}

.wim-attending-section { margin-top: 4px; }
.wim-attending-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--wim-text-light); margin-bottom: 12px; }
.wim-member-check {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--wim-border);
  border-radius: 8px; margin-bottom: 8px; cursor: pointer;
  transition: all .15s; background: transparent;
}
.wim-member-check:hover { background: var(--wim-cream-dark); }
.wim-member-check input[type="checkbox"] { display: none; }
.wim-check-box {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid var(--wim-border); border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; background: #fff;
}
.wim-member-check.checked .wim-check-box {
  background: var(--wim-primary); border-color: var(--wim-primary);
}
.wim-check-tick { color: #fff; font-size: 12px; display: none; }
.wim-member-check.checked .wim-check-tick { display: block; }
.wim-member-name-en-label { font-size: 14px; color: var(--wim-text); }
.wim-member-name-ar-label { font-family: var(--ff-arabic-body); font-size: 13px; color: var(--wim-text-light); direction: rtl; }
.wim-uncheck-hint { font-size: 11px; color: var(--wim-text-light); margin-top: 6px; margin-bottom: 16px; }

.wim-message-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--wim-text-light); margin: 16px 0 8px; }
.wim-rsvp-textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--wim-border); border-radius: 8px;
  font-family: var(--ff-body); font-size: 13px; color: var(--wim-text);
  background: transparent; resize: none; min-height: 80px; transition: border .2s;
}
.wim-rsvp-textarea:focus { outline: none; border-color: var(--wim-primary); }
.wim-rsvp-textarea::placeholder { color: var(--wim-text-light); font-style: italic; }

.wim-submit-btn {
  display: block; width: 100%; margin-top: 16px;
  padding: 16px; background: var(--wim-primary);
  color: #fff; border: none; border-radius: 8px;
  font-family: var(--ff-body); font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.wim-submit-btn:hover { background: #235c42; transform: translateY(-1px); }
.wim-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.wim-rsvp-result {
  text-align: center; padding: 20px;
  font-family: var(--ff-heading); font-size: 20px;
  font-style: italic; color: var(--wim-primary);
}

/* ── Navigation dots ─────────────────────────────────────── */
.wim-nav {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center;
  z-index: 200;
}
.wim-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--wim-border);
  cursor: pointer; transition: all .2s; border: none;
  padding: 0;
}
.wim-dot.active { background: var(--wim-primary); transform: scale(1.3); }
.wim-dot:hover  { background: var(--wim-accent); }

/* ── Navigation arrows ───────────────────────────────────── */
.wim-arrow {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.85); border: 1px solid var(--wim-border);
  border-radius: 50%; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 200; transition: all .2s; font-size: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.wim-arrow:hover { background: var(--wim-primary); color: #fff; border-color: var(--wim-primary); }
.wim-arrow-prev { left: 12px; }
.wim-arrow-next { right: 12px; }
.wim-arrow:disabled { opacity: .3; cursor: not-allowed; }

/* ── Music toggle ────────────────────────────────────────── */
.wim-music-toggle {
  position: fixed; top: 20px; right: 16px;
  background: rgba(255,255,255,.85); border: 1px solid var(--wim-border);
  border-radius: 50%; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 300; transition: all .2s;
  box-shadow: 0 2px 10px rgba(0,0,0,.08); font-size: 18px;
}
.wim-music-toggle:hover { background: var(--wim-primary); color: #fff; }
.wim-music-toggle.playing { background: var(--wim-primary); color: #fff; }

/* ── No family state ─────────────────────────────────────── */
.wim-no-family {
  text-align: center; padding: 60px 20px;
  font-family: var(--ff-heading); font-style: italic;
  color: var(--wim-text-light); font-size: 18px;
}

/* ── Schedule timeline ───────────────────────────────────── */
.wim-timeline { width: 100%; max-width: 480px; }
.wim-timeline-item {
  display: grid; grid-template-columns: 80px 1fr;
  gap: 0; margin-bottom: 0;
}
.wim-timeline-time {
  padding: 16px 12px 16px 0; text-align: right;
  font-size: 13px; font-weight: 600; color: var(--wim-accent);
  border-right: 2px solid var(--wim-border); position: relative;
}
.wim-timeline-time::after {
  content: ''; position: absolute; right: -5px; top: 22px;
  width: 8px; height: 8px; background: var(--wim-accent); border-radius: 50%;
}
.wim-timeline-content { padding: 14px 0 14px 16px; border-bottom: 1px solid var(--wim-border); }
.wim-timeline-item:last-child .wim-timeline-content { border-bottom: none; }
.wim-timeline-content h4 { font-family: var(--ff-heading); font-size: 15px; color: var(--wim-primary); }
.wim-timeline-content p  { font-size: 12px; color: var(--wim-text-light); margin-top: 3px; }

/* ── Decorative elements ─────────────────────────────────── */
.wim-flourish { color: var(--wim-accent); font-size: 20px; margin: 8px 0; }
.wim-line-separator {
  width: 60px; height: 1px; background: var(--wim-accent);
  margin: 12px auto;
}

/* ── Background image ────────────────────────────────────── */
.wim-has-bg {
  background-size: cover; background-position: center;
}
.wim-has-bg::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(245,240,230,.88);
}
.wim-has-bg > * { position: relative; z-index: 1; }

/* ── Admin overlay ───────────────────────────────────────── */
.wim-admin-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(45,106,79,.95); color: #fff;
  padding: 10px 20px; z-index: 9999;
  display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.wim-admin-bar a {
  color: var(--wim-accent); text-decoration: none; font-weight: 600;
}
.wim-admin-bar a:hover { text-decoration: underline; }
.wim-has-admin-bar { padding-top: 46px; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .wim-card-inv { padding: 28px 20px; }
  .wim-arrow { display: none; }
  .wim-name-groom, .wim-name-bride { font-size: clamp(44px,12vw,60px); }
}

/* ── Swipe hint (mobile) ─────────────────────────────────── */
.wim-swipe-hint {
  position: fixed; bottom: 52px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 1px; color: var(--wim-text-light);
  opacity: 0; animation: hintFade 3s 2s forwards;
}
@keyframes hintFade { 0%{opacity:0} 20%{opacity:1} 80%{opacity:1} 100%{opacity:0} }

/* ── Full-screen body reset (fullscreen-template.php) ────────────────────── */
body.wim-fullscreen-body {
  margin:  0 !important;
  padding: 0 !important;
  background: var(--wim-bg) !important;
}
body.wim-fullscreen-body .wim-invitation {
  min-height: 100vh;
}

/* Hide the "Install App" PWA banner that some hosts inject */
body.wim-fullscreen-body [class*="pwa"],
body.wim-fullscreen-body [id*="pwa"],
body.wim-fullscreen-body [class*="install-app"],
body.wim-fullscreen-body [id*="install-app"] {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   Language toggle — AR / EN
   ═══════════════════════════════════════════════════════════ */

/* Hide inactive language text */
.wim-invitation.wim-mode-en .wim-text-ar { display: none !important; }
.wim-invitation.wim-mode-ar .wim-text-en { display: none !important; }

/* When both AR and EN are inside the same parent element,
   flex them so only one shows, centred. */
.wim-name-groom,
.wim-name-bride { display: flex; justify-content: center; align-items: center; }
.wim-name-groom span,
.wim-name-bride span { display: inline; }

/* Language switcher pill */
.wim-lang-switcher {
  position: fixed;
  top: 20px;
  left: 16px;
  display: flex;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--wim-border);
  border-radius: 100px;
  overflow: hidden;
  z-index: 300;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.wim-lang-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  color: var(--wim-text-light);
  transition: all .15s;
  font-family: var(--ff-body);
  line-height: 1;
}
.wim-lang-btn:hover  { color: var(--wim-primary); }
.wim-lang-btn.active {
  background: var(--wim-primary);
  color: #fff;
  border-radius: 100px;
}

/* Arabic-mode: right-align RTL text blocks */
.wim-invitation.wim-mode-ar .wim-rsvp-responding-as,
.wim-invitation.wim-mode-ar .wim-parents-ar,
.wim-invitation.wim-mode-ar .wim-section-label-ar,
.wim-invitation.wim-mode-ar .wim-honour-text-ar,
.wim-invitation.wim-mode-ar .wim-event-title-ar,
.wim-invitation.wim-mode-ar .wim-event-venue-ar,
.wim-invitation.wim-mode-ar .wim-event-notes-ar,
.wim-invitation.wim-mode-ar .wim-slide-title-ar { text-align: center; }

/* Section labels Arabic */
.wim-section-label-ar {
  font-family: var(--ff-arabic);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--wim-text-light);
  margin: 16px 0 6px;
  direction: rtl;
}
/* Honour text Arabic */
.wim-honour-text-ar {
  font-family: var(--ff-arabic);
  font-size: 12px;
  direction: rtl;
  color: var(--wim-text-light);
  margin-bottom: 16px;
}
/* Greeting EN line */
.wim-greeting-en-line {
  font-family: var(--ff-body);
  font-size: 13px;
  color: #888;
  font-style: italic;
  margin-bottom: 12px;
}
/* RSVP "will attend" label */
.wim-rsvp-will-attend {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--wim-text-light);
  margin: 0 0 12px;
}
/* Already responded note */
.wim-already-rsvp {
  font-size: 12px;
  text-align: center;
  color: var(--wim-accent);
  margin-top: 12px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   RSVP — Decline now shows the response section
   ═══════════════════════════════════════════════════════════ */
.wim-response-section { margin-top: 4px; }

/* Keep music toggle shifted right of lang switcher on small screens */
.wim-music-toggle { right: 16px; left: auto; }
