*,
*::before,
*::after {
    -webkit-box-sizing: inherit;
    box-sizing: inherit;
    font-family: inherit;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    background: var(--bg-color);
    color: var(--secondary-color);
}

main {
    min-height: calc(100vh - 76px - 179px);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.title {
    color: var(--dark-font-color);
    margin-bottom: 16px;
    font-weight: 400;
    font-size: 52px;
    line-height: 123%;
    letter-spacing: 0;
}

.control-label {
    font-weight: 400;
    font-size: 13px;
    color: var(--secondary-font-color);
    margin-bottom: 9px;
}

.form-control,
select,
.form-select,
span.select2-selection.select2-selection--single,
.section-filters__field .select2-selection--multiple {
    border: 1px solid var(--stroke-color) !important;
    border-radius: 10px !important;
    padding: 12px 16px;
    height: 48px;
    background: var(--secondary-bg-color);
    box-shadow: none !important;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    color: var(--secondary-color);
    width: 100%;
    margin-bottom: 12px;
}

.form-control--grey {
    box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.04);
    background: var(--dark-bg-color);
}

.form-control--grey::placeholder {
    color: var(--secondary-color);
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
}

.form-control::placeholder {
    color: var(--light-font-color);
}

.form-control:focus,
select:focus,
.form-select:focus,
span.select2-selection.select2-selection--single:focus,
.section-filters__field .select2-selection--multiple:focus {
    outline: 1px solid var(--primary-color);
    box-shadow: unset;
    background: var(--bg-color);
}

span.select2-selection.select2-selection--single,
.section-filters__field .select2-selection--multiple {
    background-image: url("../../../../img/select-icon.svg") !important;
    background-position: calc(100% - 15px) 50% !important;
    background-repeat: no-repeat !important;
}

.select2-container--krajee-bs5.select2-container--open:not(.select2-container--disabled) .select2-selection, .select2-container--krajee-bs5:not(.select2-container--disabled) .select2-selection:focus {
    box-shadow: none !important;
    border: 1px solid var(--stroke-color) !important;
}

.select2-container--krajee-bs5.select2-container--open:not(.select2-container--disabled) .select2-selection {
    outline: 1px solid var(--primary-color) !important;
}

select.is-valid + .select2-container--krajee-bs5 .select2-selection--single, .has-success.select2-container--krajee-bs5 .select2-dropdown, .has-success .select2-container--krajee-bs5 .select2-selection {
    border: 1px solid var(--stroke-color) !important;
    outline: none !important;
    box-shadow: none !important;
}

.form-select {
    background-image: url("../../../../img/select-icon.svg");
    background-position: calc(100% - 16px) 50%;
    background-repeat: no-repeat;
}

.textarea.form-control {
    min-height: 160px;
    font-weight: 400;
    font-size: 16px;
    line-height: 150%;
    padding: 12px 16px;
    width: 100%;
}

.btn {
    border-radius: 10px;
    border: unset;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
    line-height: 171%;
}

.btn:hover {
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-light-color);
    padding: 8px 12px;
    font-weight: 600;
    font-size: 16px;
    color: var(--secondary-bg-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-color);
}

.btn-grey {
    background: var(--inactive-bg-color);
    font-weight: 600;
    font-size: 16px;
    color: var(--inactive-text-color);
}

.btn-grey:hover,
.btn-grey:focus {
    background: var(--inactive-text-color);
    color: var(--inactive-bg-color);
}

.btn-white {
    background: var(--secondary-bg-color);
    color: var(--secondary-color);
}

.btn-white:hover {
    background: var(--secondary-color);
    color: var(--secondary-bg-color);
}

.btn-light-blue {
    background: var(--light-blue);
    color: var(--primary-color);
}

.btn-light-blue:hover {
    background: var(--primary-color);
    color: var(--light-blue);
}

.error-text {
    font-size: 12px;
    color: var(--error-color);
    position: relative;
    top: -9px;
}

.display-none {
    display: none !important;
}

.alert {
    max-width: 300px;
    position: fixed;
    top: 20px;
    right: 20px;
    padding: .75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    -webkit-border-radius: .25rem;
    border-radius: .25rem;
    z-index: 100;
}

.alert--error {
    color: var(--error-color);
    background-color: var(--error-bg-color);
}

.alert--success {
    color: var(--success-color);
    background-color: var(--success-bg-color);
}

.checkbox-item input {
    opacity: 0;
    width: 0;
}

.checkbox-label {
    position: relative;
    padding-left: 26px;
    cursor: pointer;
}

.checkbox-label::before {
    position: absolute;
    top: 6px;
    left: 0;
    content: "";
    border: 1px solid var(--stroke-color);
    background: var(--bg-color);
    width: 15px;
    height: 15px;
}

.checkbox-item input:checked + .checkbox-label::before {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background-image: url("/img/check-icon.svg");
    background-position: center;
    background-repeat: no-repeat;
}

#loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.section__top {
    margin-top: 32px;
    margin-bottom: 24px;
}

.section__desc {
    font-weight: 400;
    font-size: 18px;
    line-height: 133%;
}

.section__filters {
    padding: 22px;
    width: 100%;
    border: 1px solid var(--stroke-color);
    background: var(--secondary-bg-color);
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 35px;
    gap: 16px 40px;
}

.section-filters__title {
    font-weight: 400;
    font-size: 14px;
    line-height: 171%;
    color: var(--light-font-color);
    margin-bottom: 4px;
}

.section-filters__field .form-control,
.section-filters__field .form-select,
.section-filters__field span.select2-selection.select2-selection--single {
    width: 408px;
    max-width: 408px;
    margin-bottom: 0;
}

.section-filters__field .select2-selection--multiple {
    min-width: 220px !important;
    max-width: 220px !important;
    padding: 0 40px 0 0 !important;
    width: max-content !important;
    margin-bottom: 0;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
    text-overflow: clip !important;
}

.select2-selection--multiple .select2-search__field {
    max-width: 1px !important;
    min-width: 1px !important;
    margin: 0 !important;
}

.select2-container--krajee-bs5 .select2-selection--multiple .select2-search--inline {
    margin: 0 !important;
}

.select2-selection--multiple .select2-search__field:focus {
    max-width: 60px !important;
    min-width: 60px !important;
    margin: 0.5rem !important;
}

.s2-togall-button {
    color: var(--secondary-color) !important;
}

body .select2-container--krajee-bs5 .select2-results__option.select2-results__option--selected,
body .select2-container--krajee-bs5 .select2-results__option[aria-selected=true] {
    background-color: var(--light-selection-color);
    color: var(--secondary-color);
}

body .select2-container--krajee-bs5 .select2-results__option--highlighted[aria-selected] {
    color: var(--secondary-color);
    background-color: var(--dark-bg-color);
}

body .select2-container--krajee-bs5:not(.select2-container--disabled) .select2-dropdown {
    border-color: var(--stroke-color) !important;
    box-shadow: 0 0.375rem 0.75rem 0.2rem var(--stroke-color) !important;
}

span.select2-selection__choice__remove {
    cursor: pointer !important;
    font-size: 1.05rem !important;
}

li.select2-selection__choice {
    background: var(--secondary-bg-color) !important;
    color: var(--secondary-color) !important;
    border: 1px solid var(--stroke-color) !important;
    font-size: 12px !important;
}

.select2-selection__rendered {
    overflow: scroll;
}

.section-filters__item--btn {
    margin-left: auto;

    display: flex;
    align-items: end;
}

.section-filters__btn {
    height: 38px;
    padding: 6px 27px;
}

.feed__cards-wrapper {
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.link {
    color: var(--primary-color);
    border-bottom: 1px solid var(--primary-color);
    font-weight: 600;
}

.pagination {
    display: flex;
    gap: 4px;
    margin: 0 auto 32px auto;
}

.pagination li,
.pagination a {
    border: none;
    background: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
    line-height: 171%;
}

.pagination > li a {
    color: var(--secondary-color);
}

.pagination .disabled {
    color: var(--secondary-color);
    opacity: 0.6;
}

.pagination .active a {
    color: var(--secondary-bg-color);
}

.pagination .active {
    background: var(--primary-light-color);
    border-radius: 10px;
}

.pagination li:hover {
    cursor: pointer;
    opacity: 0.8;
}

.pagination .next,
.pagination .prev {
    background: var(--dark-bg-color);
    border-radius: 10px;
}

.pagination .next {
    margin-left: 12px;
}

.pagination .prev {
    margin-right: 12px;
}

.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background: var(--overlay-color);
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup__content {
    background: var(--secondary-bg-color);
    border: 1px solid var(--stroke-color);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.popup__btns {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.popup__title {
    text-align: center;
}

hr {
    color: var(--primary-color);
    margin: 0;
}

.disclaimer__desc + .disclaimer__desc {
    margin-bottom: 10px;
}

.disclaimer__desc a {
    color: var(--primary-color);
}

.company__filter {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.company-filter__btn {
    height: 48px;
    align-self: end;
    font-weight: 500;
    font-size: 16px;
    line-height: 150%;
    padding: 12px 16px;
    color: var(--secondary-bg-color);
    display: flex;
    align-items: center;
    gap: 8px;
}


.company__bottom-filter {
    margin-bottom: 16px;
    display: flex;
    align-items: end;
    width: 100%;
    justify-content: space-between;
}

.company__bottom-filter .form-control {
    max-width: 280px;
}

.company__found-items {
    font-weight: 400;
    font-size: 14px;
    line-height: 171%;
    color: var(--light-font-color);

    display: flex;
    flex-direction: row;
    gap: 4px;
    padding-bottom: 12px;
}

.company__items-amount {
    color: var(--primary-dark-color);
    font-weight: 600;
}

.stories__filter {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.stories__filter .section-filters__item {
    width: calc(100% / 3);
}

.stories__filter .section-filters__field .form-control,
.stories__filter .section-filters__field .form-select {
    max-width: 100%;
    width: 100%;
}

.captcha-wrapper .form-control {
    width: 100%;
    margin-bottom: 0;
    max-width: 260px;
}

.captcha-wrapper {
    max-width: 460px;
    display: flex;
    align-items: center;
}

.captcha-wrapper img {
    height: 40px;
    width: 120px;
}

.captcha-reload-btn {
    padding: 4px;
    border: 1px solid var(--light-grey);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    background: var(--secondary-bg-color);
    margin-right: 16px;
    margin-left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-page__captcha-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: max-content;
    border: 1px solid #dddfe4;
    border-radius: 16px;
    padding: 8px 12px;
    gap: 8px;
    margin-bottom: 8px;
}

.captcha-wrapper .form-control {
    max-width: 96px;
    height: 40px;
    padding: 8px 12px;
}


.field-createcommentform-verifycode {
    width: 100%;
}

@media (max-width: 1010px) {
    .section-filters__item--btn {
        margin-left: 0;
    }
}

@media (max-width: 830px) {
    .form-control,
    select,
    .form-select,
    span.select2-selection.select2-selection--single,
    .section-filters__field .select2-selection--multiple {
        width: 100% !important;
    }

    .story-card {
        gap: 22px;
    }
}

@media (max-width: 650px) {
    .tabs-header {
        flex-direction: column;
        width: 100%;
    }

    .tabs-header__item--active {
        width: 100%;
    }

    .tabs-header__item--active::after {
        display: none;
    }

    .section__filters {
        flex-direction: column;
    }

    .section-filters__field .form-control,
    .section-filters__field .form-select,
    .section-filters__field span.select2-selection.select2-selection--single,
    .section-filters__field .section-filters__field .select2-selection--multiple {
        width: 100%;
        max-width: 100%;
        margin-bottom: 0;
    }

    .title {
        font-size: 25px;
    }

    .company__filter {
        flex-direction: column;
    }

    .company-filter__btn {
        width: 100%;
        justify-content: center;
    }

    .stories__filter .section-filters__item {
        width: calc(100% / 2);
    }

    .stories__bottom-filter {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 550px) {
    .stories__tabs-content {
        padding: 24px 25px;
    }

    .section-title {
        font-size: 18px;
    }

    .btn-primary {
        width: 100%;
    }

    .popup__content {
        padding: 35px 20px;
    }

    .company__bottom-filter {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }
}