/* ═══════════════════════════════════════════════════════════════
   Open Heaven Christian Church – Sunday Invitation
   Stylesheet v1.0
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cinzel:wght@400;600;700&family=EB+Garamond:ital,wght@0,400;0,600;1,400;1,600&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --ohci-gold:       #c9922a;
  --ohci-gold-lt:    #f0c86a;
  --ohci-gold-dk:    #8c6217;
  --ohci-crimson:    #7a1521;
  --ohci-crimson-lt: #b52232;
  --ohci-navy:       #0d1b2a;
  --ohci-navy-lt:    #162236;
  --ohci-cream:      #fdf6e3;
  --ohci-cream-dk:   #f2e8ca;
  --ohci-text:       #1a0a00;
  --ohci-muted:      #5c4a2a;
  --ohci-radius:     16px;
  --ohci-shadow:     0 32px 80px rgba(0,0,0,.55);
  --ohci-font-head:  'Cinzel Decorative', serif;
  --ohci-font-sub:   'Cinzel', serif;
  --ohci-font-body:  'EB Garamond', serif;
}

/* ── OVERLAY ────────────────────────────────────────────── */
#ohci-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 24, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: ohci-fade-in .4s ease;
}

@keyframes ohci-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── MODAL ──────────────────────────────────────────────── */
#ohci-modal {
  background: var(--ohci-cream);
  border-radius: var(--ohci-radius);
  box-shadow: var(--ohci-shadow), inset 0 0 0 1px rgba(201,146,42,.25);
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: ohci-rise .45s cubic-bezier(.16,1,.3,1);
  position: relative;
}

@keyframes ohci-rise {
  from { transform: translateY(28px) scale(.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ── MODAL HEADER ───────────────────────────────────────── */
#ohci-modal-header {
  background: linear-gradient(135deg, var(--ohci-navy) 0%, #1c2e47 60%, var(--ohci-crimson) 100%);
  padding: 28px 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 3px solid var(--ohci-gold);
  flex-shrink: 0;
}

.ohci-cross-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}

.ohci-cross {
  width: 38px;
  height: 54px;
  color: var(--ohci-gold);
  filter: drop-shadow(0 2px 8px rgba(201,146,42,.6));
}

.ohci-flame {
  position: absolute;
  top: -12px;
  left: 5px;
  width: 26px;
  height: 36px;
  animation: ohci-flicker 1.8s ease-in-out infinite alternate;
}

@keyframes ohci-flicker {
  0%   { transform: scaleX(1)   scaleY(1)    rotate(-1deg); opacity: .9; }
  33%  { transform: scaleX(.95) scaleY(1.03) rotate(1deg);  opacity: 1;  }
  66%  { transform: scaleX(1.04)scaleY(.97)  rotate(-2deg); opacity: .85;}
  100% { transform: scaleX(.97) scaleY(1.02) rotate(1.5deg);opacity: 1;  }
}

.ohci-church-name {
  font-family: var(--ohci-font-head);
  font-size: clamp(13px, 2.5vw, 18px);
  color: var(--ohci-gold-lt);
  margin: 0;
  letter-spacing: .04em;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  line-height: 1.3;
}

/* ── TWO-COLUMN BODY ────────────────────────────────────── */
#ohci-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ── LEFT – ATTENDEES PANEL ─────────────────────────────── */
#ohci-attendees-panel {
  width: 200px;
  min-width: 160px;
  background: linear-gradient(180deg, var(--ohci-navy-lt) 0%, var(--ohci-navy) 100%);
  border-right: 2px solid var(--ohci-gold-dk);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ohci-panel-title {
  font-family: var(--ohci-font-sub);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ohci-gold);
  margin: 0;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(201,146,42,.25);
  flex-shrink: 0;
}

#ohci-attendees-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--ohci-gold-dk) transparent;
}

#ohci-attendees-list::-webkit-scrollbar       { width: 5px; }
#ohci-attendees-list::-webkit-scrollbar-thumb { background: var(--ohci-gold-dk); border-radius: 4px; }

.ohci-attendee {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 6px;
  border-radius: 8px;
  transition: background .2s;
}
.ohci-attendee:hover { background: rgba(255,255,255,.06); }

.ohci-attendee img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ohci-gold);
  flex-shrink: 0;
}

.ohci-attendee span {
  font-family: var(--ohci-font-body);
  font-size: 13px;
  color: var(--ohci-cream);
  line-height: 1.2;
  word-break: break-word;
}

.ohci-no-attendees {
  font-family: var(--ohci-font-body);
  font-style: italic;
  font-size: 13px;
  color: rgba(240,200,106,.55);
  text-align: center;
  padding: 20px 10px;
  margin: 0;
}

/* ── RIGHT – INVITATION ─────────────────────────────────── */
#ohci-invitation {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 30px;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--ohci-gold-dk) transparent;
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9922a' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
    var(--ohci-cream);
}

#ohci-invitation::-webkit-scrollbar       { width: 5px; }
#ohci-invitation::-webkit-scrollbar-thumb { background: var(--ohci-gold-dk); border-radius: 4px; }

/* ── USER GREETING ──────────────────────────────────────── */
.ohci-user-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.ohci-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ohci-gold);
  box-shadow: 0 0 0 4px rgba(201,146,42,.15);
}

.ohci-user-greeting span {
  font-family: var(--ohci-font-body);
  font-size: 16px;
  color: var(--ohci-muted);
}

.ohci-user-greeting strong {
  color: var(--ohci-navy);
}

/* ── TITLE ──────────────────────────────────────────────── */
#ohci-title {
  font-family: var(--ohci-font-head);
  font-size: clamp(16px, 3vw, 24px);
  color: var(--ohci-crimson);
  margin: 0 0 4px;
  line-height: 1.25;
  letter-spacing: .02em;
}

.ohci-divider {
  height: 3px;
  width: 80px;
  background: linear-gradient(90deg, var(--ohci-gold), var(--ohci-gold-lt), var(--ohci-gold));
  border-radius: 2px;
  margin-bottom: 18px;
}

/* ── MESSAGE TEXT ───────────────────────────────────────── */
.ohci-message {
  font-family: var(--ohci-font-body);
  font-size: clamp(14.5px, 1.6vw, 16.5px);
  line-height: 1.75;
  color: var(--ohci-text);
  margin: 0 0 14px;
}

.ohci-message em {
  font-style: italic;
  color: var(--ohci-crimson);
  font-size: .93em;
}

.ohci-message strong {
  color: var(--ohci-navy);
}

.ohci-closing {
  font-family: var(--ohci-font-body);
  font-size: clamp(14px, 1.5vw, 16px);
  font-style: italic;
  color: var(--ohci-muted);
  border-top: 1px solid var(--ohci-cream-dk);
  padding-top: 14px;
  margin: 6px 0 22px;
}

/* ── BUTTONS ────────────────────────────────────────────── */
.ohci-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: auto;
}

.ohci-btn {
  flex: 1;
  min-width: 160px;
  padding: 13px 20px;
  border: none;
  border-radius: 10px;
  font-family: var(--ohci-font-sub);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .18s, box-shadow .18s, filter .18s;
  position: relative;
  overflow: hidden;
}

.ohci-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.12);
  opacity: 0;
  transition: opacity .2s;
}
.ohci-btn:hover::after { opacity: 1; }

.ohci-btn:hover  { transform: translateY(-2px); }
.ohci-btn:active { transform: translateY(0); }

.ohci-btn-attend {
  background: linear-gradient(135deg, var(--ohci-crimson) 0%, #a01d2c 100%);
  color: #fff;
  box-shadow: 0 6px 24px rgba(122,21,33,.35);
}
.ohci-btn-attend:hover  { box-shadow: 0 10px 32px rgba(122,21,33,.5); }

.ohci-btn-decline {
  background: linear-gradient(135deg, #3a3a3a 0%, #555 100%);
  color: #ddd;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.ohci-btn-decline:hover { box-shadow: 0 10px 28px rgba(0,0,0,.35); }

.ohci-btn-icon {
  font-size: 16px;
  line-height: 1;
}

/* ── TOAST MESSAGE ──────────────────────────────────────── */
#ohci-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ohci-navy);
  color: var(--ohci-gold-lt);
  font-family: var(--ohci-font-sub);
  font-size: 14px;
  letter-spacing: .05em;
  padding: 12px 28px;
  border-radius: 40px;
  border: 1px solid var(--ohci-gold-dk);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 9999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, transform .35s;
}
#ohci-toast.ohci-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────────────────
   SHORTCODE PAGE STYLES  [ohci_attendees]
───────────────────────────────────────────────────────── */
.ohci-page-wrap {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  font-family: var(--ohci-font-body);
}

.ohci-page-header {
  text-align: center;
  background: linear-gradient(135deg, var(--ohci-navy) 0%, #1c2e47 55%, var(--ohci-crimson) 100%);
  border-radius: 18px;
  padding: 40px 24px 32px;
  margin-bottom: 36px;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
  position: relative;
  overflow: hidden;
}

.ohci-page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9922a' fill-opacity='0.07'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.ohci-page-cross-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.ohci-page-cross-wrap svg {
  width: 36px;
  height: 50px;
  color: var(--ohci-gold);
  filter: drop-shadow(0 2px 10px rgba(201,146,42,.5));
}

.ohci-page-title {
  font-family: var(--ohci-font-head);
  font-size: clamp(20px, 4vw, 32px);
  color: var(--ohci-gold-lt);
  margin: 0 0 8px;
  letter-spacing: .03em;
}

.ohci-page-sub {
  font-family: var(--ohci-font-sub);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(240,200,106,.65);
  margin: 0;
}

.ohci-page-count {
  text-align: center;
  font-family: var(--ohci-font-sub);
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ohci-muted);
  margin-bottom: 28px;
}

.ohci-page-count span {
  font-size: 28px;
  font-weight: 700;
  color: var(--ohci-crimson);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.ohci-page-empty {
  text-align: center;
  font-style: italic;
  color: var(--ohci-muted);
  font-size: 16px;
  padding: 30px;
}

/* ── Attendee grid ──────────────────────────────────────── */
.ohci-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 24px;
}

.ohci-page-card {
  background: var(--ohci-cream);
  border-radius: 14px;
  padding: 24px 16px 18px;
  text-align: center;
  border: 1px solid var(--ohci-cream-dk);
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transition: transform .22s, box-shadow .22s;
}

.ohci-page-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,0,0,.14);
}

.ohci-page-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.ohci-page-avatar-wrap img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ohci-gold);
  box-shadow: 0 4px 16px rgba(201,146,42,.25);
}

.ohci-page-check {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  background: var(--ohci-crimson);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ohci-cream);
}

.ohci-page-name {
  font-family: var(--ohci-font-sub);
  font-size: 14px;
  font-weight: 600;
  color: var(--ohci-navy);
  margin: 0 0 4px;
  word-break: break-word;
}

.ohci-page-date {
  font-family: var(--ohci-font-body);
  font-size: 12px;
  color: var(--ohci-muted);
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 680px) {
  #ohci-body { flex-direction: column; }

  #ohci-attendees-panel {
    width: 100%;
    max-height: 150px;
    border-right: none;
    border-bottom: 2px solid var(--ohci-gold-dk);
  }

  #ohci-attendees-list {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    padding: 8px 12px;
  }

  .ohci-attendee {
    flex-direction: column;
    gap: 4px;
    padding: 6px 8px;
    min-width: 70px;
    text-align: center;
  }

  #ohci-invitation { padding: 20px 18px 22px; }
  .ohci-buttons { flex-direction: column; }
  .ohci-btn { min-width: unset; }
}
