.search-wrap {
    border: 1px solid var(--sm-lijn);
    position: relative;
    box-shadow: 0 1px 8px -3px rgba(0, 102, 102, .22);
    width: 900px;
    margin-top: 50px;
    margin-bottom: 50px;
    transition: max-height 0.3s ease;
}

.search-heading {
    display: flex;
    justify-content: center;
    padding: 20px 0;
    font-size: 3em;
}

.search-heading h3 {
    font-size: 0.7em;
}

.search-arrow {
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
}

.search-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.field-date {
    display: flex;
    align-items: center;
    gap: 5%;
}

.tooltip-right-trefwoorden {
    position: absolute;
    right: 0;
    top: -30px;
}

.search-fields {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 0 50px 30px 50px;
}

#editorial-search-box {
    gap: 50px;
}

.search-container.opened {
    max-height: 700px;
}

.search-container.tuchtrecht-search-box.opened {
    max-height: 900px;
}

.search-container.voorouders-search-box.opened {
    max-height: 300px;
}

.search-fields-row {
    display: flex;
    flex-direction: row;
    gap: 10%;
}

.search-fields-row:first-child {
    align-items: flex-end;
}

.search-fields-row-single {
    display: flex;
    justify-content: center;
}

.search-field {
    width: 45%;
    font-size: 20px;
    position: relative;
}

.search-field input, .search-field select {
    width: 100%;
    padding: 3px 30px 3px 15px;
    border: 1px solid var(--sm-rand);
}

.search-field select {
    appearance: none; /* Remove default styling */
    -webkit-appearance: none; /* Safari support */
    -moz-appearance: none; /* Firefox support */
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23000000' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 13px center;
    background-size: 20px 10px;
}

.search-boolean {
    display: flex;
    align-items: center;
}

.search-boolean label {
    text-decoration: underline dotted;
    font-size: 18px;
}

.search-boolean input {
    width: 18px;
}

.search-button {
    width: 100%;
    border-radius: 2px;
    border: 1px solid var(--sm-accent);
    background-color: var(--sm-accent);
    color: var(--sm-wit);
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background-color .2s ease, color .2s ease;
    height: 40px;
}

.search-cards{
    display: flex;
    flex-wrap: wrap;
    gap: 4%;
}

.search-card-outer {
    width: 30%;
    margin-bottom: 40px;
    box-shadow: 0 1px 8px -3px rgba(0, 102, 102, .16);
    height: fit-content;
}

.search-card-above {
    border: 1px solid var(--sm-lijn);
    border-bottom: none;
    background-color: var(--sm-papier);
    padding: 10px 20px;
}
.search-card-above h6 {
    margin: 0;
}

.search-card{

    padding: 20px 20px;
    background-color: var(--sm-wit);
    border: 1px solid var(--sm-lijn);
    height: fit-content;

    display: flex;
    flex-direction: column;
    position: relative;
    gap: 15px;
}

.search-card a {
    text-overflow: ellipsis;
    overflow: hidden;
}


.search-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.search-card .search-card__onderwerp {
    -webkit-line-clamp: 2;
    font-size: 12px;
    line-height: 1.4;
}

.voorouders .search-card p {
    display: block;
}

.search-card h4, .search-card p {
    text-align: left;
    margin-bottom: 0;
}

.search-card .btn-meer {
    background-color: transparent;
    border-radius: 2px;
    border: 1px solid var(--sm-rand);
    color: #5b554b;
    transition: all 0.3s ease;
    padding: 3px 8px;
}

.search-card button:hover {
    background-color: #fff;
}


.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.search-popup {
    background: white;
    border: 2px solid black;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    position: fixed;
    z-index: 2;

    padding: 20px 20px;
    max-height: 600px;
    overflow-y: auto;
}


.tooltip-content {
    display: none;
    position: absolute;
    background-color: var(--sm-inkt);
    color: #fff;
    padding: 8px;
    right: 0;
    border-radius: 2px;
    font-size: 12px;
    z-index: 1000;
    min-width: 300px;
    word-wrap: break-word;
}

.tooltip-content.show {
    display: block;
}

.tooltip-block .fa-question-circle-o {
    cursor: pointer;
}

.overlay,
.search-popup {
    visibility: hidden;
    animation: fadeOut 0.5s ease-in-out forwards;
    transition: visibility 0.5s ease-in-out;
}

.show {
    visibility: visible;
    animation: fadeIn 0.5s ease-in-out forwards;
}


@-webkit-keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity:1 ;}
}
@-webkit-keyframes fadeOut {
    from {opacity: 1;}
    to {opacity: 0;}
}
@keyframes fadeOut {
    from {opacity: 1;}
    to {opacity:0 ;}
}

.search-popup-header {
    display: flex;
    justify-content: space-between;
}

.search-popup-header > div {
    display: flex;
    justify-content: end;
    height: fit-content;
}

.search-popup-header > div > a {
    display: flex;
    align-items: center;
}

@media screen and (max-width: 750px){
    .search-popup-header {
        flex-direction: column-reverse;
    }
}

.search-popup-header h1 {
    overflow-wrap: break-word;
}

.search-dropdown-button {
    position: absolute;
    right: 15px;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    cursor: pointer;
}

.search-dropdown {
    position: absolute;
    z-index: 4;
    top: 100%;
    list-style-type: none;
    max-height: 0;
    transition: 0.2s ease;
    overflow: auto;
    padding-left: 0;
    border-radius: 2px;
    width: 100%;
    background-color: #fff;
}

.search-dropdown li {
    padding: 0 15px;
    border-bottom: 1px solid var(--sm-lijn-fijn);
}
.search-dropdown li:last-child {
    border-bottom: none;
}

.search-dropdown li:hover {
    background-color: var(--sm-papier);
    cursor: pointer;
}

.search-dropdown-active {
    max-height: 95px;
    border: 1px solid var(--sm-rand);
}

@media screen and (max-width: 768px) {
    .search-fields {
        padding: 0 10px 30px 10px;
    }
}


@media screen and (max-width: 576px) {
    .search-wrap {
        width: initial;
        margin: 50px 20px;
    }

    .search-container.opened {
        max-height: 1100px;
    }

    .search-container.tuchtrecht-search-box.opened {
        max-height: 1150px;
    }

    .search-container.voorouders-search-box.opened {
        max-height: 500px;
    }

    .row-reversed {
        flex-direction: column-reverse !important;
    }

    .search-fields-row {
        flex-direction: column;
        align-items: center !important;
        gap: 20px;
    }

    .search-field {
        width: 100%;
    }

    .search-fields {
        gap: 20px;
    }

    #editorial-search-box {
        gap: 20px;
    }

    .tooltip-right-trefwoorden {
        right: 0;
        top: -30px;
    }

    .tooltip-content {
        min-width: 250px;
    }
}

@media screen and (max-width: 992px) {


    .search-cards{
        gap: 10px;
        padding: 0 20px;
    }

    .search-card-outer {
        width: 100%;
        margin-bottom: 15px;
    }
}

.blur-buy-container {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /*background-color: rgba(255, 255, 255, 0.2);*/
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 1));
}

/* Het blok met bruine uitzonderingen voor Voorouders stond hier. Dat is op
   2 oktober 2026 vervallen: Voorouders valt nu onder Iustitia Scripta en
   gebruikt dezelfde accentkleur als de andere drie. De regels die over
   indeling gingen (max-height, display) zijn blijven staan. */

#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    font-size: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .search-arrow {
        width: 24px !important;
        height: 24px !important;
        margin: 10px auto 0 !important;
    }
    #heading-search {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    .search-heading .text-center h3.d-sm-block {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    .search-heading .text-center div[style*="display:flex"] {
        flex-wrap: wrap !important;
        justify-content: center !important;
        text-align: center !important;
    }
    .search-heading .text-center a[href*="disclaimer"] {
        width: 20px !important;
        height: 20px !important;
        font-size: 12px !important;
    }
    .search-heading .text-center p {
        font-size: 0.65rem !important;
    }
}
@media (max-width: 480px) {
    .search-arrow {
        width: 20px !important;
        height: 20px !important;
    }
    #heading-search {
        font-size: 1rem !important;
    }
    .search-heading .text-center h3.d-sm-block {
        font-size: 1rem !important;
    }
}
/* Toegevoegd bij het omzetten naar de huisstijl, 2 oktober 2026. */
.search-button:hover {
    background-color: var(--sm-wit);
    color: var(--sm-accent);
}

.search-card .btn-meer:hover {
    background-color: var(--sm-accent);
    border-color: var(--sm-accent);
    color: var(--sm-wit);
}

/* De twee knoppen onder het zoekformulier hadden allebei de Bootstrap-klasse
   text-black. Die zet de kleur met !important en overschreef dus het wit dat
   hierboven staat: donkergroene knop met zwarte letters. Die klasse is op
   2 oktober 2026 uit de vier zoeksjablonen gehaald.

   Meteen ook de rangorde hersteld. "Zoeken" is waar het om gaat en blijft
   gevuld; "Opnieuw" is een bijrol en wordt omlijnd, zoals de knoppen elders
   op het platform. */
button[type="button"].search-button {
    background-color: transparent;
    border-color: var(--sm-rand);
    color: #5b554b;
}

button[type="button"].search-button:hover {
    background-color: var(--sm-accent);
    border-color: var(--sm-accent);
    color: var(--sm-wit);
}
