﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
  color: #0366d6;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}
html, body {
  background-color: #6c757d;
}
.footer {
  color: #e9ecef;
  border-top-color: #868e96 !important;
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px; /* Vertically center the text there */
}

/* Navbar
-------------------------------------------------- */
.site-navbar {
  background: linear-gradient(180deg, #3b4148 0%, #23272b 100%);
  border-bottom: 3px solid #d9a441;
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .25);
}

.site-navbar .navbar-brand {
  color: #f5e6c4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  letter-spacing: .05em;
}

.site-navbar .navbar-brand:hover {
  color: #d9a441;
}

.site-navbar .nav-link {
  color: #e9ecef;
  padding: .5rem 1rem;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link:focus {
  color: #d9a441;
  border-bottom-color: #d9a441;
}

/* Stamboom: fit to screen, click to zoom to original size
-------------------------------------------------- */
.stamboom-viewer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 160px);
  overflow: hidden;
}

@supports (height: 100dvh) {
  .stamboom-viewer {
    height: calc(100dvh - 160px);
  }
}

.stamboom-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.stamboom-viewer.zoomed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1050;
  display: flex;
  overflow: auto;
  background-color: #6c757d;
}

@supports (height: 100dvh) {
  .stamboom-viewer.zoomed {
    height: 100dvh;
  }
}

.stamboom-viewer.zoomed img {
  flex: none;
  margin: auto;
  width: auto;
  max-width: none;
  max-height: none;
  height: auto;
  cursor: zoom-out;
}

/* Carousel: scale every image to fit without cropping
-------------------------------------------------- */
.carousel-slide img {
  display: block;
  width: 100%;
  height: calc(100vh - 160px);
  object-fit: contain;
}

@supports (height: 100dvh) {
  .carousel-slide img {
    height: calc(100dvh - 160px);
  }
}

.carousel-slide .carousel-caption {
  display: block;
  left: 0;
  right: 0;
  bottom: 0;
  padding: .5rem 3rem;
  background: rgba(0, 0, 0, .55);
}

.carousel-slide .carousel-caption h5 {
  margin: 0;
  font-size: 1rem;
}

.carousel-indicators {
  z-index: 16;
}

/* Phones in landscape: use the full height and keep the caption compact */
@media (max-height: 500px) and (orientation: landscape) {
  .carousel-slide img {
    height: calc(100vh - 70px);
  }

  @supports (height: 100dvh) {
    .carousel-slide img {
      height: calc(100dvh - 70px);
    }
  }

  .carousel-slide .carousel-caption {
    padding: .15rem 3rem;
  }

  .carousel-slide .carousel-caption h5 {
    font-size: .85rem;
  }

  .carousel-indicators {
    display: none;
  }
}
