/* ==========================================================================
   Fold Unified Design System (fold-design-system.css)
   Benchmark: DoorDash · Airbnb · Uber Eats
   Single Palette · Unified Radii (12/18/24/999px) · Animated SVGs · 60fps Motion
   ========================================================================== */

:root {
  /* Core Surfaces & Canvas */
  --fd-canvas: #F8FAFC;
  --fd-surface: #FFFFFF;
  --fd-subtle: #F1F5F9;
  --fd-subtle-hover: #E2E8F0;

  /* Borders & Hairlines */
  --fd-border: #E2E8F0;
  --fd-border-strong: #CBD5E1;

  /* Ink & Typography */
  --fd-ink: #0E1726;
  --fd-body: #334155;
  --fd-muted: #64748B;
  --fd-faint: #94A3B8;

  /* Brand Accent — Signature Fold Teal */
  --fd-teal: #0F6F69;
  --fd-teal-hover: #0B5752;
  --fd-teal-active: #084440;
  --fd-teal-soft: #EEF8F6;
  --fd-teal-soft-2: #CCFBF1;
  --fd-teal-border: rgba(15, 111, 105, 0.22);
  --fd-ring: rgba(15, 111, 105, 0.16);

  /* Semantic Status Palette */
  --fd-emerald: #047857;
  --fd-emerald-bg: #ECFDF5;
  --fd-emerald-border: #A7F3D0;

  --fd-amber: #B45309;
  --fd-amber-bg: #FFFBEB;
  --fd-amber-border: #FDE68A;

  --fd-blue: #1D4ED8;
  --fd-blue-bg: #EFF6FF;
  --fd-blue-border: #BFDBFE;

  --fd-rose: #B91C1C;
  --fd-rose-solid: #DC2626;
  --fd-rose-bg: #FEF2F2;
  --fd-rose-border: #FECACA;

  /* Unified Geometry Scale */
  --fd-radius-hero: 24px;
  --fd-radius-card: 18px;
  --fd-radius-control: 12px;
  --fd-radius-sm: 8px;
  --fd-radius-pill: 999px;

  /* Elevation */
  --fd-shadow-xs: 0 1px 2px rgba(14, 23, 38, 0.04);
  --fd-shadow-sm: 0 4px 14px -2px rgba(14, 23, 38, 0.06), 0 2px 6px -1px rgba(14, 23, 38, 0.03);
  --fd-shadow-md: 0 12px 32px -6px rgba(14, 23, 38, 0.08), 0 4px 12px -2px rgba(14, 23, 38, 0.04);
  --fd-shadow-lg: 0 22px 54px -10px rgba(14, 23, 38, 0.13), 0 6px 18px -4px rgba(14, 23, 38, 0.05);
  --fd-shadow-teal: 0 8px 22px -4px rgba(15, 111, 105, 0.30);

  /* Typography Stacks */
  --fd-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fd-font-ops: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Motion Curves */
  --fd-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --fd-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Readability & Numeric Alignment */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  line-height: 1.5;
  text-align: start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fd-balance {
  text-wrap: balance;
}

.fd-pretty {
  text-wrap: pretty;
  max-width: 64ch;
}

.fd-num,
.tabular-nums,
.order-price,
.service-amount,
.checkout-amount,
.order-total,
.stat-card strong,
.metric strong {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Unified Section Headers (1 Heading + 1 Concise Subline Max)
   ========================================================================== */

.fd-eyebrow {
  display: none !important;
}

.fd-section-head {
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.fd-section-head--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fd-h1 {
  margin: 0;
  color: var(--fd-ink);
  font-size: clamp(1.95rem, 1.35rem + 2.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.fd-h2 {
  margin: 0;
  color: var(--fd-ink);
  font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.15rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.fd-h3 {
  margin: 0;
  color: var(--fd-ink);
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.28rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.fd-lead {
  margin: 0.65rem 0 0;
  color: var(--fd-muted);
  font-size: clamp(0.96rem, 0.92rem + 0.25vw, 1.1rem);
  font-weight: 500;
  line-height: 1.55;
  max-width: 58ch;
  text-wrap: pretty;
}

/* ==========================================================================
   Unified Cards, Surfaces & Controls
   ========================================================================== */

.fd-card {
  background: var(--fd-surface);
  border: 1px solid var(--fd-border);
  border-radius: var(--fd-radius-card);
  box-shadow: var(--fd-shadow-sm);
  padding: clamp(1.15rem, 2vw, 1.65rem);
  transition: transform 0.2s var(--fd-ease-out), box-shadow 0.2s var(--fd-ease-out), border-color 0.2s ease;
}

.fd-card--interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--fd-shadow-md);
  border-color: var(--fd-border-strong);
}

.fd-hero-surface {
  background: var(--fd-surface);
  border: 1px solid var(--fd-border);
  border-radius: var(--fd-radius-hero);
  box-shadow: var(--fd-shadow-md);
}

/* Unified Buttons */
.fd-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--fd-radius-control);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s var(--fd-ease-out),
    box-shadow 0.16s ease;
}

.fd-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.fd-btn:disabled,
.fd-btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.fd-btn--sm {
  min-height: 38px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.fd-btn--lg {
  min-height: 54px;
  padding: 0.85rem 1.65rem;
  font-size: 1.02rem;
}

.fd-btn--pill {
  border-radius: var(--fd-radius-pill);
}

.fd-btn--full {
  width: 100%;
}

.fd-btn--primary {
  background: var(--fd-teal);
  border-color: var(--fd-teal);
  color: #FFFFFF !important;
  box-shadow: var(--fd-shadow-teal);
}

.fd-btn--primary:hover:not(:disabled) {
  background: var(--fd-teal-hover);
  border-color: var(--fd-teal-hover);
  color: #FFFFFF !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -4px rgba(15, 111, 105, 0.38);
}

.fd-btn--dark {
  background: var(--fd-ink);
  border-color: var(--fd-ink);
  color: #FFFFFF !important;
  box-shadow: 0 8px 20px -4px rgba(14, 23, 38, 0.22);
}

.fd-btn--dark:hover:not(:disabled) {
  background: #1E293B;
  border-color: #1E293B;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

.fd-btn--secondary {
  background: var(--fd-surface);
  border-color: var(--fd-border-strong);
  color: var(--fd-ink) !important;
  box-shadow: var(--fd-shadow-xs);
}

.fd-btn--secondary:hover:not(:disabled) {
  background: var(--fd-subtle);
  border-color: #94A3B8;
  color: var(--fd-ink) !important;
}

.fd-btn--soft {
  background: var(--fd-teal-soft);
  border-color: var(--fd-teal-border);
  color: var(--fd-teal) !important;
}

.fd-btn--soft:hover:not(:disabled) {
  background: #E0F5F1;
  border-color: rgba(15, 111, 105, 0.36);
  color: var(--fd-teal-hover) !important;
}

.fd-btn--emerald {
  background: #059669;
  border-color: #059669;
  color: #FFFFFF !important;
  box-shadow: 0 8px 20px -4px rgba(5, 150, 105, 0.28);
}

.fd-btn--emerald:hover:not(:disabled) {
  background: #047857;
  border-color: #047857;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}

.fd-btn--danger {
  background: var(--fd-rose-solid);
  border-color: var(--fd-rose-solid);
  color: #FFFFFF !important;
}

.fd-btn--danger:hover:not(:disabled) {
  background: var(--fd-rose);
  border-color: var(--fd-rose);
  color: #FFFFFF !important;
}

.fd-btn--danger-outline {
  background: var(--fd-surface);
  border-color: var(--fd-rose-border);
  color: var(--fd-rose) !important;
}

.fd-btn--danger-outline:hover:not(:disabled) {
  background: var(--fd-rose-bg);
  border-color: #FCA5A5;
  color: #991B1B !important;
}

/* Unified Form Inputs */
.fd-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fd-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--fd-ink);
  letter-spacing: -0.01em;
}

.fd-input,
.fd-select,
.fd-textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.72rem 0.95rem;
  border-radius: var(--fd-radius-control);
  border: 1.5px solid var(--fd-border-strong);
  background: var(--fd-surface);
  color: var(--fd-ink);
  font-family: inherit;
  font-size: 1rem; /* >=16px prevents iOS Safari auto-zoom */
  font-weight: 500;
  line-height: 1.4;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.fd-input::placeholder,
.fd-textarea::placeholder {
  color: var(--fd-faint);
  font-weight: 400;
}

.fd-input:focus,
.fd-select:focus,
.fd-textarea:focus {
  outline: none;
  border-color: var(--fd-teal);
  box-shadow: 0 0 0 4px var(--fd-ring);
}

.fd-input[readonly],
.fd-input:disabled {
  background: var(--fd-subtle);
  color: var(--fd-muted);
  cursor: not-allowed;
}

/* Semantic Status Badges */
.fd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--fd-radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid transparent;
}

.fd-badge--teal {
  background: var(--fd-teal-soft);
  color: var(--fd-teal);
  border-color: var(--fd-teal-border);
}

.fd-badge--emerald {
  background: var(--fd-emerald-bg);
  color: var(--fd-emerald);
  border-color: var(--fd-emerald-border);
}

.fd-badge--amber {
  background: var(--fd-amber-bg);
  color: var(--fd-amber);
  border-color: var(--fd-amber-border);
}

.fd-badge--blue {
  background: var(--fd-blue-bg);
  color: var(--fd-blue);
  border-color: var(--fd-blue-border);
}

.fd-badge--rose {
  background: var(--fd-rose-bg);
  color: var(--fd-rose);
  border-color: var(--fd-rose-border);
}

.fd-badge--slate {
  background: var(--fd-subtle);
  color: var(--fd-body);
  border-color: var(--fd-border);
}

/* Flash & Inline Feedback Alerts */
.fd-alert-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.fd-alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--fd-radius-control);
  border: 1px solid var(--fd-border);
  background: var(--fd-surface);
  color: var(--fd-ink);
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: var(--fd-shadow-xs);
}

.fd-alert__body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.fd-alert--success {
  background: var(--fd-emerald-bg);
  border-color: var(--fd-emerald-border);
  color: var(--fd-emerald);
}

.fd-alert--error,
.fd-alert--danger {
  background: var(--fd-rose-bg);
  border-color: var(--fd-rose-border);
  color: var(--fd-rose);
}

.fd-alert--warning {
  background: var(--fd-amber-bg);
  border-color: var(--fd-amber-border);
  color: var(--fd-amber);
}

.fd-alert--info {
  background: var(--fd-teal-soft);
  border-color: var(--fd-teal-border);
  color: var(--fd-teal);
}

.fd-flash-dismiss {
  appearance: none;
  border: 0;
  background: transparent;
  color: currentColor;
  opacity: 0.7;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 1.1rem;
  line-height: 1;
}

.fd-flash-dismiss:hover {
  opacity: 1;
  background: rgba(14, 23, 38, 0.06);
}

/* ==========================================================================
   Enclosed Conversion Header (Checkout, Login, Register, Confirmation)
   ========================================================================== */

.fold-enclosed-header {
  position: sticky;
  top: 0;
  z-index: 1300;
  height: 68px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--fd-border);
}

.fold-enclosed-header__inner {
  max-width: 1160px;
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.fold-enclosed-header__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.fold-enclosed-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--fd-radius-pill);
  border: 1px solid var(--fd-border);
  background: var(--fd-subtle);
  color: var(--fd-body) !important;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fold-enclosed-back:hover {
  background: var(--fd-teal-soft);
  border-color: var(--fd-teal-border);
  color: var(--fd-teal) !important;
}

.fold-enclosed-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.fold-enclosed-logo img {
  height: 36px;
  width: auto;
  display: block;
}

.fold-enclosed-trust {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--fd-radius-pill);
  background: var(--fd-emerald-bg);
  border: 1px solid var(--fd-emerald-border);
  color: var(--fd-emerald);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

body.is-enclosed-shell {
  padding-top: 0 !important;
  background: var(--fd-canvas) !important;
}

/* ==========================================================================
   Animated 2-Tone Stroke Iconography & Micro-Interactions
   ========================================================================== */

.fd-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--fd-teal-soft);
  border: 1px solid var(--fd-teal-border);
  color: var(--fd-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.24s var(--fd-ease-spring), background-color 0.2s ease;
}

.fd-card:hover .fd-icon-box,
.fd-step-card:hover .fd-icon-box {
  transform: scale(1.06) translateY(-1px);
  background: #E0F5F1;
}

/* 1. Live Order Radar Beacon */
.fd-radar-dot {
  position: relative;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10B981;
  flex-shrink: 0;
}

.fd-radar-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #10B981;
  opacity: 0;
  @media (prefers-reduced-motion: no-preference) {
    animation: fdRadarPulse 2.1s cubic-bezier(0.22, 1, 0.36, 1) infinite;
  }
}

@keyframes fdRadarPulse {
  0% { transform: scale(0.65); opacity: 0.85; }
  80%, 100% { transform: scale(1.75); opacity: 0; }
}

/* 2. Pickup Van SVG Motion */
.fd-svg-van .van-body {
  transition: transform 0.28s var(--fd-ease-out);
}
.fd-card:hover .fd-svg-van .van-body,
.fd-step-card:hover .fd-svg-van .van-body,
.is-active-stage .fd-svg-van .van-body {
  @media (prefers-reduced-motion: no-preference) {
    transform: translateX(2px);
  }
}

/* 3. Spinning Washer Drum SVG Motion */
.fd-svg-washer .washer-drum {
  transform-origin: 12px 13px;
}
.is-active-stage .fd-svg-washer .washer-drum,
.fd-card:hover .fd-svg-washer .washer-drum,
.fd-step-card:hover .fd-svg-washer .washer-drum {
  @media (prefers-reduced-motion: no-preference) {
    animation: fdWasherSpin 2.6s linear infinite;
  }
}

@keyframes fdWasherSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 4. Tactile Favorite Heart Button */
.fd-heart-btn {
  appearance: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--fd-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(14, 23, 38, 0.14);
  transition: transform 0.22s var(--fd-ease-spring), color 0.16s ease, background-color 0.16s ease;
}

.fd-heart-btn:hover {
  transform: scale(1.08);
  background: #FFFFFF;
}

.fd-heart-btn svg {
  width: 19px;
  height: 19px;
  transition: transform 0.26s var(--fd-ease-spring), fill 0.16s ease, stroke 0.16s ease;
}

.fd-heart-btn.is-favorited,
.fd-heart-btn[aria-pressed="true"] {
  color: #E11D48;
  background: #FFFFFF;
}

.fd-heart-btn.is-favorited svg,
.fd-heart-btn[aria-pressed="true"] svg {
  fill: #E11D48;
  stroke: #E11D48;
}

.fd-heart-btn.fd-pop svg {
  @media (prefers-reduced-motion: no-preference) {
    animation: fdHeartPop 0.38s var(--fd-ease-spring);
  }
}

@keyframes fdHeartPop {
  0% { transform: scale(0.75); }
  55% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* 5. Confirmation Checkmark Ring */
.fd-check-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--fd-emerald-bg);
  border: 1px solid var(--fd-emerald-border);
  color: var(--fd-emerald);
}

.fd-check-ring svg path {
  stroke-dasharray: 48;
  stroke-dashoffset: 0;
  @media (prefers-reduced-motion: no-preference) {
    animation: fdStrokeDraw 0.65s var(--fd-ease-out) both;
  }
}

@keyframes fdStrokeDraw {
  from { stroke-dashoffset: 48; }
  to { stroke-dashoffset: 0; }
}

/* ==========================================================================
   60fps Scroll-Driven Entry Reveals (Native CSS + IO Fallback)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes fdScrollReveal {
      from {
        opacity: 0;
        transform: translateY(18px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .fd-reveal {
      animation: fdScrollReveal auto var(--fd-ease-out) backwards;
      animation-timeline: view(block);
      animation-range: entry 0% entry 28%;
    }
  }

  /* Fallback only when JS activates .fd-js-observe in browsers without view() */
  .fd-reveal.fd-js-observe {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.48s var(--fd-ease-out), transform 0.48s var(--fd-ease-out);
  }

  .fd-reveal.fd-js-observe.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Non-Blocking Toast Notification System (window.FoldToast)
   ========================================================================== */

.fd-toast-region {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 100020;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}

@media (max-width: 780px) {
  html, body {
    -webkit-overflow-scrolling: touch;
  }

  /* Universal iOS auto-zoom prevention: inputs < 16px trigger auto-zoom on iOS Safari */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Responsive table scroll containers */
  .table-responsive,
  .table-wrap,
  .orders-table-wrap,
  .fp-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .fd-toast-region {
    left: 16px;
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }
}

.fd-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--fd-ink);
  color: #FFFFFF;
  font-family: var(--fd-font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--fd-shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.22s var(--fd-ease-out), transform 0.22s var(--fd-ease-out);
}

.fd-toast.is-shown {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fd-toast--success {
  background: #065F46;
}

.fd-toast--error {
  background: #991B1B;
}

.fd-toast--info {
  background: var(--fd-teal);
}

/* ==========================================================================
   Unified FoldDialog Styles (Available Across All 4 Shells)
   ========================================================================== */

body.fold-dialog-open {
  overflow: hidden !important;
  touch-action: none;
}

.fold-dialog-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100000 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(14, 23, 38, 0.60) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  opacity: 0;
  transition: opacity 0.2s var(--fd-ease-out) !important;
}

.fold-dialog-backdrop.fold-dialog-show {
  opacity: 1 !important;
}

.fold-dialog-card {
  position: relative !important;
  width: 100% !important;
  max-width: 440px !important;
  background: var(--fd-surface) !important;
  border-radius: var(--fd-radius-card) !important;
  border: 1px solid var(--fd-border) !important;
  box-shadow: var(--fd-shadow-lg) !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  transform: scale(0.95) translateY(10px) !important;
  transition: transform 0.22s var(--fd-ease-out) !important;
  font-family: var(--fd-font-sans) !important;
}

.fold-dialog-backdrop.fold-dialog-show .fold-dialog-card {
  transform: scale(1) translateY(0) !important;
}

.fold-dialog-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 16px !important;
}

.fold-dialog-icon-wrap {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  flex-shrink: 0 !important;
}

.fold-dialog-icon-wrap--danger {
  background: var(--fd-rose-bg) !important;
  color: var(--fd-rose-solid) !important;
  border: 1px solid var(--fd-rose-border) !important;
}

.fold-dialog-icon-wrap--warning {
  background: var(--fd-amber-bg) !important;
  color: #D97706 !important;
  border: 1px solid var(--fd-amber-border) !important;
}

.fold-dialog-icon-wrap--primary,
.fold-dialog-icon-wrap--success {
  background: var(--fd-teal-soft) !important;
  color: var(--fd-teal) !important;
  border: 1px solid var(--fd-teal-border) !important;
}

.fold-dialog-icon-wrap--info {
  background: var(--fd-blue-bg) !important;
  color: var(--fd-blue) !important;
  border: 1px solid var(--fd-blue-border) !important;
}

.fold-dialog-close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  border: 1px solid var(--fd-border) !important;
  background: var(--fd-subtle) !important;
  color: var(--fd-muted) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.fold-dialog-title {
  margin: 0 0 8px 0 !important;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: var(--fd-ink) !important;
  line-height: 1.3 !important;
}

.fold-dialog-badge {
  display: inline-block !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  background: var(--fd-subtle) !important;
  color: var(--fd-body) !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
  border: 1px solid var(--fd-border) !important;
}

.fold-dialog-message {
  color: var(--fd-body) !important;
  font-size: 0.94rem !important;
  line-height: 1.55 !important;
}

.fold-dialog-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-top: 22px !important;
}

.fold-dialog-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 11px 18px !important;
  border-radius: var(--fd-radius-control) !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  border: 0 !important;
  min-height: 46px !important;
  text-decoration: none !important;
}

.fold-dialog-btn--cancel {
  background: var(--fd-subtle) !important;
  border: 1px solid var(--fd-border) !important;
  color: var(--fd-body) !important;
}

.fold-dialog-btn--primary,
.fold-dialog-btn--info,
.fold-dialog-btn--success {
  background: var(--fd-teal) !important;
  color: #FFFFFF !important;
}

.fold-dialog-btn--danger {
  background: var(--fd-rose-solid) !important;
  color: #FFFFFF !important;
}

.fold-dialog-btn--warning {
  background: #D97706 !important;
  color: #FFFFFF !important;
}

@media (max-width: 480px) {
  .fold-dialog-actions {
    flex-direction: column-reverse !important;
  }
  .fold-dialog-btn {
    width: 100% !important;
  }
}

/* Ensure brand logo artwork is never inverted or flattened by legacy CSS */
.site-footer .f-logo,
.site-footer .f-logo-white,
.site-footer .fold-brand-logo-white,
.f-logo-white,
.fold-brand-logo-white,
.fold-logo,
.lp-brand-logo,
.lp-mobile-brand img {
  filter: none !important;
  -webkit-filter: none !important;
}
