/**
 * Homepage KLICBOT Pro: grote “browser” rond de live demo-Drive (/user/demo?embed=1).
 * --pro-iframe-scale: 1 = 100% zoom; <1 = uitzoomen (meer UI in beeld).
 */
.pro-browser {
  --pro-iframe-scale: 0.90;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.07);
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  /* 16:9; tot ~100rem breed via .pro sectie (pro_preview.html) */
  aspect-ratio: 16 / 9;
  min-height: 300px;
  /* Laptops: niet de hele viewport vullen, ruimte om de pagina te blijven scrollen */
  max-height: min(64vh, 900px);
}

.pro-browser * {
  box-sizing: border-box;
}

.pro-browser__titlebar {
  height: 38px;
  min-height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 12px 0 10px;
  gap: 10px;
  background: #1e1e1e;
  border-bottom: 1px solid #0a0a0a;
}

.pro-browser__traffic {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.pro-browser__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.pro-browser__dot--r { background: #ff5f57; }
.pro-browser__dot--y { background: #febc2e; }
.pro-browser__dot--g { background: #28c840; }

.pro-browser__chrome {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.pro-browser__url {
  max-width: 100%;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px 0 8px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  font-size: 10px;
  color: #a3a3a3;
  font-weight: 500;
  font-family: "Work Sans", system-ui, -apple-system, sans-serif;
  font-variant-ligatures: none;
  letter-spacing: 0.01em;
}

.pro-browser__url-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Alleen desktop: terug / menu verborgen */
.pro-browser__mobile-back,
.pro-browser__mobile-menu {
  display: none;
  flex-shrink: 0;
}

.pro-browser__url i {
  font-size: 8px;
  color: #5c7;
  margin-right: 6px;
  flex-shrink: 0;
}

.pro-browser__viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #0b0d0c;
}

.pro-browser__frame-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Desktop: wiel = pagina scrollen totdat gebruiker bewust de demo kiest (pro_showcase_home.js) */
.pro-browser__scroll-guard {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: default;
  background: transparent;
  touch-action: none;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
}
.pro-browser__scroll-guard:focus-visible {
  outline: 2px solid rgba(195, 255, 0, 0.55);
  outline-offset: -2px;
  border-radius: 2px;
}
.pro-browser--iframe-active .pro-browser__scroll-guard {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pro-browser__frame {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / var(--pro-iframe-scale));
  height: calc(100% / var(--pro-iframe-scale));
  border: 0;
  display: block;
  transform: scale(var(--pro-iframe-scale));
  transform-origin: 0 0;
  pointer-events: none;
}
.pro-browser--iframe-active .pro-browser__frame {
  pointer-events: auto;
}
.pro-browser__scroll-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  z-index: 3;
  margin: 0;
  padding: 0 8px;
  text-align: center;
  font-size: 10px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  font-family: "Work Sans", system-ui, -apple-system, sans-serif;
  pointer-events: none;
}
.pro-browser--iframe-active .pro-browser__scroll-hint {
  opacity: 0;
  transition: opacity 0.2s ease;
}
@media (min-width: 641px) and (max-width: 1280px) {
  .pro-browser {
    max-height: min(52vh, 560px);
  }
}

@media (min-width: 1024px) {
  .pro-browser {
    min-height: min(360px, 40vh);
  }
}

@media (max-width: 640px) {
  /*
   * Hoger kader (width/height = 3/4) zodat de demo-iframe minder “afknipt” oogt;
   * iets minder zoom = meer app in beeld. overflow-x op sectie voorkomt horizontale scroll.
   * Geen scroll-guard: direct touch op iframe (anders dubbel tikken).
   */
  .pro-browser {
    --pro-iframe-scale: 0.86;
    min-height: min(58vh, 520px);
    max-height: min(70vh, 600px);
    aspect-ratio: 3 / 4;
    border-radius: 12px;
  }
  .pro-browser__scroll-guard {
    display: none;
  }
  .pro-browser__scroll-hint {
    display: none;
  }
  .pro-browser__frame {
    pointer-events: auto;
  }

  /* Mobiele browser-chroom (geen macOS traffic lights) */
  .pro-browser__titlebar {
    height: auto;
    min-height: 44px;
    padding: 6px 8px;
    gap: 6px;
    background: #1c1c1e;
    border-bottom: 1px solid #0a0a0a;
    /* back | URL | menu */
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    align-items: center;
  }

  .pro-browser__traffic {
    display: none;
  }

  .pro-browser__mobile-back,
  .pro-browser__mobile-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    font-weight: 300;
    color: #8e8e93;
    user-select: none;
  }

  .pro-browser__mobile-menu {
    font-size: 18px;
    letter-spacing: -2px;
  }

  .pro-browser__chrome {
    justify-content: stretch;
  }

  .pro-browser__url {
    width: 100%;
    max-width: none;
    height: 32px;
    font-size: 9px;
    padding: 0 8px 0 6px;
    border-radius: 8px;
    background: #0a0a0a;
    border: 1px solid #3a3a3c;
    color: #98989d;
    justify-content: flex-start;
  }

  .pro-browser__url i {
    font-size: 7px;
    margin-right: 4px;
  }
}
