/* DeliveryPerson employer layout hotfix v80.2 */

/*
 * Десктоп: левая колонка с описанием не влияет на высоту правого
 * блока «Кратко». Правая карточка ограничена по собственной высоте.
 */
.employer-body .container.employer-about-grid {
    display: grid !important;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(260px, 320px) !important;
    align-items: start !important;
    align-content: start !important;
    grid-auto-rows: max-content !important;
    gap: 24px !important;
}

.employer-body .employer-about {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-self: start !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.employer-body .employer-about .employer-rich,
.employer-body .employer-about .dynamic-rich,
.employer-body .employer-about .company-description {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.employer-body .employer-facts,
.employer-body [class*="dp-employer-facts-v"] {
    position: sticky !important;
    top: 92px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-self: start !important;
    justify-self: stretch !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: max-content !important;
    max-height: 430px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.employer-body .employer-facts > :last-child,
.employer-body [class*="dp-employer-facts-v"] > :last-child {
    margin-bottom: 0 !important;
}

.employer-body .employer-facts dl {
    margin-bottom: 0 !important;
}

/*
 * Планшеты и мобильные:
 * сначала всегда выводим «О работодателе», затем «Кратко».
 * Убираем sticky и любые искусственные высоты/пустое пространство.
 */
@media (max-width: 980px) {
    .employer-body .container.employer-about-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        gap: 16px !important;
    }

    .employer-body .employer-about {
        order: 1 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .employer-body .employer-facts,
    .employer-body [class*="dp-employer-facts-v"] {
        position: static !important;
        top: auto !important;
        order: 2 !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin: 0 !important;
    }
}

@media (max-width: 640px) {
    .employer-body {
        padding-top: 0 !important;
    }

    .employer-body .container.employer-about-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 14px !important;
    }

    .employer-body .employer-about {
        display: block !important;
        flex: 0 0 auto !important;
        order: 1 !important;
        padding: 20px 16px !important;
        border-radius: 20px !important;
    }

    .employer-body .employer-about > .section-kicker {
        display: block !important;
        margin-bottom: 14px !important;
    }

    .employer-body .employer-about .employer-rich,
    .employer-body .employer-about .dynamic-rich,
    .employer-body .employer-about .company-description {
        display: block !important;
        width: 100% !important;
        min-height: 1px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .employer-body .employer-facts,
    .employer-body [class*="dp-employer-facts-v"] {
        display: block !important;
        flex: 0 0 auto !important;
        order: 2 !important;
        padding: 18px 16px !important;
        border-radius: 20px !important;
    }

    .employer-body .employer-facts dl {
        display: grid !important;
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin: 0 !important;
    }

    .employer-body .employer-facts dl > div {
        min-height: 0 !important;
        height: auto !important;
        padding: 12px !important;
    }
}

