:root {
  --color-forest: #1E4035;
  --color-studio: #2A5446;
  --color-deep: #163028;
  --color-cream: #F5EED8;
  --color-sand: #D4C9A8;

  --saving-disabled-opacity: 0.7;
  --toast-success-bg: #E6F4EA;
  --toast-success-border: #22C55E;
  --toast-success-text: var(--color-forest);
  --toast-error-bg: #FDEAEA;
  --toast-error-border: #EF4444;
  --toast-error-text: #991B1B;
}

/* Navbar on forest green background */
.navbar .nav-link,
.navbar .navbar-nav .nav-link {
  color: var(--color-cream) !important;
}
.navbar .dropdown-menu a.dropdown-item {
  color: #1E4035;
}
.navbar .dropdown-menu a.dropdown-item:hover {
  background-color: #F5EED8;
  color: #1E4035;
}
.navbar-toggler {
  border-color: var(--color-cream) !important;
  color: var(--color-cream) !important;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28245%2C238%2C216%2C1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.events-table {
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.events-table thead th {
  border-bottom: 0;
}

.events-table tbody tr {
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  box-shadow: inset 4px 0 0 transparent;
}

.events-table tbody tr td {
  background-color: inherit;
  vertical-align: middle;
}

.events-table tbody tr td:first-child {
  border-top-left-radius: 0.6rem;
  border-bottom-left-radius: 0.6rem;
}

.events-table tbody tr td:last-child {
  border-top-right-radius: 0.6rem;
  border-bottom-right-radius: 0.6rem;
}

.events-table tbody tr:hover {
  transform: translateY(-1px);
  box-shadow: inset 4px 0 0 transparent, 0 6px 14px rgba(15, 23, 42, 0.08);
  filter: brightness(0.99);
}

.event-planned {
  background-color: #FFF9DB;
  box-shadow: inset 4px 0 0 #FACC15;
}

.event-active {
  background-color: #E6F4EA;
  box-shadow: inset 4px 0 0 #22C55E;
}

.event-closed {
  background-color: #FDEAEA;
  box-shadow: inset 4px 0 0 #EF4444;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.status-badge-planned {
  background: #FEF3C7;
  color: #92400E;
}

.status-badge-active {
  background: #D1FAE5;
  color: #065F46;
}

.status-badge-closed {
  background: #FECACA;
  color: #7F1D1D;
}

.marketing-shell {
  padding: 1rem 0;
}

.marketing-hero {
  padding: 4rem 0 2rem;
}

.marketing-hero-home {
  padding: 4.5rem 0 3.5rem;
}

.marketing-hero-copy,
.pricing-final-copy {
  max-width: 48rem;
}

.marketing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #e8f1ff;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.marketing-feature-card,
.pricing-highlight-card,
.final-cta-card,
.subscription-summary-card,
.pricing-plan-card {
  border-radius: 1rem;
}

.marketing-feature-card,
.pricing-highlight-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.hero-preview-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.hero-metric-tile {
  padding: 1rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  height: 100%;
}

.hero-metric-label {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.hero-metric-value {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
}

.preview-stack {
  display: grid;
  gap: 0.85rem;
}

.preview-mini-card {
  padding: 1rem 1.05rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e2e8f0;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0;
  color: #334155;
  font-size: 0.95rem;
}

.preview-row + .preview-row {
  border-top: 1px solid #eef2f7;
}

.value-point {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid #e2e8f0;
  height: 100%;
  color: #0f172a;
  font-weight: 500;
}

.value-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.95rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: #e8f1ff;
  color: #1d4ed8;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.feature-list-item {
  position: relative;
  padding-left: 1.2rem;
  margin-top: 0.75rem;
  color: #334155;
}

.feature-list-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: #2563eb;
}

.pricing-hero {
  position: relative;
}

.pricing-highlight-card {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 45%),
    linear-gradient(160deg, #ffffff 0%, #eff6ff 100%);
}

.pricing-plan-card {
  position: relative;
  overflow: hidden;
}

.pricing-plan-card-featured {
  border: 1px solid rgba(37, 99, 235, 0.15) !important;
  box-shadow: 0 1rem 2.5rem rgba(37, 99, 235, 0.12) !important;
}

.pricing-plan-card-featured::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 0.35rem;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.pricing-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.pricing-price {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1;
}

.pricing-check-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.75rem;
}

.pricing-check-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #2563eb;
  font-weight: 700;
}

.pricing-microcopy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
  color: #475569;
  font-size: 0.95rem;
}

.feature-pill {
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  color: #0f172a;
}

.faq-list {
  display: grid;
  gap: 1.5rem;
}

.subscription-alert {
  border-radius: 0.9rem;
  border-width: 1px;
}

.subscription-summary-card {
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.subscription-metric {
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  height: 100%;
}

.subscription-metric-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #64748b;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.subscription-progress {
  height: 0.8rem;
  border-radius: 999px;
  background: #e2e8f0;
}

@media (max-width: 767.98px) {
  .marketing-hero {
    padding-top: 2.5rem;
  }

  .marketing-hero-home {
    padding-top: 2.75rem;
    padding-bottom: 2.25rem;
  }

  .pricing-price {
    font-size: 2.25rem;
  }

  .hero-preview-card {
    padding: 1.1rem;
  }

  .hero-metric-value {
    font-size: 1.55rem;
  }
}

/* Shared rendered-document area for privacy modals and the signup wizard.
   Used by:
     - Views/Shared/Components/PrivacyAcknowledgment/Modal.cshtml (blocking modal)
     - Pages/Admin/Studios/Settings.cshtml (View current document modal)
     - Pages/Signup/Index.cshtml (Step 3 inline document)
   Tightens typography so the rendered markdown does not visually compete
   with the surrounding modal chrome / wizard UI. */
.privacy-document-rendered {
  background-color: #fbf9ed;
  border: 1px solid #d0d5dd;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  max-height: 50vh;
  overflow-y: auto;
  color: #333;
  line-height: 1.5;
  font-size: 0.95rem;
}
.privacy-document-rendered h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  color: var(--color-forest);
}
.privacy-document-rendered h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 1rem 0 0.5rem;
  color: var(--color-forest);
}
.privacy-document-rendered h3 {
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0.85rem 0 0.4rem;
  color: var(--color-forest);
}
.privacy-document-rendered p,
.privacy-document-rendered li {
  color: #555;
}
.privacy-document-rendered ul,
.privacy-document-rendered ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.privacy-document-rendered :first-child {
  margin-top: 0;
}
.privacy-document-rendered :last-child {
  margin-bottom: 0;
}

a.row-clickable {
  display: block;
  text-decoration: none;
  color: inherit;
}

.row-clickable {
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.row-clickable[data-href] {
  cursor: pointer;
}

.row-clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  filter: brightness(0.99);
}

.row-clickable:focus-visible {
  outline: 2px solid #1E4035;
  outline-offset: 2px;
}

/* Save-button spinner pattern (Issue #177 PR-1 foundation).
   Opt-in: add class="saving-button" to a form submit button.
   Site-wide JS helper (wwwroot/js/site.js) transitions the button to the
   .is-saving state during the POST round-trip; the state class layers on
   top of whatever existing styling the button already has (btn-primary,
   btn-save, qa-btn-primary, btn-create, etc.). The fallback color rule
   covers bare <button> elements (iOS Safari bare-button cascade gap). */
.saving-button {
  color: #212529;
  position: relative;
}
.saving-button.is-saving {
  cursor: progress;
  opacity: var(--saving-disabled-opacity);
  pointer-events: none;
}
.saving-button.is-saving::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.45em;
  vertical-align: -0.15em;
  border: 0.15em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sef-spinner-rotate 0.7s linear infinite;
}
@keyframes sef-spinner-rotate {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .saving-button.is-saving::before {
    content: "…";
    display: inline-block;
    width: auto;
    height: auto;
    margin-right: 0.35em;
    border: none;
    animation: none;
    vertical-align: baseline;
  }
}

/* Toast banner pattern (Issue #177 PR-1 foundation).
   Layouts render a #toast-host div with data-message + data-kind attributes
   sourced from TempData["ToastSuccess"] / TempData["ToastError"]. The JS
   toast-mount IIFE inserts a .toast-banner child on DOMContentLoaded and
   auto-dismisses after 2.5s. ARIA role/aria-live are on the host. */
.toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast-banner {
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(-0.35rem);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto;
}
.toast-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast-banner--success {
  background: var(--toast-success-bg);
  border-color: var(--toast-success-border);
  color: var(--toast-success-text);
}
.toast-banner--error {
  background: var(--toast-error-bg);
  border-color: var(--toast-error-border);
  color: var(--toast-error-text);
}
@media (prefers-reduced-motion: reduce) {
  .toast-banner {
    transition: opacity 0ms;
    transform: none;
  }
  .toast-banner.is-visible {
    transform: none;
  }
}
