.efc-modal[hidden] {
    display: none !important;
}

html.efc-modal-open,
html.efc-modal-open body {
    overflow: hidden;
}

.efc-modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(25, 30, 22, 0.62);
    overflow-y: auto;
}

.efc-modal__panel {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    padding: 40px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    overflow-y: auto;
}

.efc-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #555;
    font: 400 30px/38px sans-serif;
    cursor: pointer;
}

.efc-modal__close:hover,
.efc-modal__close:focus-visible {
    background: #f0f2ed;
    color: #315b18;
}

.efc-modal__title {
    margin: 0 44px 10px 0;
    color: #252525;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 600;
    line-height: 1.4;
}

.efc-modal__description {
    margin: 0 0 26px;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

.efc-modal__values {
    display: grid;
    grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
    margin: 0;
    border-top: 1px solid #e7e9e4;
}

.efc-modal__label,
.efc-modal__value {
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #e7e9e4;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.efc-modal__label {
    background: #f7f8f5;
    color: #333;
    font-weight: 600;
}

.efc-modal__value {
    color: #333;
    white-space: pre-wrap;
}

.efc-modal__value--empty {
    color: #999;
}

.efc-modal__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 28px;
}

.efc-modal__button {
    min-height: 54px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.efc-modal__button--edit {
    border-color: #b9bdb4;
    background: #fff;
    color: #444;
}

.efc-modal__button--edit:hover,
.efc-modal__button--edit:focus-visible {
    border-color: #568b2e;
    color: #416f20;
}

.efc-modal__button--send {
    background: #568b2e;
    color: #fff;
}

.efc-modal__button--send:hover,
.efc-modal__button--send:focus-visible {
    background: #416f20;
    color: #fff;
}

.efc-modal__button:focus-visible,
.efc-modal__close:focus-visible {
    outline: 3px solid rgba(86, 139, 46, 0.3);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .efc-modal {
        align-items: flex-start;
        padding: 12px;
    }

    .efc-modal__panel {
        max-height: calc(100vh - 24px);
        padding: 28px 18px 22px;
        border-radius: 12px;
    }

    .efc-modal__close {
        top: 8px;
        right: 8px;
    }

    .efc-modal__values {
        display: block;
        border-top: 0;
    }

    .efc-modal__label,
    .efc-modal__value {
        display: block;
        padding: 10px 12px;
    }

    .efc-modal__label {
        border-top: 1px solid #e7e9e4;
        border-bottom: 0;
    }

    .efc-modal__actions {
        grid-template-columns: 1fr;
    }

    .efc-modal__button--send {
        order: -1;
    }
}

