.urmas-survey-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.urmas-survey-popup[hidden] {
    display: none;
}

.urmas-survey-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.urmas-survey-popup__modal {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 960px;
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.urmas-survey-popup__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: #9F003B;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.urmas-survey-popup__close:hover {
    background: #7c002e;
}

.urmas-survey-popup__title {
    margin: 0 40px 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: #9F003B;
}

.urmas-survey-popup__body {
    flex: 1 1 auto;
    min-height: 0;
}

.urmas-survey-popup__body iframe {
    display: block;
    width: 100%;
    height: min(78vh, 760px);
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.urmas-survey-popup__footer {
    margin: 12px 0 0;
    font-size: 13px;
    text-align: right;
}

.urmas-survey-popup__footer a {
    color: #9F003B;
    text-decoration: underline;
}

html.urmas-survey-popup-open,
html.urmas-survey-popup-open body {
    overflow: hidden;
}

.urmas-survey-popup__mobile-cta {
    display: none;
}

@media (max-width: 600px) {
    .urmas-survey-popup {
        padding: 14px;
    }

    /* The survey page renders poorly in a narrow iframe — on mobile show a
       compact invitation with a button that opens it full-screen instead. */
    .urmas-survey-popup__body,
    .urmas-survey-popup__footer {
        display: none;
    }

    .urmas-survey-popup__modal {
        padding: 18px;
        max-width: 420px;
    }

    .urmas-survey-popup__mobile-cta {
        display: block;
    }

    .urmas-survey-popup__mobile-cta p {
        margin: 0 0 16px;
        font-size: 15px;
        line-height: 1.5;
        color: #333;
    }

    .urmas-survey-popup__cta-button {
        display: block;
        text-align: center;
        background: #9F003B;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        padding: 13px 20px;
        border-radius: 6px;
        text-decoration: none;
    }

    .urmas-survey-popup__cta-button:hover,
    .urmas-survey-popup__cta-button:focus {
        background: #7c002e;
        color: #fff;
    }
}
