:root {
  --brown-dark:   #2c1a0f;
  --brown-medium: #5a3c22;
  --brown-light:  #8b5e34;
  --text-light:   #f4f1ea;
}

/* Scoped to the video portal only. An unscoped `*` reset here leaks site-wide
   via the Propshaft `:app` bundle and, being unlayered, overrides every
   Tailwind margin/padding utility (cascade layers lose to unlayered CSS). */
.vp-body, .vp-body * { box-sizing: border-box; margin: 0; padding: 0; }

.vp-body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  background-color: var(--brown-dark);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(255, 220, 130, 0.8) 0%, rgba(214, 137, 69, 0) 50%),
    linear-gradient(to bottom, #d68945 0%, #8b5e34 35%, #4a3018 70%, #1a0f08 100%);
  background-attachment: fixed;
}

/* ===== Header ===== */
.vp-header {
  text-align: center;
  padding-top: 40px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.vp-hebrew {
  font-size: 14px;
  color: #111;
  margin-bottom: 5px;
  text-shadow: none;
  font-weight: bold;
}

.vp-wood-sign {
  background: linear-gradient(to bottom, #7d5a3c, #4a3018);
  display: inline-block;
  padding: 10px 30px;
  border-radius: 8px;
  border: 2px solid #362211;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4), inset 0 0 5px rgba(255,255,255,0.2);
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  margin-bottom: 20px;
  position: relative;
}
.vp-wood-sign::before,
.vp-wood-sign::after {
  content: '';
  position: absolute;
  top: -30px;
  width: 4px;
  height: 30px;
  background: #888;
  border: 1px solid #444;
}
.vp-wood-sign::before { left: 20%; }
.vp-wood-sign::after  { right: 20%; }

.vp-title-main {
  font-family: 'Berkshire Swash', serif;
  font-size: 4rem;
  color: #ffecd2;
  text-shadow: 3px 3px 6px rgba(0,0,0,0.8), -1px -1px 0 #8b5e34;
  margin: 0;
  letter-spacing: 2px;
}

.vp-subtitle {
  font-size: 1.2rem;
  color: #ffecd2;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  margin-top: 5px;
  font-weight: 700;
}

/* ===== Main ===== */
.vp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Flashes appear above the portal container */
.vp-flash {
  max-width: 450px;
  width: 100%;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid;
}
.vp-flash--notice {
  background: rgba(58, 42, 29, 0.85);
  color: #ffecd2;
  border-color: #7a5435;
}
.vp-flash--alert {
  background: rgba(89, 30, 20, 0.85);
  color: #ffd8c8;
  border-color: #b04020;
}

.vp-portal {
  background: linear-gradient(to bottom, rgba(58, 42, 29, 0.85), rgba(26, 15, 8, 0.95));
  border: 2px solid #7a5435;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7), inset 0 0 15px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  max-width: 450px;
  width: 100%;
  position: relative;
  z-index: 10;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.vp-action-section {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 20px;
}

/* Status panels (above buttons) */
.vp-panel {
  text-align: center;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
}
.vp-panel p { margin-bottom: 6px; }
.vp-panel p:last-child { margin-bottom: 0; }
.vp-panel strong { color: #ffecd2; }
.vp-panel--info  { background: rgba(78, 53, 30, 0.6);  color: #f4e7d2; border-color: #7a5435; }
.vp-panel--warn  { background: rgba(120, 75, 25, 0.55); color: #ffe6b8; border-color: #c28c5e; }
.vp-panel--error { background: rgba(89, 30, 20, 0.7);  color: #ffd8c8; border-color: #b04020; }

/* Buttons */
.vp-btn {
  display: block;
  width: 100%;
  background: linear-gradient(to bottom, #a36b3f, #6b4424);
  color: #fff;
  border: 1px solid #c28c5e;
  padding: 20px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  font-family: inherit;
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
  transition: transform 0.1s, box-shadow 0.1s, filter 0.2s;
}
.vp-btn:hover {
  background: linear-gradient(to bottom, #b57a4a, #7a4f2b);
  filter: brightness(1.1);
}
.vp-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.vp-btn--small {
  padding: 15px;
  font-size: 14px;
  background: linear-gradient(to bottom, #5a3c22, #3a2514);
  border-color: #7a5435;
}
.vp-btn--small:hover {
  background: linear-gradient(to bottom, #6b4d33, #4a3018);
}

.vp-meta {
  text-align: center;
  color: #b59b84;
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.5;
}

.vp-file-meta {
  text-align: center;
  font-size: 12px;
  color: #c9b59a;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 600;
}

.vp-btn:disabled {
  cursor: not-allowed;
  filter: brightness(0.85) saturate(0.7);
}

/* button_to wraps the button in a <form> — strip its default margin */
form.button_to { margin: 0; }

/* Embedded Stripe Checkout modal — a quiet concert-program card over the portal. */
.vp-checkout-modal {
  width: min(100% - 32px, 640px);
  max-height: min(88vh, 820px);
  overflow-y: auto;
  border: 1px solid rgba(121, 79, 42, 0.22);
  border-radius: 18px;
  padding: 0;
  color: #271b14;
  background: #fcfaf7;
  box-shadow: 0 28px 100px rgba(12, 6, 2, 0.62), 0 4px 18px rgba(0, 0, 0, 0.22);
  scrollbar-color: #b98950 transparent;
  animation: vp-checkout-enter 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.vp-checkout-modal::backdrop {
  background: rgba(17, 10, 5, 0.72);
  backdrop-filter: blur(7px) saturate(0.8);
}
.vp-checkout-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 16px 22px;
  color: #fff9ed;
  background:
    linear-gradient(90deg, rgba(255, 218, 159, 0.18), transparent 38%),
    linear-gradient(125deg, #4c2d1b, #7a4729 55%, #3a2114);
  border-bottom: 4px solid #d2a15c;
}
.vp-checkout-modal__identity { display: flex; align-items: center; gap: 12px; }
.vp-checkout-modal__monogram {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 236, 201, 0.7);
  border-radius: 50%;
  color: #fff4df;
  font-family: 'Berkshire Swash', serif;
  font-size: 17px;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 3px rgba(58, 33, 20, 0.28);
}
.vp-checkout-modal__eyebrow {
  margin: 0 0 2px;
  color: #f4d6a8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.vp-checkout-modal__header h2 {
  margin: 0;
  font-family: 'Berkshire Swash', serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.vp-checkout-modal__close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  appearance: none;
  border: 1px solid rgba(255, 236, 201, 0.4);
  border-radius: 50%;
  background: rgba(31, 16, 9, 0.2);
  color: #fff9ed;
  font-family: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}
.vp-checkout-modal__close:hover { background: rgba(31, 16, 9, 0.45); transform: rotate(90deg); }
.vp-checkout-modal__close:focus-visible {
  outline: 3px solid #ffe2a8;
  outline-offset: 3px;
}
.vp-checkout-modal__body { padding: 18px 22px 24px; }
.vp-checkout-modal__assurance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 14px;
  color: #79675a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.vp-checkout-modal__assurance span { color: #a76a32; font-size: 18px; line-height: 0; }
.vp-checkout-modal__loading {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  color: #5c4738;
  font-size: 14px;
  font-weight: 600;
}
.vp-checkout-modal__spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid #e1cda9;
  border-top-color: #8e572a;
  border-radius: 50%;
  animation: vp-checkout-spin 700ms linear infinite;
}
.vp-checkout-modal[data-state="error"] .vp-checkout-modal__loading {
  min-height: 180px;
  padding: 20px;
  border: 1px solid #efd5ca;
  border-radius: 10px;
  color: #8b3d2b;
  background: #fff8f5;
  text-align: center;
}
.vp-checkout-modal[data-state="error"] .vp-checkout-modal__spinner { display: none; }
.vp-checkout-modal__stripe:empty { display: none; }

@keyframes vp-checkout-enter {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes vp-checkout-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .vp-checkout-modal, .vp-checkout-modal__spinner { animation: none; }
  .vp-checkout-modal__close { transition: none; }
}
.vp-checkout-modal__loading { padding: 24px; margin: 0; text-align: center; color: #4e351e; }

/* ===== Footer ===== */
.vp-footer {
  background: rgba(15, 8, 4, 0.9);
  text-align: center;
  padding: 20px 15px;
  font-size: 14px;
  border-top: 1px solid #3a2514;
  z-index: 20;
}
.vp-footer a {
  color: #b59b84;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s;
  font-weight: bold;
}
.vp-footer a:hover { color: #fff; }

@media (max-width: 768px) {
  .vp-title-main { font-size: 3rem; }
  .vp-portal { padding: 30px 20px; }
  .vp-checkout-modal { width: min(100% - 20px, 640px); max-height: 92vh; border-radius: 14px; }
  .vp-checkout-modal__header { min-height: 76px; padding: 13px 16px; }
  .vp-checkout-modal__header h2 { font-size: 21px; }
  .vp-checkout-modal__body { padding: 14px 12px 18px; }
  .vp-checkout-modal__loading { min-height: 220px; }
}
