html.ehr-esga-pdf-lock-v2,
body.ehr-esga-pdf-lock-v2 {
    overflow: hidden !important;
}

#ehr-esga-pdf-modal-v2 {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: none;
}

#ehr-esga-pdf-modal-v2.open {
    display: block !important;
}

.ehr-esga-pdf-overlay-v2 {
    position: fixed;
    inset: 0;
    background: rgba(10,15,35,.80);
    backdrop-filter: blur(3px);
}

.ehr-esga-pdf-window-v2 {
    position: fixed;
    top: 4vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(1120px, calc(100vw - 24px));
    height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 30px 90px rgba(0,0,0,.38);
}

.ehr-esga-pdf-head-v2 {
    flex: 0 0 auto;
    min-height: 62px;
    padding: 12px 18px 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #171b35;
    color: #fff;
}

.ehr-esga-pdf-head-v2 strong {
    font-size: 17px;
}

.ehr-esga-pdf-x-v2 {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.ehr-esga-pdf-content-v2 {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #eef0f5;
}

.ehr-esga-pdf-frame-v2,
.ehr-esga-pdf-native-v2 {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.ehr-esga-pdf-frame-v2 {
    z-index: 3;
    border: 0 !important;
    background: #fff;
}

.ehr-esga-pdf-native-v2 {
    z-index: 2;
    display: none;
    background: #fff;
}

#ehr-esga-pdf-modal-v2.native-visible .ehr-esga-pdf-native-v2 {
    display: block;
}

.ehr-esga-pdf-object-v2,
.ehr-esga-pdf-embed-v2 {
    width: 100%;
    height: 100%;
    border: 0;
}

.ehr-esga-pdf-loading-v2 {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f9;
    color: #626979;
    font-size: 14px;
}

.ehr-esga-pdf-fallback-v2 {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    background: #f5f6f9;
    color: #252a42;
    padding: 25px;
}

.ehr-esga-pdf-fallback-v2 span {
    color: #656b7b;
    font-size: 14px;
}

.ehr-esga-pdf-fallback-icon {
    font-weight: 800;
    font-size: 30px;
}

.ehr-esga-pdf-fallback-open-v2 {
    margin-top: 8px;
    padding: 10px 16px;
    border-radius: 9px;
    background: #673ab7;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
}

.ehr-esga-pdf-actions-v2 {
    flex: 0 0 auto;
    min-height: 66px;
    padding: 11px 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid #e5e7ee;
    background: #fff;
}

.ehr-esga-pdf-actions-v2 a,
.ehr-esga-pdf-actions-v2 button {
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 9px;
    border: 1px solid #d7dae3;
    background: #fff;
    color: #252a42;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.ehr-esga-pdf-newtab-v2 {
    color: #673ab7 !important;
    border-color: #673ab7 !important;
}

.ehr-esga-pdf-download-v2 {
    color: #fff !important;
    background: #e91e78 !important;
    border-color: #e91e78 !important;
}

.ehr-esga-pdf-close-v2 {
    color: #fff !important;
    background: #171b35 !important;
    border-color: #171b35 !important;
}

@media (max-width:700px) {
    .ehr-esga-pdf-window-v2 {
        top: 1vh;
        width: calc(100vw - 12px);
        height: 98vh;
        border-radius: 12px;
    }

    .ehr-esga-pdf-head-v2 {
        min-height: 58px;
        padding-left: 15px;
    }

    .ehr-esga-pdf-actions-v2 {
        padding: 9px;
    }

    .ehr-esga-pdf-actions-v2 a,
    .ehr-esga-pdf-actions-v2 button {
        flex: 1 1 30%;
    }
}
