/* theme-specific CSS */

@media (max-width: 767px) {
  /* mobile */
  .page-container {
    padding-top: 80px;
    padding-left: 32px;
    padding-right: 32px;
  }
  .page-container::after {
    /* allows for padding at bottom of page */
    content: "​";
    height: 16px;
    user-select: none;
    pointer-events: none;
  }
}

@media (min-width: 768px) {
  /* desktop */
  .page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
  }
}

/************************************************/
/**********        PEEKING DOE         **********/
/************************************************/

@media (max-width: 767px) {
  /* mobile */
  .deer-container {
    top: 0;
    left: 0;
    transform: translateY(17px);
  }
}

@media (min-width: 768px) {
  /* desktop */
  .deer-container {
    transform: translateY(-63px);
  }
}

.deer-container {
  justify-content: center;
  position: absolute;
  display: flex;
  width: 100%;
  pointer-events: none;
  user-select: none;
}

/************************************************/
/************        WINDOW         *************/
/************************************************/

@media (max-width: 767px) {
  /* mobile */
  .window {
    margin-bottom: 16px;
  }
}

@media (min-width: 768px) {
  /* desktop */
  .window {
    display: flex;
    flex-direction: column;
    position: absolute;
    transform: translate(var(--offset-x), var(--offset-y));
    width: var(--size-w);
    height: var(--size-h);
  }
}

.window {
  background-color: #c0c0c0;
  border: 1px solid #404040;
  border-width: 0px 0px 2px 0px;
  box-shadow: 3px 4px 0px black;
  outline: 0px solid #f080c0;
}

.window-content {
  height: 100%;
  width: 100%;
  padding: 8px;
  border: 1px solid;
  border-color: black #404040 #404040 white;
  scrollbar-width: thin;
  box-shadow: inset 2px 3px 0 #808080;
  overflow-y: auto;
}

/************************************************/
/************     WINDOW HEADER     *************/
/************************************************/

.window-header {
  display: flex;
  background-color: #f080c0;
  width: 100%;
  height: 24px;
  padding: 2px;
  gap: 2px;

  border: 1px solid black;
  border-color: white #404040 #404040 white;

  box-shadow: inset 0 0 0 1px #c0c0c0;

  align-items: center;
  padding-left: 4px;
  user-select: none;
}

/* header icon */

.window-header-icon {
  width: 16px;
  height: 16px;
  margin-left: 2px;

  user-select: none;
  pointer-events: none;
}

/* resize handle */
@media (min-width: 768px) {
  /* desktop */
  .window-handle {
    position: absolute;
    width: 16px;
    height: 16px;
    bottom: -4px;
    right: -4px;
    background-image: url(/img/resize-handle.png);
    background-repeat: no-repeat;
  }
}

/* header title */

.window-header-title {
  color: white;
  text-decoration: none;
  margin-left: 2px;

  user-select: none;
  pointer-events: none;
}

/* header buttons */

.window-header-button {
  color: black;
  font-size: 12px;
  text-decoration: none;

  background-color: #c0c0c0;

  width: 16px;
  height: 16px;
  margin-bottom: 2px;

  cursor: pointer;

  border: 1px solid black;
  border-color: white #404040 #404040 white;
  box-shadow: 0px 2px 0px #404040;
}
.window-header-button:hover {
  box-shadow: 0px 1px 0px #404040;
  transform: translateY(1px);
}
.window-header-button:active {
  box-shadow: 0px 0px 0px #404040;
  transform: translateY(2px);
}

/* close button */

.window-header-button.close {
  margin-left: auto;
}
.window-header-button.close::after {
  content: "×";
  display: block;
  transform: translate(1px, 1px);
}

/* back button */

.window-header-button.back {
  margin-right: auto;
}
.window-header-button.back::after {
  content: "🡨";
  display: block;
  transform: translate(-0px, -2px);
}

/************************************************/
/************  DECORATIVE ELEMENTS  *************/
/************************************************/

/************ HYPERLINKS ************/

.hyperlink {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin: 8px;
}
.hyperlink:hover {
  outline: 1px dashed;
}

.hyperlink.dead {
  cursor: default;
  filter: saturate(0);
}

.hyperlink.dead .hyperlink-text {
  text-decoration: none;
}

.hyperlink-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
}

.hyperlink-text {
  text-decoration: underline;
  transform: translateY(-1px);
}

/************ INFO CARDS ************/

.info-card {
  margin: 8px 4px;
  padding: 2px 8px;
  border: 1px solid black;
  border-color: #808080 white white #808080;
}

.info-card.green {
  background-color: #80f080;
}
.info-card.yellow {
  background-color: #f0f080;
}
.info-card.red {
  background-color: #f08080;
}
.info-card.blue {
  background-color: #a0a0f0;
}

/************ SCROLLING TEXT ************/

.construction {
  position: absolute;
  top: 0;
  left: 0;
  background: repeating-linear-gradient(
    -45deg,
    #f0c040,
    #f0c040 16px,
    #404040 16px,
    #404040 32px
  );
  color: white;
  width: 100%;
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  text-shadow:
    1px 1px 0px black,
    -1px -1px 0px black,
    -1px 1px 0px black,
    1px -1px 0px black;
  display: flex;
}

.marquee-text {
  animation: scrolling 12s linear infinite;
  animation-delay: -5s;
  user-select: none;
}

@keyframes scrolling {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-100%);
  }
}

/************ 88x31 BADGES ************/

/* badge gallery container */

.badge-gallery {
  display: grid;
  gap: 0px;
  height: 100%;
  align-items: center;
  justify-content: center;
  background-color: #808080;
  grid-template-columns: repeat(auto-fit, 88px);
  grid-template-rows: repeat(auto-fit, 31px);
}

/* general badge */

.badge {
  width: 88px;
  height: 31px;
  overflow-wrap: break-word;
  background-color: #c0c0c0;
}

.badge .favicon {
  position: absolute;
  width: 16px;
  height: 16px;
}

.badge span {
  margin-left: 18px;
}

.badge:hover img {
  filter: saturate(3);
}

/* favicon badge */

.badge:has(.favicon) {
  outline: 2px outset;
  outline-color: #ffffff;
  outline-offset: -2px;
  padding: 2px;
  line-height: 13px;
}

.badge:has(.favicon):hover {
  background-color: #d0d0d0;
}

.badge:has(.favicon):active {
  outline: 1px inset;
  outline-color: #ffffff;
  outline-offset: -1px;
}

/************ COPYRIGHT ************/

.copyright {
  color: #808080;
  line-height: 16px;
  text-align: right;
  margin-bottom: 0;
  margin-top: 0;
  margin-left: auto;
}

.copyright-container {
  display: flex;
  gap: 8px;
  align-items: center;
}

/************ HIGHLIGHTS ************/

.highlight {
  background-color: #f0f080;
  outline-color: #f0f080;
  outline-width: 2px;
  outline-style: solid;
}

/************ TOOLTIPS ************/

[tooltip] {
  position: relative;
}

[tooltip]::before {
  content: attr(tooltip);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
  bottom: calc(100%);
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid #c0c0c0;
  background-color: black;
  color: white;
  padding: 2px 4px;
  z-index: 10;
  opacity: 0;
  text-wrap: nowrap;
  transition:
    bottom 0.2s ease,
    opacity 0.2s ease,
    visibility 0.2s ease;
}

[tooltip]:hover::before {
  bottom: calc(100% + 4px);
  visibility: visible;
  opacity: 1;
}

/************** TIMELINES **************/

dl.timeline {
  padding: 0;
  margin: 0;
}

.timeline dt {
  text-shadow: 1px 0px 0px black;
  letter-spacing: 1px;
  font-size: 18px;
  display: list-item;
  list-style-type: square;
  margin-left: 18px;
}

.timeline dd {
  margin-left: 5px;
  border-style: solid;
  border-color: black;
  border-width: 0 0 0 3px;
  padding-left: 8px;
}

/************** CURSORS ***************/

body {
  cursor:
    url("/img/cursor/default.png") 2 2,
    default;
}

p,
span,
label,
caption,
li,
h1,
h2,
h3,
h4,
h5,
h6 {
  cursor:
    url("/img/cursor/text.png") 12 12,
    text;
}

a * {
  cursor:
    url("/img/cursor/pointer.png") 9 0,
    pointer;
}

@media (min-width: 768px) {
  /* desktop */
  .window-header {
    cursor:
      url("/img/cursor/move.png") 12 12,
      move;
  }

  .window-handle {
    cursor:
      url("/img/cursor/resize.png") 12 12,
      nwse-resize;
  }
}
