/* ============================================================
   KJA Shared Component Styles
   All colors reference brand.css custom properties.
   ============================================================ */

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-weight: var(--btn-font-weight);
  line-height: var(--btn-line-height);
  padding: var(--btn-padding-block) var(--btn-padding-inline);
  border-radius: var(--btn-radius);
  min-width: var(--btn-min-width);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-duration) var(--transition-timing),
              color var(--transition-duration) var(--transition-timing),
              transform var(--transition-duration) var(--transition-timing),
              box-shadow var(--transition-duration) var(--transition-timing);
}

/* Primary: Yellow bg, black text */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-black);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(245, 211, 24, 0.3);
}

/* Action: Red bg, white text */
.btn-action {
  background: var(--color-action);
  color: var(--color-white);
}
.btn-action:hover {
  background: var(--color-action-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(222, 22, 4, 0.3);
}

/* CTA: Main call-to-action (action red, larger) */
.btn-cta {
  background: var(--color-action);
  color: var(--color-white);
  font-size: 18px;
  padding: 1em 2em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn-cta:hover {
  background: var(--color-action-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(222, 22, 4, 0.3);
}

/* Accent: Tan/green bg */
.btn-accent {
  background: var(--color-accent);
  color: var(--color-black);
}
.btn-accent:hover {
  background: var(--color-accent-hover);
}

/* Black: Black bg, white text, red on hover */
.btn-black {
  background: var(--color-black);
  color: var(--color-white);
}
.btn-black:hover {
  background: var(--color-action);
  color: var(--color-white);
}

/* Secondary: Orange bg */
.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-white);
}
.btn-secondary:hover {
  background: var(--color-secondary-hover);
  transform: translateY(-2px);
}

/* --- FORM INPUTS --- */
.kja-input {
  width: 100%;
  height: var(--input-height);
  padding: var(--input-padding-y) var(--input-padding-x);
  border-radius: var(--input-radius);
  border: 1px solid var(--neutral-light);
  background: var(--neutral-ultra-light);
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--neutral-dark);
  transition: border var(--transition-duration) var(--transition-timing),
              box-shadow var(--transition-duration) var(--transition-timing);
}
.kja-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245, 211, 24, 0.2);
}
.kja-input::placeholder {
  color: var(--neutral-medium);
}

/* Input with icon prefix */
.kja-input-icon {
  padding-left: 2.5em;
}

/* Prevent decorative icons from blocking touch/click on inputs */
.relative > i:has(+ input),
.relative > i:has(+ .kja-input),
.relative > i:has(+ .input-dark) {
  pointer-events: none;
}

/* Textarea variant */
textarea.kja-input {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

/* Select variant */
select.kja-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  padding-right: 2.5em;
}

/* Dark mode inputs */
.dark .kja-input,
.kja-input-dark {
  background: var(--neutral-dark);
  border-color: var(--neutral-medium);
  color: var(--neutral-ultra-light);
}

/* Form validation states */
.kja-input.valid {
  border-color: var(--color-success);
  background-color: rgba(41, 167, 69, 0.05);
}
.kja-input.invalid {
  border-color: var(--color-danger);
  background-color: rgba(220, 53, 69, 0.05);
}

/* --- INLINE FIELD ERRORS (from lead-form.js validateFields) --- */
.kja-input-error,
.kja-input.kja-input-error {
  border-color: #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}
.input-dark.kja-input-error {
  border-color: #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.1) !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
}
.kja-field-error {
  color: #dc3545;
  font-size: 10px;
  font-weight: 600;
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.kja-field-error::before {
  content: '\f071';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 10px;
}

/* --- RADIO CARDS --- */
.radio-card-input { display: none; }

.radio-card {
  border: 2px solid var(--neutral-light);
  border-radius: var(--radius-sm);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition-duration) var(--transition-timing);
  position: relative;
}
.radio-card:hover {
  background: var(--neutral-ultra-light);
}

.radio-card-input:checked + .radio-card {
  border-color: var(--color-primary);
  background-color: rgba(245, 211, 24, 0.08);
  box-shadow: 0 4px 6px -1px rgba(245, 211, 24, 0.2);
}
.radio-card-input:checked + .radio-card .check-icon {
  opacity: 1;
  transform: scale(1);
}
.check-icon {
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-duration) var(--transition-timing);
  color: var(--color-primary);
}

/* --- MODAL --- */
.modal {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
}
.modal.active {
  opacity: 1;
  visibility: visible;
}
.modal-backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}
.modal-content {
  transform: scale(0.95);
  transition: all 0.3s ease-in-out;
}
.modal.active .modal-content {
  transform: scale(1);
}

/* --- FAQ ACCORDION --- */
.faq-content {
  transition: max-height 0.3s ease-out;
  max-height: 0;
  overflow: hidden;
}
.faq-active .faq-content {
  max-height: 500px;
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-active .faq-icon {
  transform: rotate(180deg);
}

/* --- BEFORE/AFTER SLIDER --- */
.ba-slider {
  position: relative;
  overflow: hidden;
  cursor: col-resize;
}
.ba-before {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.ba-after {
  position: absolute;
  inset: 0;
  width: 50%;
  border-right: 2px solid white;
  background-size: cover;
  background-position: center;
  z-index: 10;
}
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

/* --- TOAST NOTIFICATION --- */
.toast-notification {
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* --- CHAT WIDGET --- */
.chat-window {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
}
.chat-window.hidden-chat {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
}

/* --- FORM WIZARD --- */
.step-content {
  display: none;
  animation: fadeInStep 0.4s ease-in-out;
}
.step-content.active {
  display: block;
}
@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- URGENCY BANNER --- */
.urgency-banner {
  background: var(--color-secondary);
  color: var(--color-black);
  text-align: center;
  padding: 1rem 1rem;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* --- COST CHART BARS --- */
.bar-container {
  display: flex;
  align-items: flex-end;
  height: 200px;
  gap: 20px;
}
.bar {
  width: 100%;
  border-radius: 8px 8px 0 0;
  position: relative;
  transition: height 1s ease-out;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 12px;
  padding-bottom: 10px;
  font-weight: bold;
  color: white;
}
.bar-green  { background: var(--color-success); }
.bar-yellow { background: var(--color-warning); }
.bar-red    { background: var(--color-danger); }

/* --- MAP PINS --- */
.map-pin {
  position: absolute;
  color: var(--color-primary);
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  animation: pinBounce 2s infinite;
}
@keyframes pinBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* --- CONFETTI --- */
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: 0;
  opacity: 0;
  animation: confettiFall 3s linear infinite;
}
@keyframes confettiFall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* --- UTILITY --- */
.grayscale-img { filter: grayscale(100%); }

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only:focus,
.sr-only.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Brand color helpers (for inline Tailwind overrides) */
.text-brand   { color: var(--color-primary); }
.bg-brand     { background-color: var(--color-primary); }
.border-brand { border-color: var(--color-primary); }
.text-action  { color: var(--color-action); }
.bg-action    { background-color: var(--color-action); }
.bg-base      { background-color: var(--color-base); }
.text-base-color { color: var(--color-base); }

/* --- CARDS --- */
.kja-card {
  padding: var(--card-padding);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color-dark);
}
.kja-card-light {
  background: var(--color-white);
  color: var(--text-dark);
}
.kja-card-dark {
  background: var(--color-black);
  border-color: var(--border-color-light);
  color: var(--text-light);
}

/* ============================================================
   SECTION THEMES
   Apply to <section> elements to set background, text colors,
   and auto-style child pill badges, titles, and subtitles.
   ============================================================ */
.section-dark     { background: #1A1A1A; color: #ffffff; }
.section-light    { background: #ffffff; }
.section-warm     { background: #f5f5f0; }
.section-brand    { background: var(--color-primary); color: #1A1A1A; position: relative; overflow: hidden; }
.section-utility  { background: #111111; }

/* Diagonal crosshatch texture overlay (for brand/yellow sections) */
.crosshatch-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: repeating-linear-gradient(
    45deg, #000 0, #000 1px, transparent 0, transparent 50%
  );
  background-size: 10px 10px;
  max-width: none;
  margin: 0;
  pointer-events: none;
}

/* ============================================================
   PILL BADGES
   Small rounded labels that sit above section headings.
   Usage: <div class="pill-badge pill-dark"><i class="fas fa-icon"></i> Label</div>
   ============================================================ */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
/* On dark sections — yellow text on translucent yellow */
.pill-dark   { background: rgba(245, 211, 24, 0.15); color: var(--color-primary); }
/* On light/white sections — navy text on translucent navy */
.pill-light  { background: rgba(10, 36, 52, 0.06);   color: var(--color-base); }
/* On brand/yellow sections — dark text on translucent dark */
.pill-brand  { background: rgba(26, 26, 26, 0.15);   color: #1A1A1A; }
/* Urgency/warning — red text on translucent red */
.pill-action { background: rgba(222, 22, 4, 0.08);   color: var(--color-action); }
/* Warm/golden — gold text on translucent gold (light sections) */
.pill-warm   { background: rgba(245, 211, 24, 0.12); color: #92780a; }

/* ============================================================
   SECTION HEADERS
   Centered heading block: pill badge + title + subtitle.
   Usage: <div class="section-header">
            <div class="pill-badge pill-dark mb-6">...</div>
            <h2 class="section-title">...</h2>
            <p class="section-subtitle">...</p>
          </div>
   ============================================================ */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-title {
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1.1;
}
.section-subtitle {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}
/* Auto-color titles + subtitles based on parent section theme */
.section-dark  .section-title    { color: #ffffff; }
.section-light .section-title,
.section-warm  .section-title    { color: var(--color-base); }
.section-brand .section-title    { color: #1A1A1A; }
.section-dark  .section-subtitle { color: rgba(255, 255, 255, 0.7); }
.section-light .section-subtitle,
.section-warm  .section-subtitle { color: #9ca3af; }
.section-brand .section-subtitle { color: rgba(26, 26, 26, 0.55); }

/* ============================================================
   DARK MODAL
   Premium dark-themed lead capture modal.
   Usage: <div class="modal-content modal-dark">
   ============================================================ */
.modal-dark {
  background: #1A1A1A;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.5);
}

/* Dark input fields (glass-like) */
.input-dark {
  width: 100%;
  height: 52px;
  padding: 0 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-family);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.input-dark::placeholder { color: #4b5563; }
.input-dark:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245, 211, 24, 0.15);
}
.input-dark.with-icon { padding-left: 2.75rem; }

/* Dark label above inputs */
.label-dark {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Progress bar (gold-to-orange gradient) */
.progress-track {
  width: 100%;
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
}
.progress-fill {
  height: 100%;
  border-radius: 0 9999px 9999px 0;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  transition: width 0.7s ease;
}

/* Frosted close button */
.btn-close-frosted {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.btn-close-frosted:hover { transform: scale(1.1); }

/* ============================================================
   STEP CONNECTOR (How-It-Works style sections)
   Horizontal line connecting step circles, masked by box-shadow.
   Usage: <div class="step-connector-line hidden md:block"></div>
          <div class="step-circle step-circle-dark">...</div>
   ============================================================ */
.step-connector-line {
  position: absolute;
  top: 3rem;
  left: 16%;
  right: 16%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}
.step-circle {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}
/* Dark section variant: yellow ring + shadow to mask connector */
.step-circle-dark {
  background: rgba(245, 211, 24, 0.1);
  border: 3px solid var(--color-primary);
  box-shadow: 0 0 0 10px #1A1A1A;
}
.step-circle-dark i { color: var(--color-primary); }

/* ============================================================
   REVIEW CARDS
   Google-review-style card with avatar, stars, and quote.
   ============================================================ */
.review-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.review-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* ============================================================
   TRUST BADGES
   Tiny muted icons + labels (Secure / No Spam / Fast).
   ============================================================ */
.trust-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.trust-badges-dark  { color: rgba(255, 255, 255, 0.55); }
.trust-badges-brand { color: rgba(26, 26, 26, 0.55); }
.trust-badges-light { color: #9ca3af; }

/* ============================================================
   GUARANTEE CARD
   Centered card with shield icon, typically in FAQ sections.
   ============================================================ */
.guarantee-card {
  padding: 2.5rem;
  border-radius: 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.guarantee-card-warm {
  background: rgba(245, 211, 24, 0.08);
  border: 1px solid rgba(245, 211, 24, 0.2);
}

/* ============================================================
   FAQ CARDS (Light section variant)
   Standalone rounded items with hover bg shift.
   ============================================================ */
.faq-card {
  background: #f9fafb;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-card:hover {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.faq-card button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}
.faq-card button:hover { background: #f3f4f6; }
.faq-card .faq-question { font-weight: 700; color: #374151; }
.faq-card .faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.625;
}

/* ============================================================
   HERO IMAGE FRAME
   Image container with yellow border, live badge, and overlay.
   ============================================================ */
.hero-image-frame {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 3px solid rgba(245, 211, 24, 0.2);
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.25);
}
.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
}
.bottom-gradient-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* ============================================================
   HIGHLIGHT TEXT
   For split-color headings: "Get Your Free <span class="text-highlight">Paving Estimate</span>"
   ============================================================ */
.text-highlight { color: var(--color-primary); }

/* ============================================================
   TESTIMONIAL CAROUSEL
   Sliding text testimonials for brand (yellow) sections.
   ============================================================ */
.testimonial-slide {
  transition: opacity 0.5s ease-in-out;
  position: absolute;
  width: 100%;
}

/* ============================================================
   TOAST NOTIFICATION (Activity / FOMO)
   Slides in from bottom, auto-hides after timeout.
   Usage: <div class="toast-notification"> + JS adds .show class
   ============================================================ */
.toast-notification {
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* ============================================================
   CHAT WIDGET
   Floating chat window with smooth open/close animation.
   ============================================================ */
.chat-window {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
}
.chat-window.hidden-chat {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
}

/* ============================================================
   MOBILE ACTION BAR
   Fixed bottom bar with Call + Quote buttons on small screens.
   Dark background extends into iOS safe area.
   ============================================================ */
.mobile-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--color-primary);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}
@media (min-width: 768px) { .mobile-action-bar { display: none; } }

/* On iOS, extend the yellow background into the safe area (home indicator) */
html.ios .mobile-action-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Hide the gold bottom bar on mobile — the action bar covers that area */
html.ios .ios-ui-bar--bottom {
  display: none;
}
@media (min-width: 768px) {
  html.ios .ios-ui-bar--bottom { display: block; }
}

/* ============================================================
   STICKY HEADER
   Dark header bar with golden bottom border.
   ============================================================ */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #1A1A1A;
  border-bottom: 4px solid var(--color-primary);
}

/* ============================================================
   iOS SAFE-AREA BARS
   Branded bars covering the notch/home-indicator regions.
   Activated by adding .ios to <html> (done via inline JS).
   ============================================================ */
.ios-ui-bar {
  position: fixed;
  left: 0;
  right: 0;
  background: var(--color-primary);
  z-index: 9999;
  pointer-events: none;
  display: none;
}
.ios-ui-bar--top    { top: 0;    height: 8px; }
.ios-ui-bar--bottom { bottom: 0; height: 8px; }

html.ios .ios-ui-bar { display: block; }
html.ios body        { padding-top: 8px; padding-bottom: 8px; }

@supports (height: env(safe-area-inset-top)) {
  html.ios .ios-ui-bar--top    { height: calc(8px + env(safe-area-inset-top)); }
  html.ios .ios-ui-bar--bottom { height: calc(8px + env(safe-area-inset-bottom)); }
  html.ios body {
    padding-top:    calc(8px + env(safe-area-inset-top));
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }
}