/* -------------------------------------------------------------------------- */
/*   06-components/_webview.css: the page view (components/webview.html).    */
/*   A bar with the way back ("Back to sources" / "Back to General"), what    */
/*   the page is and how it got here, then the <webview> (Electron) or the    */
/*   <iframe> (plain browser, js/platform.js).                                */
/* -------------------------------------------------------------------------- */

.page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.page__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-element-height);
  padding: var(--space-1) var(--space-3);
  border-bottom: var(--border-hairline);
  background-color: var(--color-surface);
}

.page__back {
  flex: 0 0 auto;
  gap: var(--space-1);
  padding-left: var(--space-1);
}

.page__about {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: var(--line-height-tight);
}

.page__title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: var(--font-weight-semibold);
}

.page__origin {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--font-size-caption);
}

.page__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.page__actions [hidden] {
  display: none;
}

.page__frame {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}

.browser-webview {
  position: absolute;
  inset: 0;
  width: 100%;
  /* explicit: an <iframe> is a replaced element, so inset alone leaves it at
     its intrinsic 150px height */
  height: 100%;
  border: none;
  background-color: var(--color-ground);
}

@media (max-width: 560px) {
  .page__back-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
}
