
.search-box {
    padding: 1rem 1rem 0 1rem;
}

.formline.buttons {
    padding: 0 1rem 1rem 1rem;
}

#search-block {
    background-color: #fafafa;
}

#search-filters input[type="text"] {
    padding: 0.55rem 0.75rem;
}

#search-filters {
    transition: all 0.5s ease-in-out;
    max-height: 200vh;
    padding-bottom: 1rem;
}

#search-filters.collapsed {
    padding-bottom: 0;
    max-height: 0;
}

#search-filters .formline.conex-positions {
    max-height: 0px;
    opacity: 0;
    pointer-events: none;
    transition: all 200ms ease-in-out 0s;
}

#search-filters.conectios-by-position .formline.conex-positions {
    max-height: 120px;
    opacity: 1;
    pointer-events: all;
}

#search-filters.conectios-by-position .form-ctrl.conections {
    flex-shrink: 10;
}

#search-filters.conectios-by-position .form-ctrl.conections label span,
#search-filters.conectios-by-position .form-ctrl.conections .input {
    display: none;
}

#search-filters.conectios-by-position .form-ctrl.conections label .fa-solid {
    transition: margin-top 200ms ease-in-out 0s;
}

i.fa-2x.fa-square-minus {
    margin-top: 32px;
}

#search-toggle-btn {
    font-size: 1.25rem;
    font-weight: bold;
    background: rgba(124,75,34,1);
    color: white;
    width: 100%;
    display: flex;
    align-content: center;
    justify-content: center;
}

#search-toggle-btn .astra-icon-down_arrow {
    display: inline-block;
    transition: transform 0.3s ease-in-out;
    transform: rotate(0deg);
    margin-right: 0.5rem;
}

#search-toggle-btn.open .astra-icon-down_arrow {
    transform: rotate(-180deg);
}

.search-box .formline {
    display: flex;
    flex-direction: column;
}

.search-box .formline .form-ctrl {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.search-box .formline .form-ctrl label {
    white-space: nowrap;
}

.search-box .formline .form-ctrl input,
.search-box .formline .form-ctrl select {
    width: 100%;
}

/* Remove a seta nativa feia e colada e aplica um estilo limpo */
.search-box .formline .form-ctrl select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2rem; /* Espaço para a nova seta não colar no texto */
    
    /* Adiciona uma setinha moderna usando SVG direto no CSS (base64/encoded) */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.search-box .formline.buttons {
    justify-content: space-between;
    margin: 0 0.4rem;
    margin-top: 1.2rem;
    padding-top: 0.6rem;
    border-top: 1px solid #666;
}

.search-box .formline.buttons input {
    width: auto;
    margin: 0;
    margin-left: 0.4rem;
    text-transform: none;
}

/* Formline */
.elementor-shortcode .formline.buttons {
    justify-content: space-between;
}

.elementor-shortcode .formline.buttons .right {
    display: flex;
    justify-content: end;
    align-items: center;
}

.elementor-shortcode .formline.buttons .right a {
    padding-right: 1rem;
    padding-left: 1rem;
}

.elementor-shortcode .formline.buttons input {
    width: auto;
    margin: 0;
    margin-left: 0.4rem;
    text-transform: none;
}

.search-box .formline input:hover {
    background-color: #e9e9e9;
}

.formline.buttons .l2-button {
    background-color: rgba(0,0,0,0);
    border-width: 0;
    color: #666;
    padding: 0;
    height: 1rem;
    text-transform: none;
}

.formline.buttons .arrow {
    display: inline-block;
    width: 0; 
    height: 0; 
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #666;
    margin-right: 0.5rem;
}

.l2-open+.formline.buttons .arrow {
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #666;
}

.formline.buttons .hide-l2 {
    padding: 12px 0;
    display: flex;
    flex-direction: row;
}
/* End Formline */

/* Posts List */
.cs-posts-list {
    width: 100%;
    margin: 0 auto;
    display: grid;
    /* grid-template-columns: calc(50% - 0.5rem) calc(50% - 0.5rem); */
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 1rem;
}

.cs-post-item {
    transition: all 0.25s ease-in-out;
    cursor: pointer;
    color: #653119;
    padding: 1rem;
    border-radius: 0.25rem;
    text-align: center;
}
.cs-post-item:hover {
    opacity: 1;
    transform: scale(1.025);
    box-shadow: 0 2px 1rem rgb(0 0 0 / 5%);
}
.cs-post-item figure {
    width: 100%;
    margin: auto !important;
}
.cs-post-item figure img {
    width: 100%;
    height: auto;
}

.cs-post-item p {
    line-height: 1.25rem;
    margin-bottom: 0;
}

.cs-post-item p span.parte_corpo {
    font-size: .75rem;
    line-height: 0.5rem;
}

.pagination {
    text-align: center;
    margin-top: 20px;
    display: block;
    width: 100%;
}

.pagination .pagination-item {
    text-decoration: none !important;
    font-family: inherit;
    font-size: 18px;
    color: #666;
    padding: 2px 8px;
    margin: 2px;
    border: 1px solid transparent;
}

.pagination .pagination-item.disabled {
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.pagination .pagination-item.current {
    border-color: #efefef;
    font-weight: bold;
}

.pagination .pagination-item:hover {
    border-color: #efefef;
    box-shadow: 0 2px 0.5rem rgb(0 0 0 / 5%);
}


@media screen and (min-width: 782px) {
    .search-box .formline .form-ctrl {
        /* margin-right: 1rem; */
        width: 100%;
    }

    .search-box .formline .form-ctrl input,
    .search-box .formline .form-ctrl select {
        width: 100%;
    }

    .search-box .formline {
        flex-direction: row;
        gap: 1rem;
        justify-content: space-between;
    }

    .search-box.hidden-l2.l2-open .formline:nth-child(2) {
        max-height: 150px;
    }

    .cs-posts-list {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        grid-column-gap: 1rem;
    }

    #search-toggle-btn {
        display: none;
    }
    #search-filters.collapsed {
        padding-bottom: 0;
        max-height: 120vh;
    }
}



@media screen and (max-width: 781px) {
    #search-filters {
        opacity: 1;
        transition: max-height 320ms ease-in-out 0s, opacity 200ms ease-in-out 400ms;
    }
    
    #search-filters.collapsed {
        opacity: 0;
        pointer-events: none !important;
        transition: max-height 320ms ease-in-out 0s, opacity 200ms ease-in-out 0s;
    }
    
    #search-filters.collapsed * {
        pointer-events: none !important;
    }
    #search-filters.conectios-by-position .formline.conex-positions {
        max-height: 350px;
    }
}

/* só busca por nome para comandos */
body.page-id-6126 .search-box .form-ctrl:last-child,
body.page-id-6126 .search-box .formline {
	display: none;
}
body.page-id-6126 .search-box .formline:first-child,
body.page-id-6126 .search-box .formline.buttons {
	display: flex;
}