/* ==========================================================
   Church Terminal v2 — WordPress Plugin Stylesheet
   All selectors scoped with .ct- prefix
   ========================================================== */

.ct-wrap {
  --ct-gold:        #b8973a;
  --ct-gold-light:  #d4af5a;
  --ct-gold-dark:   #8a6e22;
  --ct-cream:       #f5ede0;
  --ct-cream-dark:  #e8d9c0;
  --ct-brown:       #3d2b1f;
  --ct-brown-light: #5c3d2e;
  --ct-parchment:   #f0e6d0;

  position: relative;
  font-family: 'Cormorant Garamond', serif;
  background: var(--ct-parchment);
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Parchment texture */
.ct-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Gold border lines ──────────────────────────────────────── */
.ct-wrap::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--ct-gold-dark), var(--ct-gold-light), var(--ct-gold-dark));
  z-index: 3;
}

.ct-bottom-border {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--ct-gold-dark), var(--ct-gold-light), var(--ct-gold-dark));
  z-index: 3;
}

/* ── Corner ornaments ───────────────────────────────────────── */
.ct-corner {
  position: absolute;
  width: 72px;
  height: 72px;
  z-index: 2;
}
.ct-corner svg    { width: 100%; height: 100%; }
.ct-corner-tl     { top: 8px;    left: 8px; }
.ct-corner-tr     { top: 8px;    right: 8px;    transform: scaleX(-1); }
.ct-corner-bl     { bottom: 8px; left: 8px;     transform: scaleY(-1); }
.ct-corner-br     { bottom: 8px; right: 8px;    transform: scale(-1); }

/* ── Page & content ─────────────────────────────────────────── */
.ct-page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 24px;
  animation: ct-fadeIn 1s ease;
}

@keyframes ct-fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ct-content {
  width: 100%;
  max-width: 520px;
}

/* ── Header ─────────────────────────────────────────────────── */
.ct-header {
  text-align: center;
  padding-bottom: 28px;
}

.ct-cross-icon {
  width: 56px;
  height: 66px;
  margin: 0 auto 16px;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(184,151,58,0.35));
}

.ct-church-name {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--ct-gold-dark);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.ct-church-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--ct-brown-light);
  opacity: 0.7;
}

/* ── Divider ────────────────────────────────────────────────── */
.ct-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.ct-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--ct-gold), transparent);
  opacity: 0.55;
}
.ct-divider-diamond {
  width: 6px; height: 6px;
  background: var(--ct-gold);
  transform: rotate(45deg);
  opacity: 0.8;
  flex-shrink: 0;
}

/* ── Menu ───────────────────────────────────────────────────── */
.ct-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ct-menu-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #fffaf2 0%, var(--ct-cream-dark) 100%);
  border: 1.5px solid rgba(184,151,58,0.35);
  border-radius: 12px;
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  width: 100%;
  box-shadow: 0 2px 10px rgba(61,43,31,0.07), inset 0 1px 0 rgba(255,255,255,0.8);
  position: relative;
  overflow: hidden;
}
.ct-menu-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--ct-gold-light), var(--ct-gold-dark));
  opacity: 0;
  transition: opacity 0.25s;
}
.ct-menu-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,175,90,0.07), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.ct-menu-btn:hover {
  transform: translateX(5px);
  border-color: var(--ct-gold);
  box-shadow: 0 4px 24px rgba(184,151,58,0.18), inset 0 1px 0 rgba(255,255,255,0.9);
}
.ct-menu-btn:hover::before { opacity: 1; }
.ct-menu-btn:hover::after  { opacity: 1; }
.ct-menu-btn:active        { transform: translateX(2px) scale(0.99); }

.ct-btn-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ct-cream) 0%, var(--ct-cream-dark) 100%);
  border: 1px solid rgba(184,151,58,0.28);
  border-radius: 10px;
  color: var(--ct-gold-dark);
  position: relative;
  z-index: 1;
}
.ct-btn-icon svg { width: 28px; height: 28px; }

.ct-btn-text { position: relative; z-index: 1; flex: 1; }

.ct-btn-title {
  font-family: 'Cinzel', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ct-brown);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.ct-btn-desc {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  font-style: italic;
  color: var(--ct-brown-light);
  opacity: 0.65;
  margin-top: 3px;
}

.ct-btn-arrow {
  margin-left: auto;
  color: var(--ct-gold);
  opacity: 0.35;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.ct-menu-btn:hover .ct-btn-arrow { opacity: 0.9; transform: translateX(4px); }

/* ── Footer ─────────────────────────────────────────────────── */
.ct-footer { text-align: center; }

.ct-footer-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--ct-brown-light);
  opacity: 0.75;
  letter-spacing: 0.08em;
}

/* ── Modal overlay ──────────────────────────────────────────── */
.ct-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,6,2,0.82);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(3px);
  padding: 16px;
}
.ct-modal-overlay.ct-active {
  opacity: 1;
  pointer-events: all;
}

.ct-modal {
  background: var(--ct-parchment, #f0e6d0);
  border-radius: 0;
  padding: 40px 36px;
  width: 100%;
  max-width: 460px;
  border: 1.5px solid rgba(184,151,58,0.4);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  position: relative;
  transform: translateY(18px);
  transition: transform 0.3s;
  overflow: hidden;
}
.ct-modal-overlay.ct-active .ct-modal { transform: translateY(0); }

.ct-modal::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, #8a6e22, #d4af5a, #8a6e22);
}

.ct-modal-title {
  font-family: 'Cinzel', serif;
  font-size: 21px;
  color: #3d2b1f;
  text-align: center;
  margin-bottom: 6px;
  position: relative;
}
.ct-modal-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: #5c3d2e;
  text-align: center;
  opacity: 0.6;
  margin-bottom: 24px;
  position: relative;
}

.ct-modal-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  position: relative;
}
.ct-modal-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #b8973a, transparent);
  opacity: 0.5;
}
.ct-modal-divider-dot {
  width: 5px; height: 5px;
  background: #b8973a;
  transform: rotate(45deg);
}

.ct-modal-body { position: relative; }

.ct-service-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.ct-service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(184,151,58,0.2);
  border-radius: 0;
  padding: 13px 18px;
  transition: all 0.2s;
}
.ct-service-item:hover { background: rgba(255,255,255,0.9); border-color: #b8973a; }

.ct-service-name { font-family: 'Cormorant Garamond', serif; font-size: 15px; color: #3d2b1f; }
.ct-service-price { font-family: 'Cinzel', serif; font-size: 14px; color: #8a6e22; font-weight: 600; }

.ct-donation-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.ct-amount-btn {
  background: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(184,151,58,0.25);
  border-radius: 0;
  padding: 15px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: #3d2b1f;
}
.ct-amount-btn:hover,
.ct-amount-btn.ct-selected {
  background: #b8973a;
  color: white;
  border-color: #8a6e22;
}

.ct-donation-note {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: #5c3d2e;
  opacity: 0.6;
  text-align: center;
  font-style: italic;
}

.ct-history-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: #3d2b1f;
  line-height: 1.78;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 8px;
}
.ct-history-text::-webkit-scrollbar { width: 4px; }
.ct-history-text::-webkit-scrollbar-thumb { background: #b8973a; }

.ct-close-btn {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: #5c3d2e;
  opacity: 0.35;
  font-size: 22px;
  transition: opacity 0.2s;
  z-index: 2;
  line-height: 1;
}
.ct-close-btn:hover { opacity: 0.9; }

.ct-action-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #d4af5a, #8a6e22);
  color: white;
  border: none;
  border-radius: 0;
  font-family: 'Cinzel', serif;
  font-size: 15px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 18px rgba(184,151,58,0.3);
  margin-top: 18px;
}
.ct-action-btn:hover { filter: brightness(1.08); box-shadow: 0 6px 26px rgba(184,151,58,0.4); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .ct-page { padding: 36px 12px; }
  .ct-btn-title { font-size: 15px; }
  .ct-modal { padding: 28px 20px; }
  .ct-donation-amounts { grid-template-columns: repeat(2, 1fr); }
}
