/* ==========================================================================
   zoeken.css — 1.1.0
   Auteur: Rik Spreen
   Laatste update: 11-01-2026
   ========================================================================== */

body.zoeken-open {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  touch-action: none;
}

input, textarea {
  touch-action: manipulation;
}

#spreen-overlay {
    position: fixed;
    top: 2.4rem;
    left: 0;
    right: 0;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.65);
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    display: flex;
	align-items: center;
    justify-content: center;
    overflow: hidden;
}

#spreen-overlay.visible {
  opacity: 1;
  visibility: visible;
  z-index: 200;
}

#spreen-resultaten {
  width: 95%;
  max-width: 960px;
  max-height: 70vh;
  box-sizing: border-box;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  background: #9dc9d3;
  padding: 0;
  border: 3px solid var(--spreen-kleur-border);
  border-radius: .5rem;
  overflow: hidden;
}

#spreen-resultaten.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-height: 700px) {
  #spreen-overlay {

  }
}

.popup-header-zoeken {
    display: flex;
    position: sticky;
    gap: .5rem;
    z-index: 120;
    top: 0;
    padding: .2rem 0 .1rem .5rem;
    border-bottom: 3px solid var(--spreen-kleur-border);
    background-color: var(--spreen-kleur-menubalk);
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.20);
}

.popup-header-zoeken h1,
.popup-header-zoeken .fa-magnifying-glass {
  color: var(--spreen-kleur-licht); 
}

.popup-header-zoeken h1 {
  padding: .2rem 0;
  margin: 0;
  font-size: 1.6rem;
}

.popup-header-zoeken .fa-magnifying-glass {
  font-size: larger;
}

.sub-header-zoeken h3 {
    font-size: large;
    padding: .3rem;
    background-color: var(--spreen-kleur-licht);
    border-bottom: 2px solid var(--spreen-kleur-border);
    z-index: 110;
    top: 0;
    margin: 0;
    border-top: none;
    position: sticky;
    display: flex;
    justify-content: center;
    gap: .3rem;
}

.sub-header-zoeken{
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.20);
}

#spreen-close {
  z-index: 200;
  position: absolute;
  right: 0;
}

/* ✅ Scrollbare inhoud onder sticky header */
.popup-content-wrapper {
  max-height: calc(70vh - 3rem);
  overflow-y: auto;
  padding: 2rem 1rem;
  margin: -1rem 0;
	scrollbar-color: var(--spreen-kleur-border) var(--spreen-kleur-licht);
	scroll-behavior: smooth;
	scrollbar-width: thin;
}

/* WebKit (Chrome, Safari, Edge) */
.popup-content-wrapper::-webkit-scrollbar {
  width: 6px;
}

.popup-content-wrapper::-webkit-scrollbar-track {
  background: #cfb3bc;
}

.popup-content-wrapper::-webkit-scrollbar-thumb {
  background-color: #a35d75;
  border-radius: 3px;
}

.zoekresultaten-header {
  border-bottom: 2px solid #b2788e;
  margin: -1rem -2rem 1rem;
  padding: 0 2rem 1rem;
}

/* Zoekresultaten grid */
.zoekresultaten {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 10px;
  margin-bottom: 5rem;
}

/* De tegels */

.zoekresultaat-item h3{
	font-size: larger;
	min-height: 3rem;
}

.zoekresultaat-item{  
	border: 1px solid var(--spreen-kleur-border);
    padding: 1rem;
    border-radius: .5rem;
    margin: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    width: 100%;
    box-sizing: border-box;
	background: linear-gradient(to top, rgba(190,229,237,0), var(--spreen-kleur-licht));
}

.zoekresultaat-body{
    display: flex;
	gap: 2rem;
}

.zoekresultaat-body p{
	margin: 1rem 0;
}

.zoekresultaat{	
    flex-direction: row;
    gap: 1rem;   
}

.zoekresultaat-thumb {
    width: 150px;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: .5rem;
}

.spreendetails-zoeken-blok{
	text-align: left;
}

.spreendetails-zoeken{
	margin-bottom: 1rem;
}

/* ✅ Responsive */
@media (max-width: 768px) {
  .zoekresultaten {
    grid-template-columns: 1fr;
    padding: 0;
  }
  
  .zoekresultaat-body{
	 flex-direction: column;
	 padding: 1rem 1rem 0;
	 text-align: center;
	 margin: 0;
  }

  .zoekresultaat-thumb {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: 1rem;
  }

  
}

/* ✅ Overige */
span.tags,
span.cats,
span.type-label {
  display: none;
}

a.suggestie-link{
	margin: 1rem 0 !important;
	font-size: larger !important;
}