/*!
 * Suyder Cogge beeldbank – stijl voor de zoekwidget
 * Alles staat onder .scz / .scz-dialog, zodat het niet botst met het WordPress-thema.
 * Kleuren aanpassen? Overschrijf de variabelen hieronder, bv. in het thema:
 *   .scz, .scz-dialog { --scz-accent: #8a2d1f; }
 */

.scz,
.scz-dialog {
  /* Huisstijl van www.beeldbanksuydercogge.nl/wp/ */
  --scz-accent: #2f6b43;          /* green */
  --scz-accent-hover: #1d4529;    /* green-deep */
  --scz-accent-text: #f6f2e6;     /* crème tekst op knoppen */
  --scz-text: #20231c;            /* ink */
  --scz-muted: #575a4e;
  --scz-surface: #ffffff;
  --scz-subtle: #f1eee4;          /* panel */
  --scz-dialog-bg: #e7e3d6;       /* paper: achtergrond van het fotovenster */
  --scz-border: #d8d2bf;          /* iets donkerder dan paper */
  --scz-radius: 8px;
  --scz-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  --scz-focus: 0 0 0 3px rgba(47, 107, 67, 0.35);
}

.scz {
  color: var(--scz-text);
  font: inherit;
  line-height: 1.5;
  margin-block: 1.5rem;
}

.scz *,
.scz-dialog * {
  box-sizing: border-box;
}

.scz-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- zoekbalk ---------- */

.scz-form {
  display: flex;
  gap: 0.5rem;
  max-width: 44rem;
  margin: 0 auto;
}

.scz-input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 1rem;            /* voorkomt inzoomen op iPhone */
  padding: 0.75rem 1rem;
  color: var(--scz-text);
  background: var(--scz-surface);
  border: 1px solid var(--scz-border);
  border-radius: var(--scz-radius);
}

.scz-input:focus {
  outline: none;
  border-color: var(--scz-accent);
  box-shadow: var(--scz-focus);
}

.scz-button {
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  color: var(--scz-accent-text);
  background: var(--scz-accent);
  border: 0;
  border-radius: var(--scz-radius);
  cursor: pointer;
  min-height: 44px;
}

.scz-button:hover {
  background: var(--scz-accent-hover);
}

.scz-button:focus-visible {
  outline: none;
  box-shadow: var(--scz-focus);
}

.scz-button-secondary {
  color: var(--scz-accent);
  background: transparent;
  border: 1px solid var(--scz-accent);
  font-weight: 500;
}

.scz-button-secondary:hover {
  color: var(--scz-accent-text);
}

.scz-collections {
  max-width: 44rem;
  margin: 0.5rem auto 0;
}

.scz-collections[hidden] {
  display: none;
}

.scz-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  max-width: 44rem;
  margin: 0.5rem auto 0;
}

@media (max-width: 480px) {
  .scz-filters {
    grid-template-columns: 1fr;
  }
}

.scz-filters[hidden],
.scz-select[hidden] {
  display: none;
}

.scz-select {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 1rem;            /* voorkomt inzoomen op iPhone */
  padding: 0.6rem 0.75rem;
  min-height: 44px;
  color: var(--scz-text);
  background: var(--scz-surface);
  border: 1px solid var(--scz-border);
  border-radius: var(--scz-radius);
}

.scz-select:focus {
  outline: none;
  border-color: var(--scz-accent);
  box-shadow: var(--scz-focus);
}

.scz-select:disabled {
  color: var(--scz-muted);
}

.scz-status {
  text-align: center;
  color: var(--scz-muted);
  margin: 0.75rem 0 1.25rem;
  min-height: 1.5em;
}

.scz-loading .scz-status::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-left: 0.4em;
  border-radius: 50%;
  background: currentColor;
  animation: scz-blink 1.2s infinite;
}

@keyframes scz-blink {
  50% { opacity: 0.2; }
}

/* ---------- resultaten ---------- */

.scz-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 1rem;
}

.scz-grid > li {
  margin: 0;
  padding: 0;
}

.scz-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  background: var(--scz-surface);
  border: 1px solid var(--scz-border);
  border-radius: var(--scz-radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--scz-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scz-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.scz-card:focus-visible {
  outline: none;
  box-shadow: var(--scz-focus);
}

.scz-card-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--scz-subtle);
}

.scz-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scz-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem 0.75rem;
}

.scz-card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--scz-accent);
}

.scz-card-title {
  font-size: 0.9rem;
  overflow-wrap: break-word;
}

.scz-more-wrap {
  text-align: center;
  margin-top: 1.5rem;
}

/* ---------- detailvenster ---------- */

.scz-dialog {
  width: min(64rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--scz-radius);
  color: var(--scz-text);
  background: var(--scz-dialog-bg);
  line-height: 1.5;
}

.scz-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.scz-no-scroll,
.scz-no-scroll body {
  overflow: hidden;
}

.scz-dialog-inner {
  position: relative;
  padding: 1.25rem;
}

.scz-dialog-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--scz-text);
  background: var(--scz-subtle);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.scz-dialog-close:focus-visible {
  outline: none;
  box-shadow: var(--scz-focus);
}

.scz-dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.5rem;
  align-items: start;
}

.scz-dialog-media {
  text-align: center;
}

.scz-dialog-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--scz-radius);
  cursor: zoom-in;
}

.scz-dialog-title {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 2.5rem 0.75rem 0;
}

.scz-description {
  white-space: pre-line;
  margin: 0 0 1rem;
}

/* "Zie ook"-fotonummer: knop die eruitziet als een link */
.scz-ref {
  display: inline;
  padding: 0;
  font: inherit;
  color: var(--scz-accent);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.scz-ref:hover {
  color: var(--scz-accent-hover);
}

.scz-ref:focus-visible {
  outline: none;
  border-radius: 2px;
  box-shadow: var(--scz-focus);
}

.scz-ref:disabled {
  cursor: progress;
}

.scz-dialog-title:focus {
  outline: none;
}

.scz-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  background: var(--scz-subtle);
  border-radius: var(--scz-radius);
}

.scz-meta dt {
  font-weight: 600;
}

.scz-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.scz-dialog-extras > * + * {
  margin-top: 0.75rem;
}

.scz-extra-label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.scz-extra-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scz-extra-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.scz-extra-ref {
  font-size: 0.85rem;
  min-height: 24px;
}

.scz-extra-thumb {
  padding: 0;
  border: 1px solid var(--scz-border);
  border-radius: 6px;
  background: var(--scz-subtle);
  cursor: pointer;
  overflow: hidden;
}

.scz-extra-thumb img {
  display: block;
  width: 5rem;
  height: 5rem;
  object-fit: cover;
}

.scz-map,
.scz-video iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--scz-radius);
}

.scz-map {
  height: 16rem;
}

.scz-video {
  aspect-ratio: 16 / 9;
}

.scz-video iframe {
  height: 100%;
}

/* volledig scherm (klik op de foto) */
.scz-dialog.scz-fullscreen {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  background: #000;
}

.scz-fullscreen .scz-dialog-inner {
  height: 100%;
  padding: 0;
}

.scz-fullscreen .scz-dialog-body {
  display: block;
  height: 100%;
}

.scz-fullscreen .scz-dialog-text {
  display: none;
}

.scz-fullscreen .scz-dialog-media {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scz-fullscreen .scz-dialog-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  cursor: zoom-out;
}

/* ---------- telefoon ---------- */

@media (max-width: 700px) {
  .scz-form {
    flex-direction: column;
  }

  .scz-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .scz-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .scz-dialog-inner {
    padding: 3.25rem 1rem 1.5rem;
  }

  .scz-dialog-body {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .scz-dialog-image {
    max-height: 55vh;
  }

  .scz-dialog-title {
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scz-card,
  .scz-loading .scz-status::after {
    transition: none;
    animation: none;
  }
}
