/* Tour-Files Galerie: Notizfilter – Originalbilder bleiben unverändert. */
#gallery-view #tf-gallery-notes-filter[hidden],
#gallery-view #tf-gallery-notes-results[hidden] { display:none!important; }
#gallery-view #tf-gallery-notes-filter,
#gallery-view #tf-gallery-notes-results { box-sizing:border-box; width:100%!important; max-width:none!important; }
/* 17.11.2026 – an die vorhandenen Galeriekarten angleichen: Filterleiste
   hat seitlich 48px Abstand (entsprechend den anderen Inhaltskarten). */
#gallery-view #tf-gallery-notes-filter {
  width:calc(100% - 96px)!important;
  max-width:1300px!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
/* Das Original-Bildraster hat auf Desktop links/rechts 24px Innenabstand.
   Denselben Innenabstand braucht die separate Ansicht „Mit Notizen“. */
#gallery-view #tf-gallery-notes-results {
  padding-left:24px!important;
  padding-right:24px!important;
}
#gallery-view #tf-gallery-notes-filter {
  display:flex!important; flex-wrap:wrap; justify-content:space-between; align-items:center;
  gap:12px 18px; margin:16px 0 14px!important; padding:15px 18px!important;
  background:#fff!important; border:1px solid #e6e6e4!important; border-radius:14px!important;
  box-shadow:0 1px 7px rgba(0,0,0,.025); color:#22272a!important;
  font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;
}
#tf-gallery-notes-filter * { box-sizing:border-box; }
#gallery-view #tf-gallery-notes-filter .tf-gallery-notes-filter-title {
  font-size:14px!important; line-height:1.25!important; font-weight:750!important; color:#22272a!important;
}
#gallery-view #tf-gallery-notes-filter .tf-gallery-notes-filter-actions {
  display:flex; flex-wrap:wrap; align-items:center; gap:9px;
}
#gallery-view #tf-gallery-notes-filter .tf-gallery-notes-filter-group {
  display:inline-flex!important; align-items:stretch!important; gap:3px; padding:3px!important;
  background:#f1f2f2!important; border:1px solid #e5e6e6!important; border-radius:10px!important;
}
#gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-choice,
#gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-refresh {
  all:unset; box-sizing:border-box; cursor:pointer!important;
  display:inline-flex!important; align-items:center!important; justify-content:center!important;
  gap:8px; white-space:nowrap; min-height:36px; border-radius:8px!important;
  padding:7px 12px!important; font:650 12px/1.15 system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;
}
#gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-choice {
  background:transparent!important; border:1px solid transparent!important; color:#454b50!important;
}
#gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-choice[aria-pressed="true"] {
  background:#1b1e20!important; border-color:#1b1e20!important; color:#fff!important;
}
#gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-refresh {
  color:#343a3e!important; background:#fff!important; border:1px solid #dddfe1!important;
}
#gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-refresh::before {
  content:"↻";font-size:19px;line-height:11px;
}
#gallery-view #tf-gallery-notes-filter .tf-gallery-notes-filter-count {
  display:inline-flex;align-items:center;justify-content:center;min-width:20px;min-height:19px;
  padding:2px 5px;border-radius:6px;background:#e0e4e6;color:#303539;
  font:700 11px/1 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
#gallery-view #tf-gallery-notes-filter [aria-pressed="true"] .tf-gallery-notes-filter-count {
  background:rgba(255,255,255,.16);color:#fff;
}
#gallery-view #tf-gallery-notes-filter button:focus-visible,
#gallery-view #tf-gallery-notes-results button:focus-visible { outline:3px solid #80a8d9!important;outline-offset:2px!important; }
#gallery-view #tf-gallery-notes-filter button:disabled { opacity:.55;cursor:wait!important; }
#gallery-view #tf-gallery-notes-results { margin:0 0 22px!important; }
#gallery-view #tf-gallery-notes-results .tf-gallery-notes-result-grid {
  display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important; align-items:start!important;
}
#gallery-view #tf-gallery-notes-results .tf-gallery-notes-card {
  min-width:0;overflow:hidden;border:1px solid #e4e5e5;border-radius:12px;
  background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.025);display:flex;flex-direction:column;
}
#gallery-view #tf-gallery-notes-results .tf-gallery-notes-image-button {
  all:unset; box-sizing:border-box; display:block!important;position:relative;cursor:zoom-in;
  background:#eee;min-height:110px; width:100%;padding:0!important;border:0!important;
}
#gallery-view #tf-gallery-notes-results img.tf-gallery-notes-card-image {
  display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;
}
#gallery-view #tf-gallery-notes-results .tf-gallery-notes-card-body { padding:11px 12px 13px; }
#gallery-view #tf-gallery-notes-results .tf-gallery-notes-card-head {
  display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;flex-wrap:wrap;
}
#gallery-view #tf-gallery-notes-results .tf-gallery-notes-file-name {
  font:700 12px/1.35 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;overflow-wrap:anywhere;color:#202428;
}
#gallery-view #tf-gallery-notes-results .tf-gallery-notes-card-count {
  padding:4px 7px;border-radius:7px;background:#f0f2f3;color:#43494e;
  font:600 11px/1.2 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
}
#gallery-view .tf-gallery-note-comments { display:flex;flex-direction:column;gap:8px; }
#gallery-view .tf-gallery-note-comment {
  padding:9px 10px;border-radius:9px;background:#f7f7f6;overflow-wrap:anywhere;
}
#gallery-view .tf-gallery-note-author { display:block;font:700 11px/1.3 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:#515b60; }
#gallery-view .tf-gallery-note-content { margin:3px 0 0!important;font:400 12px/1.5 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:#202428;white-space:pre-wrap;overflow-wrap:anywhere; }
#gallery-view #tf-gallery-notes-results .tf-gallery-notes-empty {margin:5px 0 20px;padding:24px;background:#fff;border-radius:12px;color:#60656a;}
#tf-gallery-notes-preview {border:0;border-radius:15px;width:min(860px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:20px;background:#fff;color:#212426;box-shadow:0 18px 80px rgba(0,0,0,.25);}
#tf-gallery-notes-preview::backdrop {background:rgba(0,0,0,.67);}
#tf-gallery-notes-preview .tf-gallery-notes-preview-close {all:unset;display:block;cursor:pointer;margin-left:auto;font-size:25px;padding:0 8px 8px;}
#tf-gallery-notes-preview .tf-gallery-notes-preview-image {max-width:100%;max-height:62dvh;object-fit:contain;display:block;margin:auto;border-radius:8px;}
#tf-gallery-notes-preview h2 {font:700 14px/1.35 system-ui;margin:15px 0 10px;}
#tf-gallery-notes-preview .tf-gallery-note-comment {background:#f4f5f5;border-radius:9px;padding:10px 12px;margin:7px 0;}
#tf-gallery-notes-preview .tf-gallery-note-author {display:block;font:700 12px/1.3 system-ui;color:#48535a;}
#tf-gallery-notes-preview .tf-gallery-note-content {font:13px/1.45 system-ui;white-space:pre-wrap;margin:3px 0 0;}
@media(max-width:1050px){#gallery-view #tf-gallery-notes-results .tf-gallery-notes-result-grid {grid-template-columns:repeat(3,minmax(0,1fr))!important;}}
@media(max-width:767px){
  /* Kleine Displays: die Filterkarte bleibt breit genug zum Bedienen. */
  #gallery-view #tf-gallery-notes-filter {
    width:calc(100% - 24px)!important;
    max-width:calc(100% - 24px)!important;
  }
  #gallery-view #tf-gallery-notes-results {
    padding-left:10px!important;
    padding-right:10px!important;
  }
}
@media(max-width:720px){
  #gallery-view #tf-gallery-notes-results .tf-gallery-notes-result-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;}
  #gallery-view #tf-gallery-notes-filter {padding:13px 12px!important;gap:10px;}
  #gallery-view #tf-gallery-notes-filter .tf-gallery-notes-filter-actions {width:100%;gap:8px;}
  #gallery-view #tf-gallery-notes-filter .tf-gallery-notes-filter-group {flex:1;min-width:0;}
  #gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-choice {flex:1;min-width:0;padding:7px 5px!important;gap:5px;font-size:11px!important;}
  #gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-refresh {padding:7px 8px!important;font-size:11px!important;}
}
@media(max-width:420px){
  #gallery-view #tf-gallery-notes-filter .tf-gallery-notes-filter-actions {flex-direction:column;align-items:stretch;}
  #gallery-view #tf-gallery-notes-filter .tf-gallery-notes-filter-group {width:100%;}
  #gallery-view #tf-gallery-notes-filter button.tf-gallery-notes-filter-refresh {width:100%;}
}

/* Final rule: override the earlier `margin:16px 0 14px!important` shorthand. */
#gallery-view #tf-gallery-notes-filter {
  margin-left:auto!important;
  margin-right:auto!important;
}
