
/* styles for text bubble */
.text-bubble {
  width: 430px;
  color: var(--netizen-meta);
  background-color: var(--bg-color);
  padding: 14px;
  border-radius: 15px;
  border: 4px solid var(--fg-color);
}

.text-bubble > section > *:first-of-type {
  margin-top: 0;
}

/* styles for all text inside text bubble */
.text-bubble > section {
  margin: 0;
  font-size: 16px;
  line-height: 1.45em;
}
.text-bubble > section p {
  margin: 0;
  font-size: 16px;
  line-height: 1.45em;
}

.text-bubble > section code {
  position: relative;
  top: -0.1em;
  padding: .1em 0.3em 0.2em;
  border-radius: 6px;
  color: var(--bg-color);
  background-color: var(--fg-color);
  font-size: 14px;
  line-height: 1.4em;
  font-weight: 700;
  cursor: text;
}
.text-bubble > section b {
  font-weight: 700;
}
.text-bubble > section i {
  font-style: italic;
}
.text-bubble > section input {
  display: block;
  width: auto;
  max-width: 100%;
  padding: 4px 5px;
  border: 1px solid var(--netizen-hint-shadow);
  background-color: var(--netizen-hint-shadow);
  color: var(--netizen-meta);
  font-size: 0.9em;
}
.text-bubble > section input::placeholder {
  color: var(--netizen-meta);
  opacity: 0.8;
}
.text-bubble > section input:focus {
  outline: 1px solid var(--fg-color);
  outline-offset: 2px;
}
.text-bubble > section a {
  position: relative;
  color: var(--fg-color);
  text-decoration: none;
  cursor: pointer;
  transition: color .5s ease, border .5s ease;

  /*underline*/
  text-decoration: underline;
  text-underline-position: under;
}
.text-bubble > section a:hover {
  color: var(--netizen-match-color);
}
.text-bubble > section a:active {
  color: var(--netizen-attribute);
}
.text-bubble > section a:active:after {
  background-color: var(--netizen-attribute);
}
.text-bubble > section a code {
  text-decoration: underline;
  text-underline-position: under;
  cursor: pointer;
  transition: color .5s ease;
}
.text-bubble > section a:hover code {
  color: var(--netizen-match-color);
}


/* styles for all possible text bubble h1s/headers */
.text-bubble > section h1 {
  display: inline-block;
  position: relative;
  width: auto;
  margin-bottom: 12px;
  color: var(--fg-color);
  font-size: 20px;
  line-height: 1.2em;
  font-weight: 400;
  transform: skew(0);
  transition: color .2s ease;
  z-index: 1;
}

.text-bubble > section h1 a {
  display: inline-block;
  position: relative;
  width: auto;
  color: var(--fg-color);
  text-decoration: none;
  transition: color .2s ease;

  /* resets */
  background: transparent;
  border-bottom: none;
  padding-bottom: 0;
  text-shadow: none;
}

.text-bubble > section h1 a:after {
  display: none;
}

.text-bubble > section h1 a:hover {
  /* resets */
  color: inherit;
  border-bottom: none;
  background-image: none; 
}

.text-bubble > section h1 code {
  display: inline-block;
  position: relative;
  width: auto;
  color: var(--fg-color);
  text-decoration: none;
  transition: color .2s ease;
  /* resets */
  top: auto;
  padding: 0;
  border-radius: 0;
  border: none;
  background-color: transparent;
  font-size: 20px;
  line-height: 1.2em;
  cursor: pointer;
}

.text-bubble > section h1 a:hover code {
  color: inherit;
}

.text-bubble > section h1:before {
  content: '';
  position: absolute;
  display: block;
  top: 1px;
  left: -2px;

  width: 100%;
  height: 95%;

  padding: 0px 2px;

  background-color: var(--netizen-hint-shadow);

  z-index: -1;

  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.text-bubble > section h1:after {
  content: '';
  position: absolute;
  display: block;
  top: 1px;
  right: -4px;

  width: 2px;
  height: 95%;

  background-color: var(--netizen-meta);

  animation: hdrCursorBlink 1.5s infinite linear;
  transition: right .5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes hdrCursorBlink {
  0% { opacity: 0; }
  25% { opacity: 0; }
  26% { opacity: 1; }
  75% { opacity: 1; }
  76% { opacity: 0; }
  100% { opacity: 0; }
}

.text-bubble > section h1:hover {
  color: var(--fg-color);
  transform: skew(-5deg);
}
.text-bubble > section h1:hover a {
  color: var(--fg-color);
}
.text-bubble > section h1:hover:before {
  transform: scaleX(1);
}
.text-bubble > section h1:hover:after {
  right: calc(100% + 2px);
}


/* styles for text bubble buttons */
.text-bubble > .text-bubble-options {
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-end;
  position: absolute;
  top: calc(100% + 9px);
  left: 48%;
  width: 80%;
  margin: 0;
  margin-bottom: 2px;
  margin-right: 2px;
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  transition: opacity .5s cubic-bezier(0.165, 0.84, 0.44, 1), transform .5s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.text-bubble > .text-bubble-options > button {
  position: relative;
  transform: translate(0, 0);

  border: none;
  border-radius: 25px;
  padding: 5px 15px;
  margin-right: 0 5px 0 0;

  color: var(--bg-color);
  background: var(--fg-color);

  font-size: 15px;
  font-weight: 700;
  text-shadow: none;
  white-space: nowrap;

  box-shadow: 2px 2px 6px var(--netizen-hint-shadow);
  cursor: pointer;

  transition: box-shadow .3s ease, transform .3s ease;
}
.text-bubble > .text-bubble-options > button:after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 25px;
  border: 1px solid var(--fg-color);
  opacity: 0;
}
.text-bubble > .text-bubble-options > button:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 3px var(--netizen-hint-shadow);
}
.text-bubble > .text-bubble-options > button:focus {
  outline: none;
  box-shadow: 1px 1px 3px var(--netizen-hint-shadow);
}
.text-bubble > .text-bubble-options > button:focus:after {
  opacity: 1;
}

/* styles for text bubble arrow */
.text-bubble-triangle {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-bottom: 15px solid var(--fg-color);
  z-index: 1;
}

.text-bubble-triangle:after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 11px solid var(--bg-color);
  z-index: 2;
}
