/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 :root {
  --highlight-color: #EAC0C1;
  --intense-color: #BB271B;
}

 body {
  /* padding-top: 5rem; */
}

.field_with_errors {
  border: 1px red;
}

.logo {
  max-width: 100px;
}

.logo.small {
  height: 40px;
}

input.highlighted {
  background-color: var(--highlight-color);
}

/* The search box in the navigation. Its magnifier stays put, so the text
   starts past it rather than underneath. The border is transparent rather than
   absent until the field has focus, so focusing it does not make it taller. */
.nav-search .form-control {
  padding-left: 2.5rem;
}

.nav-search .form-control:not(:focus) {
  border-color: transparent;
}

.navbar.intense {
  background-color: var(--intense-color);
}

.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1030; /* higher than default navbar */
  /* background-color: white; */
  box-shadow: 0 2px 4px rgba(0, 0 ,0 , 0.1);
  transition: padding 0.3s ease;
}

/* Utility classes using theme colors */
.text-intense {
  color: var(--intense-color) !important;
}

.bg-intense {
  background-color: var(--intense-color) !important;
}

.btn-intense {
  background-color: var(--intense-color);
  color: white;
  border-color: var(--intense-color);
}

.btn-intense:hover {
  background-color: #9a1f16;
  border-color: #9a1f16;
  color: white;
}

.btn-white {
  background-color: white;
  border-color: white;
}

.btn-white:hover {
  background-color: #f0f0f0;
  border-color: #f0f0f0;
}

/* Which part of a picture survives a crop. The class name carries the stored
   anchor and the anchor is the CSS, so nothing translates between the column,
   the class and the rule. See AlignsImages. */
.img-align-top-left {
  object-position: top left;
}

.img-align-top-center {
  object-position: top center;
}

.img-align-top-right {
  object-position: top right;
}

.img-align-center-left {
  object-position: center left;
}

.img-align-center-center {
  object-position: center center;
}

.img-align-center-right {
  object-position: center right;
}

.img-align-bottom-left {
  object-position: bottom left;
}

.img-align-bottom-center {
  object-position: bottom center;
}

.img-align-bottom-right {
  object-position: bottom right;
}

/* Bilder in voller Größe ---------------------------------------------------
   The tiles crop to 4:3, which is the shape most photographs arrive in, so a
   row of them reads as a row; the lightbox above them crops nothing, because
   a picture opened on purpose should be seen whole.

   Not .gallery-tile: that belongs to the "Folge uns" row in home.css, which
   is square and links to a page rather than opening a picture. Two meanings
   for one class name is how one of them silently loses. */
.picture-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.375rem;
  aspect-ratio: 4 / 3;
  background-color: rgba(0, 0, 0, 0.04);
}

.picture-tile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.picture-tile:hover .picture-tile-image,
.picture-tile:focus-visible .picture-tile-image {
  transform: scale(1.04);
}

.picture-tile-badge {
  position: absolute;
  inset: auto auto 0.4rem 0.4rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.2rem;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.7rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem 3.5rem;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-close,
.lightbox-step {
  position: absolute;
  border: 0;
  background-color: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-step:hover,
.lightbox-close:focus-visible,
.lightbox-step:focus-visible {
  color: white;
}

.lightbox-close {
  top: 0.5rem;
  right: 0.75rem;
}

.lightbox-previous {
  left: 0.25rem;
}

.lightbox-next {
  right: 0.25rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

/* The page behind must not scroll away under the picture. */
.lightbox-open,
.lightbox-open body {
  overflow: hidden;
}
