/* ============================================================
   DBA Secure Downloads — front end
   Colours and typography follow the theme (main.css).
   ============================================================ */

/* The theme's fixed header is offset through --header-h (see main.css). */
.dba-sd-page {
  padding-top: calc(var(--header-h, 87px) + 50px);
  padding-bottom: 100px;
}

.dba-sd-page__title {
  font-family: 'Klavika-Regular', 'Source Sans Pro', sans-serif;
  font-size: 34px;
  font-weight: 400;
  color: #2d2f3d;
  margin: 0 0 24px;
}

.dba-sd-page__intro {
  max-width: 760px;
  color: #5c606e;
  margin-bottom: 36px;
}

.dba-sd-section-title {
  font-family: 'Klavika-Regular', 'Source Sans Pro', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #2d2f3d;
  margin: 44px 0 16px;
}

/* ── Buttons & links ───────────────────────────────────────── */
.dba-sd-button {
  display: inline-block;
  background: #808c9a;
  color: #fff;
  border: 0;
  padding: 13px 30px;
  font-family: 'Klavika-Regular', 'Source Sans Pro', sans-serif;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease;
}

.dba-sd-button:hover,
.dba-sd-button:focus {
  background: #2d5967;
  color: #fff;
}

.dba-sd-button--small {
  padding: 8px 18px;
  font-size: 13px;
}

.dba-sd-link {
  color: #3d7080;
  text-decoration: none;
  border-bottom: 1px solid rgba(61, 112, 128, .35);
  font-size: 14px;
}

.dba-sd-link:hover {
  border-bottom-color: #3d7080;
}

/* ── Notices ───────────────────────────────────────────────── */
.dba-sd-notice {
  padding: 14px 18px;
  margin: 0 0 24px;
  font-size: 15px;
  border-left: 3px solid;
}

.dba-sd-notice--success {
  background: #eef4f5;
  border-color: #3d7080;
  color: #2d5967;
}

.dba-sd-notice--error {
  background: #fbeeee;
  border-color: #b4534f;
  color: #8d3936;
}

/* ── User bar ──────────────────────────────────────────────── */
.dba-sd-userbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 18px;
  margin-bottom: 30px;
  border-bottom: 1px solid #e3e5ea;
  font-size: 14px;
  color: #5c606e;
}

.dba-sd-userbar__actions a {
  color: #3d7080;
  text-decoration: none;
  margin-left: 18px;
}

.dba-sd-userbar__actions a:hover {
  text-decoration: underline;
}

/* ── Login ─────────────────────────────────────────────────── */
.dba-sd-login {
  position: relative;
  padding: 70px 0 90px;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dba-sd-login__backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  overflow: hidden;
  pointer-events: none;
}

.dba-sd-tiles--ghost {
  width: 100%;
  max-width: 1180px;
  opacity: .32;
  filter: blur(3px) grayscale(20%);
  transform: scale(1.02);
}

.dba-sd-login__panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 50px rgba(45, 47, 61, .18);
  padding: 44px 44px 38px;
}

.dba-sd-login__title {
  font-family: 'Klavika-Regular', 'Source Sans Pro', sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: #2d2f3d;
  margin: 0 0 12px;
}

.dba-sd-login__intro {
  color: #5c606e;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.dba-sd-login__form input[type="email"] {
  width: 100%;
  border: 1px solid #c9ccd4;
  background: #fff;
  padding: 14px 16px;
  font-size: 15px;
  color: #2d2f3d;
  margin-bottom: 16px;
}

.dba-sd-login__form input[type="email"]:focus {
  outline: 0;
  border-color: #3d7080;
}

.dba-sd-login__form .dba-sd-button {
  width: 100%;
}

.dba-sd-login__note {
  margin: 18px 0 0;
  font-size: 13px;
  color: #8b8f9a;
}

.dba-sd-login__logout {
  color: #8b8f9a;
  font-size: 14px;
}

/* Honeypot — invisible to humans, visible to bots. */
.dba-sd-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Project tiles ─────────────────────────────────────────── */
.dba-sd-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.dba-sd-tile__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.dba-sd-tile__image {
  position: relative;
  overflow: hidden;
  background: #e3e5ea;
  aspect-ratio: 3 / 2;
}

.dba-sd-tile__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.dba-sd-tile__link:hover .dba-sd-tile__image img {
  transform: scale(1.04);
}

.dba-sd-tile__image--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e3e5ea, #cfd3db);
}

.dba-sd-tile__badge {
  position: absolute;
  top: 14px;
  right: 0;
  background: rgba(255, 255, 255, .88);
  color: #2d2f3d;
  font-size: 12px;
  font-style: italic;
  padding: 5px 14px;
}

.dba-sd-tile__lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 47, 61, .45);
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 10px;
}

.dba-sd-tile__info {
  border-left: 1px solid #c9ccd4;
  padding: 16px 0 4px 16px;
  margin-top: 18px;
}

.dba-sd-tile__city {
  display: block;
  font-size: 13px;
  color: #8b8f9a;
  margin-bottom: 4px;
}

.dba-sd-tile__name {
  font-family: 'Klavika-Light', 'Source Sans Pro', sans-serif;
  font-size: 26px;
  font-weight: 300;
  color: #2d2f3d;
  margin: 0;
}

.dba-sd-tile.is-dimmed {
  opacity: .55;
}

/* ── Folder list ───────────────────────────────────────────── */
.dba-sd-folders {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e3e5ea;
}

.dba-sd-folders__item {
  border-bottom: 1px solid #e3e5ea;
}

.dba-sd-folders__link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 6px;
  text-decoration: none;
  color: #2d2f3d;
  transition: background .15s ease;
}

a.dba-sd-folders__link:hover {
  background: #f5f6f8;
}

.dba-sd-folders__icon {
  flex: none;
  width: 30px;
  height: 24px;
  background: #9aa0ad;
  border-radius: 2px 4px 4px 4px;
  position: relative;
}

.dba-sd-folders__icon::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 13px;
  height: 5px;
  background: #9aa0ad;
  border-radius: 2px 2px 0 0;
}

a.dba-sd-folders__link:hover .dba-sd-folders__icon,
a.dba-sd-folders__link:hover .dba-sd-folders__icon::before {
  background: #3d7080;
}

.dba-sd-folders__name {
  flex: 1;
  font-size: 17px;
}

.dba-sd-folders__count,
.dba-sd-folders__note {
  font-size: 13px;
  color: #8b8f9a;
}

.dba-sd-folders__item.is-dimmed {
  opacity: .5;
}

/* ── File list ─────────────────────────────────────────────── */
.dba-sd-files {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e3e5ea;
}

.dba-sd-files__item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 6px;
  border-bottom: 1px solid #e3e5ea;
}

/* display:flex ueberschreibt sonst das hidden-Attribut, mit dem die Suche
   filtert — die ausgefilterten Zeilen blieben stehen. */
.dba-sd-files__item[hidden] {
  display: none;
}

.dba-sd-files__type {
  flex: none;
  min-width: 52px;
  text-align: center;
  background: #eef0f3;
  color: #5c606e;
  font-size: 11px;
  letter-spacing: .06em;
  padding: 6px 8px;
}

.dba-sd-files__main {
  flex: 1;
  min-width: 0;
}

.dba-sd-files__name {
  display: block;
  font-size: 16px;
  color: #2d2f3d;
  overflow-wrap: anywhere;
}

.dba-sd-files__desc {
  display: block;
  font-size: 13px;
  color: #8b8f9a;
  margin-top: 2px;
}

/* Suchtreffer aus einem Unterordner: zeigt, wo die Datei liegt. */
.dba-sd-files__folder {
  display: block;
  font-size: 13px;
  color: #8b8f9a;
  margin-top: 2px;
}

.dba-sd-files__folder a {
  color: #527c8d;
  text-decoration: none;
}

.dba-sd-files__folder a:hover {
  text-decoration: underline;
}

.dba-sd-files__size {
  flex: none;
  font-size: 13px;
  color: #8b8f9a;
}

.dba-sd-files__actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Search & empty states ─────────────────────────────────── */
.dba-sd-filter {
  margin: 10px 0 24px;
}

.dba-sd-filter input[type="search"] {
  width: 100%;
  max-width: 380px;
  border: 1px solid #c9ccd4;
  padding: 11px 14px;
  font-size: 15px;
}

.dba-sd-filter input[type="search"]:focus {
  outline: 0;
  border-color: #3d7080;
}

.dba-sd-empty,
.dba-sd-nomatch {
  color: #8b8f9a;
  padding: 24px 0;
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.dba-sd-breadcrumb {
  font-size: 14px;
  color: #8b8f9a;
  margin-bottom: 14px;
}

.dba-sd-breadcrumb a {
  color: #3d7080;
  text-decoration: none;
}

.dba-sd-breadcrumb a:hover {
  text-decoration: underline;
}

.dba-sd-breadcrumb__sep {
  margin: 0 8px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dba-sd-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dba-sd-tiles {
    grid-template-columns: 1fr;
  }

  .dba-sd-login__panel {
    padding: 32px 24px 28px;
  }

  .dba-sd-files__item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .dba-sd-files__main {
    flex: 1 1 100%;
    order: 2;
  }

  .dba-sd-files__actions {
    flex: 1 1 100%;
    order: 3;
    justify-content: flex-start;
  }
}

/* ── Anmeldeseite: Fusszeile immer unten ──────────────────────
   Die Seite ist kurz; ohne das steht die Fusszeile auf grossen
   Bildschirmen mitten im Bild und darunter bleibt Weiss. */
body.dba-sd-login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.dba-sd-login-page .site-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* Anmeldefenster und Kachelwand fuellen den Platz zwischen Kopf- und
   Fusszeile — sonst haengen sie oben und darunter bleibt Weiss. */
body.dba-sd-login-page .dba-sd-login {
  flex: 1 0 auto;
}

body.dba-sd-login-page .site-footer {
  margin-top: auto;
}

