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

.mec-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.6);
}

.mec-modal-overlay[hidden] {
    display: none;
}

.mec-modal-dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    height: 85vh;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.mec-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px 10px 20px;
    border-bottom: 1px solid #e5e5e5;
}

.mec-modal-overlay .mec-modal-title {
    flex: 1;
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.mec-modal-overlay .mec-modal-close {
    flex: none;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #333;
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
}

.mec-modal-overlay .mec-modal-close:hover,
.mec-modal-overlay .mec-modal-close:focus-visible {
    background: #f0f0f0;
}

.mec-modal-body {
    position: relative;
    flex: 1;
    min-height: 0;
}

.mec-modal-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    background: #fff;
    color: #777;
}

.mec-modal-loader[hidden] {
    display: none;
}

.mec-modal-frame {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Telefon: pełny ekran */
@media (max-width: 600px) {
    .mec-modal-overlay {
        padding: 0;
    }

    .mec-modal-dialog {
        max-width: none;
        height: 100%;
        border-radius: 0;
    }
}
