:root {
	--font-family: Roboto, sans-serif;
	--font-size: 14px;
	--left-side-width: 260px;
	--content-implicit-width: 400px;
	--content-property-width: 260px;

	--theme: white;
	--panel: rgba(0, 0, 0, 0.04);
	--text: rgba(0, 0, 0, 0.8);
	--placeholder: rgba(0, 0, 0, 0.4);
	--accent: #0336FF;
	--attention: #FF6D00;
	--content: white;
	--shadow-default: rgba(17, 17, 26, 0.05) 0px 1px 0px,
		rgba(17, 17, 26, 0.1) 0px 0px 8px;
	--shadow-hover: rgba(17, 17, 26, 0.1) 0px 1px 0px,
		rgba(17, 17, 26, 0.2) 0px 0px 8px;
}

.playbook__dark-mode {
	--theme: black;
	--panel: rgba(255, 255, 255, 0.1);
	--text: rgba(255, 255, 255, 0.95);
	--placeholder: rgba(255, 255, 255, 0.4);
	--accent: #FFDE03;
	--content: black;
	--shadow-default: rgba(250, 250, 250, 0.05) 0px 1px 0px,
		rgba(250, 250, 250, 0.25) 0px 0px 8px;
	--shadow-hover: rgba(250, 250, 250, 0.1) 0px 1px 0px,
		rgba(250, 250, 250, 0.5) 0px 0px 8px;
}

html {
  height: auto !important; /* Prevent trimming the bottom margin of Catalog */
}

body {
  margin: 0;

  &.playbook__theater {
    width: 100vw;
    height: 100vh;
    background: var(--theme);
    color: var(--text);
    overflow: hidden;
  }

  &.playbook__preview {
    width: auto;
    height: auto;
    box-sizing: border-box;
    overflow: auto;
  }
}

.playbook {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: var(--font-family);
  font-size: var(--font-size);
}

.playbook__left {
  width: var(--left-side-width);
  flex: 0 0 auto;
  transition: width 0.3s ease-out;
  background: var(--theme);
  box-sizing: border-box;
  user-select: none;
  display: flex;
  flex-direction: column;
  outline: none;
}

.playbook__search-box {
  position: relative;

  --search-icon-dimension: 20px;

  .playbook__search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
    height: var(--search-icon-dimension);
    width: var(--search-icon-dimension);
    fill: var(--placeholder);
    pointer-events: none;
  }

  input {
    width: calc(100% - 20px);
    margin: 11px 10px;
    padding: 10px 15px 10px calc(10px + var(--search-icon-dimension) + 5px);
    box-sizing: border-box;
    font-family: var(--font-family);
    font-size: inherit;
    font-weight: 500;
    line-height: calc(var(--font-size) + 2px);
    border: none;
    border-radius: 5px;
    outline: none;
    background: var(--theme);
    color: var(--accent);
    transition: box-shadow 0.3s ease-out;
    box-shadow: var(--shadow-default);

    &:hover {
      box-shadow: var(--shadow-hover);
    }

    &::placeholder {
      color: var(--placeholder);
    }

    &::selection {
      background: var(--accent);
      color: var(--theme);
    }
  }
}

.playbook__no-results {
  padding: 10px;
  text-align: center;
  fill: var(--placeholder);
}

.playbook__menu {
  flex: 1 1 auto;
  padding-bottom: 10px;
  overflow-x: hidden;
  overflow-y: auto;
}

.playbook__menu__item {
  display: block;
  padding: 5px 10px;
  color: var(--text);
  font-weight: 300;
  text-decoration: none;
  word-break: break-word;
  outline: none;

  &:hover,
  &:focus {
    color: var(--accent);
  }

  &.--select {
    background: var(--accent);
    color: var(--theme);
  }
}

.playbook__menu__item__last {
  font-weight: 500;
}

.playbook__right {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.playbook__toolbar {
  display: flex;
  background: var(--theme);
  align-items: center;
  box-sizing: border-box;
  padding: 10px;
  gap: 10px;
}

.playbook__button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  appearance: none;
  color: var(--text);
  fill: var(--text); /* For <svg> */
  background: var(--theme);
  border: none;
  border-radius: 5px;
  outline: none;
  padding: 10px;
  min-height: 28px;
  font-family: var(--font-family);
  font-size: var(--font-size);
  font-weight: 500;
  line-height: 1;
  box-sizing: border-box;
  box-shadow: var(--shadow-default);
  transition: box-shadow 0.3s ease-out, transform 0.2s ease-out;
  cursor: pointer;

  &:hover:not(.playbook__button__active) {
    color: var(--accent);
    fill: var(--accent); /* For <svg> */
    box-shadow: var(--shadow-hover);
  }

  &:focus {
    border-color: var(--accent);
  }

  &:active {
    transform: translateY(2px);
  }

  &>svg {
    width: 18px;
    height: 18px;
    display: block;
  }
}

.playbook__button__active {
  background: var(--accent);
  color: var(--theme);
  fill: var(--theme); /* For <svg> */
}

.playbook__content-container {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  background: var(--theme);
}

#playbook__side-menu-toggle {
  display: none;
}

@media (max-width: 1000px) {
  #playbook__side-menu-toggle {
    display: inline-block;
  }

  .playbook__left {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    background: var(--theme);

    &:not(.playbook__left-responsive) {
      display: none;
    }

    &.playbook__left-responsive {
      animation: playbook__slide-right 0.5s ease-out;
    }
  }
}

@keyframes playbook__slide-right {
  from {
    transform: translateX(-100vw);
  }

  to {
    transform: translateX(0);
  }
}:root {
	--font-family: Roboto, sans-serif;
	--font-size: 14px;
	--left-side-width: 260px;
	--content-implicit-width: 400px;
	--content-property-width: 260px;

	--theme: white;
	--panel: rgba(0, 0, 0, 0.04);
	--text: rgba(0, 0, 0, 0.8);
	--placeholder: rgba(0, 0, 0, 0.4);
	--accent: #0336FF;
	--attention: #FF6D00;
	--content: white;
	--shadow-default: rgba(17, 17, 26, 0.05) 0px 1px 0px,
		rgba(17, 17, 26, 0.1) 0px 0px 8px;
	--shadow-hover: rgba(17, 17, 26, 0.1) 0px 1px 0px,
		rgba(17, 17, 26, 0.2) 0px 0px 8px;
}

.playbook__dark-mode {
	--theme: black;
	--panel: rgba(255, 255, 255, 0.1);
	--text: rgba(255, 255, 255, 0.95);
	--placeholder: rgba(255, 255, 255, 0.4);
	--accent: #FFDE03;
	--content: black;
	--shadow-default: rgba(250, 250, 250, 0.05) 0px 1px 0px,
		rgba(250, 250, 250, 0.25) 0px 0px 8px;
	--shadow-hover: rgba(250, 250, 250, 0.1) 0px 1px 0px,
		rgba(250, 250, 250, 0.5) 0px 0px 8px;
}

.playbook__catalog {
	margin: 10px;
}

.playbook__catalog__caption {
	padding: 5px 15px 10px 10px;
	color: var(--accent);
	font-family: Roboto, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
}

.playbook__catalog__caption__icon {
	width: 14px;
	height: 14px;
	vertical-align: top;
	margin-right: 2px;
	fill: var(--accent);
	transform: translateY(2px) rotate(-90deg);
}

.playbook__catalog__columns {
	display: flex;
}

.playbook__catalog__property {
	flex: 0 0 var(--content-property-width);
	box-sizing: border-box;
	background: var(--theme);
	color: var(--text);
	font-family: Roboto Mono, Consolas;
	font-size: 12px;
	word-break: break-word;
	padding: 10px;
	margin-right: 10px;
	border-radius: 5px;
	box-shadow: var(--shadow-default);
	transition: box-shadow 0.3s ease-in-out;

	&:hover {
		box-shadow: var(--shadow-hover);
	}
}

.playbook__catalog__content {
	position: relative;
	flex: 1 1 auto;
}

.playbook__catalog__property__tag {
	font-weight: 600;
}

.playbook__catalog__property__indent {
	margin-left: 16px;
	border-radius: 5px;

	&:hover {
		background: var(--panel);
	}
}

.playbook__catalog__property__interactive {

	&:hover,
	&:focus {
		color: var(--accent);
	}
}

.playbook__catalog__property__function {
	font-style: italic;

	&.--blink {
		animation: blink 1s linear infinite;
	}
}

@keyframes blink {
	0% {
		background: var(--attention);
	}

	50% {
		background: transparent;
	}

	100% {
		background: var(--attention);
	}
}

.playbook__catalog__grid {
	margin: 10px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: space-evenly;

	.playbook__catalog {
		margin: 0;
		display: flex;

		.playbook__catalog__caption {
			display: none;
		}

		.playbook__catalog__columns {
			flex-direction: column-reverse;
		}

		.playbook__catalog__property {
			margin: 10px 0 0 0;
			flex: 1 1 auto;
		}
	}
}