.fkp-db-results {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.fkp-db-results .blackBackground {
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.098);
    height: 100vh;
    width: 100vw;
    display: none;
    z-index: 10;
}

.fkp-db-results .label {
    margin-bottom: 10px;
}

.fkp-db-results .container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 3fr 2fr;
    column-gap: 10px;
    position: relative;
}

.fkp-db-results .classes-frame {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 220px;
}

.fkp-db-results .inside-foifs-frame {
    display: flex;
    width: 100%;
    flex-direction: column;
    overflow-y: auto;
}

.fkp-db-results .classes-frame-header {
    height: 40px;
    min-height: 40px;
    display: flex;
    background-color: #154279;
    align-items: center;
    width: 100%;
    padding-right: 14px;
    padding-left: 14px;
}

.fkp-db-results .classes-frame-header  h5 {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
}

.fkp-db-results .filters-frmae,
.fkp-db-results .download-struct-frame  {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 8px;
    border-left: 1px solid #91B1D8;
    border-right: 1px solid #91B1D8;
    padding: 5px;
    transition: grid-template-columns 0.3s ease;
    padding-bottom: 2px;
}

.fkp-db-results .download-button.download-button-disabled {
    opacity: 0.8;    
    pointer-events: none;
}

.fkp-db-results .download-struct-frame:has(.download-button.download-button-disabled) {
    cursor: not-allowed;
}

.fkp-db-results .download-button .loading-indicator {
    display: none;
}

.fkp-db-results .download-button.loading .download-all-struct-button {
    display: none;
}

.fkp-db-results .download-button.loading .loading-indicator {
    display: block;
}

.download-all-struct-text {
    width: 100%;
    display: flex;
    align-items: center;
    /* padding-left: 4px; */
    padding-left: 10px;
    /* color: #707070; */
    color: #151515;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 120%;
}

.download-all-struct-text {
    font-size: 12px;
    font-weight: 400;
}

.download-all-struct-button-frame {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-all-struct-button-frame img {
    cursor: pointer;
}

.download-all-struct-button-frame img {
    height: 18px;
    width: 18px;
}

.download-all-struct.hidden,
.download-struct-foif.hidden {
    display: none;
}

.download-all-struct,
.download-struct-foif {
    background-color: #F6BF41;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    height: 34px;
    width: 100%;
    margin: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0.2s ease, height 0.2s ease, margin-top 0.2s ease, margin-bottom 0.2s ease;
    box-shadow: 0 1px 1px 1px #d0d0d0;
    cursor: pointer;
}

.fkp-db-results .filters-frmae:has(.fkp-db-results-org-filter-block.hidden) {
    grid-template-columns: 1fr 0fr;
    column-gap: 0px;
}

.fkp-db-results .download-struct-frame:has(.download-struct-foif.hidden) {
    grid-template-columns: 1fr 0fr;
    column-gap: 0px;
}

.fkp-db-results .fkp-db-results.search-frame {  
    display: flex;
    width: 100%;
    position: relative;
}

.fkp-db-results .fkp-db-results-org-filter-block {
    background-color: #E7E7E7;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    height: 34px;
    width: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 1px 1px #d0d0d0;
    margin: 0;   
}

.fkp-db-results .fkp-db-results-search-form {
    display: flex;
    flex-direction: row;
    background-color: white;
    border-radius: 8px;
    height: 34px;
    overflow: hidden;
    width: 100%;
    box-shadow: 0 1px 1px 1px #d0d0d0;
}

.fkp-db-results-org-filter-block.hidden {
    display: none;
}

.fkp-db-results .org-item {
    display: flex;
    flex-direction: column;
    min-height: 100px;
    border: 1px solid #D9D9D9;
    color: #151515;
    cursor: pointer;    
    padding: 6px 0px 6px 0px;
    border-radius: 1px solid #DEE8F3;
    gap: 6px;
}

.fkp-db-results .simple-org-item {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.fkp-db-results .org-item .simple-org-item {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.fkp-db-results .org-item.selected .simple-org-item  {
  /* visibility: hidden;
  opacity: 0;
  height: 0px; */
}

.fkp-db-results .org-item-img-frame {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fkp-db-results .org-item.hidden {
    display: none;
}

.fkp-db-results .org-item .cgop.hidden {
    display: none;
}

.fkp-db-results .org-logo-fkp {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0px 20px;
}

.fkp-db-results .main-info-frame {
    display: flex;
    flex-direction: column;
    width: fit-content;
    gap: 10px;
    padding: 10px 0px;
}

.fkp-db-results .classes-line-chart-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.fkp-db-results .classes-line-chart-frame .classes-line-chart-label {
    font-size: 12px;
    font-weight: 600;
    color: #722B14;
    line-height: 100%;
}

.fkp-db-results .classes-line-chart-frame .classes-line-chart {
    display: flex;
    position: relative;
    width: 244px;
    min-height: 8px;
    max-height: 8px;
    border-radius: 3px;
    background-color: #D9D9D9;
}

.fkp-db-results .classes-line-chart-frame .classes-line-chart-inside {
    position: absolute;
    box-shadow: 0px 1px 3px 1px #00000026, 0px 1px 2px 0px #0000004D;
    background-color: #339747;
    border-radius: 2px;
    top: -2px;
    min-height: 12px;
    max-height: 12px;
}

.fkp-db-results .org-item .right-side-item {
    display: flex;
    flex-direction: row;
    justify-content: end;
}

.fkp-db-results .org-item .main-cgop-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-bottom: 6px;
}

.fkp-db-results .org-item .cgop-label {
    font-size: 12px;
    color: #722B14;
    font-weight: 600;
    line-height: 120%;
    text-align: end;
}

.fkp-db-results .org-item .cgop-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin: 0px 8px;
}

.fkp-db-results .org-item.selected {
    box-shadow: 0px 1px 2px 0px #00000040;
    background-color: #DEE8F3;
}

.fkp-db-results .org-item:hover {
    box-shadow: 0px 1px 2px 0px #00000040;
    background-color: #DEE8F3;
}

.fkp-db-results .org-item-label-frame { 
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    font-weight: 600;
    line-height: 100%;
    letter-spacing: 0%;
    font-size: 18px;
    text-align: center;
}

.fkp-db-results .orgsGrid {
    display: grid;
    height: max-content;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
}

.fkp-db-results .data-as-tables-frame-wrapper-relative {
    display: flex;
    position: relative;
    height: 100%;
    margin-top: 20px;
    display: none;
    min-height: 520px;
}

.fkp-db-results .data-as-tables-frame-wrapper-relative:has(.data-as-table-child) {
    display: flex;
}

.fkp-db-results .data-as-tables-frame-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #DEE8F3;    
    position: absolute;
}

.fkp-db-results .data-as-table-frame.nops {
    height: 100%;
    width: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    border: 1px solid #DEE8F3;
    margin-top: 20px;
    margin-left: 20px;
    min-height: 250px;
    border-bottom: none;
    flex-shrink: 10;
    display: none;
}

.fkp-db-results .data-as-table-frame.nops:has(.data-as-table-child) {
    display: flex;
}

.fkp-db-results .data-as-table-frame.nops .data-as-table-name {
    background-color: #91B1D8;
} 

.data-as-table-child {
    cursor: pointer;
}

.data-as-table-child.selected {
    background-color: #DEE8F3;
} 

.fkp-db-results .data-as-table-frame {
    display: none;
    flex-direction: column;
    font-size: 12px;
    line-height: 150%;
}

.fkp-db-results .data-as-table-frame:has(.data-as-table-child) {
    display: flex;
}

.fkp-db-results .data-as-table-frame .data-as-table-name {
    font-weight: 700;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.fkp-db-results .data-as-table-frame .data-as-table-child {
    padding: 10px;
}

.fkp-db-results .data-as-table-frame .data-as-table-label {
    padding: 10px;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.fkp-db-results .data-as-table-frame.sfo {
    overflow-y: auto;
    min-height: 250px;
    max-height: 75%;
}

.fkp-db-results .data-as-table-frame.sfo .data-as-table-label {
    background-color: #91B1D8;
}

.fkp-db-results .data-as-table-childs-frame {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.fkp-db-results .cgops-list-frame-wrapper {
    display: grid;
    grid-template-columns: 160px auto;
    column-gap: 16px;
    background-color: #F4F4FF;
    box-shadow: 0px 1px 2px 0px #00000040;   
}

.fkp-db-results .cgops-list-frame {
    display: flex;
    flex-direction: column;
}

.fkp-db-results .cgop {
    padding: 6px 10px 6px 0px;
}

/* По умолчанию скрываем обе метки */
.label-once-showed-cgop,
.label-many-showed-cgops {
    display: none;
    padding-top: 6px;
}

.cgops-list-label-frame {
    color: #151515;
    font-style: italic;
    font-weight: 600;
    font-size: 12px;
    line-height: 120%;
    padding: 0px 0px 0px 10px;
}

/* Если есть хотя бы один видимый cgop, показываем метку для одного */
.cgops-list-frame-wrapper:has(.cgops-list-frame .cgop:not(.hidden)) 
.label-once-showed-cgop {
    display: inline-block;
}

/* Если есть второй видимый cgop (любой по счету среди видимых) */
.cgops-list-frame-wrapper:has(.cgops-list-frame .cgop:not(.hidden) ~ .cgop:not(.hidden)) 
.label-many-showed-cgops {
    display: inline-block;
}

/* Если есть два или более видимых cgop, скрываем метку для одного */
.cgops-list-frame-wrapper:has(.cgops-list-frame .cgop:not(.hidden) ~ .cgop:not(.hidden)) 
.label-once-showed-cgop {
    display: none;
}

.fkp-db-results .foifs-frame {
    display: flex;
    width: 100%;
    overflow-y: auto;
    flex-direction: row;
}

.fkp-db-results .rightSide {
    display: flex;
    height: 100%;
}

.fkp-db-results .download-icon-wrapper {
    display: flex;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.fkp-db-results .download-icon-wrapper img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-left: 6px;
    filter: grayscale(1);
}

.fkp-db-results .found-items {
    padding-right: 10px;
}

.fkp-db-results .found-item {
    grid-template-columns: min-content 1fr auto;
}
.fkp-db-results .found-item:hover {
    background-color: #91b1d8;    
}
.fkp-db-results .found-item:hover .download-icon-wrapper img {
    filter: none;    
}
.fkp-db-results .found-item.selectsed {
    background-color: #91B1D8;    
}

.fkp-db-results .found-item.selected .download-icon-wrapper img {
    filter: grayscale(0);
}

.slider-button {
    margin-top: 50px;
    height: 94px;
    width: 14px;
    background-color: #154279;
    border-bottom-left-radius: 25px;
    border-top-left-radius: 25px;
    box-shadow: -2px 0px 4px 0px #00000040;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    display: none;
}

.slider-button img {
    height: 20px;
    width: 7px;
    transform: rotate(180deg);
    transition: transform 0.2s ease-out;
}

@media (max-width: 840px) {

    .fkp-db-results .found-item {
        padding: 12px 4px;
        font-size: 10px;
        line-height: 140%;        
    }

    .fkp-db-results .found-item .found-item-text {
        font-size: 10px;
    }

    .fkp-db-results .container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 660px) {
    .fkp-db-results:has(.classes-frame-open) .blackBackground {
        display: block;
    }

    .fkp-db-results .container {
        display: flex;
        flex-direction: column;  
    }

    .fkp-db-results .simple-org-item {
        flex-direction: column;
    }

    .fkp-db-results .org-item-label-frame {
        font-size: 12px;
        font-weight: 600;
    }

    .fkp-db-results .org-item .classes-line-chart-label {
        width: 100%;
        font-weight: 400;
        font-size: 10px;
    }

    .fkp-db-results .org-item {
        padding: 10px 16px 10px 16px;
    }

    .fkp-db-results .main-info-frame {
        width: 100%;
        flex-direction: column;
    }

    .fkp-db-results .classes-line-chart-frame {
        width: 100%;
    }

    .fkp-db-results .classes-line-chart-frame .classes-line-chart {
        width: 100%;
    }

    .fkp-db-results .orgsGrid {
        row-gap: 20px;
    }
    
    .fkp-db-results .foifs-frame {
        position: fixed;
        z-index: 100;
        display: flex;
        height: calc(100% - 100px);
        top: 100px;
        width: 100%;
        transform: translate(calc(100% - 20px));
        transition: transform 0.2s ease-out;
    }

    .fkp-db-results .foifs-frame.foifs-frame-open {
        transform: translate(calc(0% - 0px));      
    }

    .fkp-db-results .foifs-frame.foifs-frame-open .inside-foifs-frame {
        box-shadow: -4px 0px 4px 0px #00000040;
        border-top-left-radius: 8px;
    }

    .fkp-db-results .foifs-frame.foifs-frame-open .slider-button img {
        transform: rotate(0deg);
    }

    .fkp-db-results .inside-foifs-frame {
        background-color: #F4F4FF;
        box-shadow: -2px 0px 4px 0px #00000040;
    }

    #page-content:has(.fkp-db-results) {
        padding-right: 0px;
    }

    .fkp-db-results .orgsGrid {
        border-top: none;
    }

    .fkp-db-results .container {
        overflow-x: hidden;
    }

    .fkp-db-results .slider-button {
        display: flex;
    }

    .fkp-db-results .found-item {
        padding: 10px 3px;
        line-height: 120%;        
    }

    .fkp-db-results .found-item .found-item-text {
        font-size: 10px;
    }
}