/*
 Theme Name:   Hello Elementor Child
 Template:     hello-elementor
 Version:      1.0.3
 Text Domain:  hello-child
*/
.filter-group {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.filter-toggle {
    background: #f7f7f7;
    padding:5px 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-options {
    padding: 10px;
    display: block; /* По замовчуванню показані */
    overflow: hidden;
    max-height: 100vh;
}
.filter-options.hidden{
    max-height: 0;
    transition: .3s;
}
.filter-group.collapsed .filter-options {
    display: none;
}

.filter-group.collapsed .filter-toggle::after {
    content: ' ►';
}
.open-document-popup{
    background: #1B968F;
    color: white!important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 7px;
    gap: 6px;
    border-radius: 5px;
}
.hidden{
    display: none;
}
.documents-pagination{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}
.documents-pagination a{
    font-weight: bold;
    padding: 6px 12px;
    font-weight: bold;
    outline: 1px solid #1B968F;
    background: transparent;
    color: #1B968F !important;
    border-radius: 5px;
    transition: .5s;
}
.documents-pagination a.active-page{
    color: white !important;
    outline: 1px solid transparent;
    background: #1B968F;
    transition: .5s;
}
.documents-pagination a:hover{
    transform: scale(1.05);
    transition: .5s;
}
#reset-filters{
display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
    color: white!important;
    background: #ef0000!important;
    transition: .3s;
}
#reset-filters:hover {
transform: scale(1.05);
    color: white!important;
    background: #ef0000!important;
    transition: .3s;
}
.search-prod{
    position: relative;
}
.search-prod input{
    padding-left: 38px!important;
    border-radius: 5px!important;
}
.search-prod svg{
    position: absolute;
    left: 10px;
    top: 13px;
}
.loader-table {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3; /* фон лоадера */
    border-top: 4px solid #1B968F; /* кольоровий сегмент */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto; /* центрування по горизонталі */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.btn-td{
    padding: 5px 10px!important;
}
.link-doc{
    background: #1B968F !important;
    color: white !important;
    padding: 6px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 30px;
    border-radius: 5px;
}
.filters form{
    position: sticky;
    top: 19px;
}

@media screen and (max-width: 991px) {
    .documents-wrapper{
        display: grid;
        grid-template-columns: 1fr!important;
    }
    .results table {
        width: 100%;
        border-collapse: collapse;
    }

    .results thead {
        display: none; /* Приховуємо заголовок таблиці */
    }

    .results tbody tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 10px;
        background-color: #fff;
    }

    .results tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 17px 17px;
        position: relative;
        flex-wrap: wrap;
        border: 0;
        background: transparent !important;
        border-bottom: 1px dashed gray;
    }
    .results tbody tr td:last-child{
        border-bottom: 0px dashed gray;
    }
    .results tbody tr td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #1B968F; /* Можеш змінити колір підписів */
        flex: 0 0 130px;
    }
    .results tbody tr td:first-child::before{
        content: none;
    }
    .results tbody tr td:first-child{
        font-weight: 600!important;
        font-size: 21px!important;
    }


    .results tbody tr td:last-child::before{
        content: none;
    }
    /* Приховати SVG (іконку) з кнопки і зробити її читабельною */
    .results tbody tr td.btn-td {
        justify-content:center;
    }
    .open-document-popup {
        background: #1B968F;
        color: white !important;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 7px;
        gap: 6px;
        width: 100%;
        margin-top: 12px;
        border-radius: 5px;
    }
}
