.iwpm-required-notice {
    color: #d63638;
    font-weight: bold;
    display: block;
    margin-top: 5px;
}

.iwpm-explanatory-text {
    font-size: 12px;
    color: #666;
    margin-top: 15px;
}

.iwpm-char-count {
    position: relative;
}

.iwpm-char-count::after {
    content: attr(data-maxlength) " caracteres máx.";
    font-size: 11px;
    color: #999;
    display: block;
}

/* === MODAL COM SCROLL INTERNO E POSICIONAMENTO GARANTIDO === */
.iwpm-modal-overlay {
    display: none;
    position: fixed;
    top: 111px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    overflow-y: auto; /* Permite scroll na página de fundo se necessário */
    -webkit-overflow-scrolling: touch;
    padding: 40px 20px; /* Padding vertical para afastar do topo/rodapé */
    box-sizing: border-box;
    text-align: center; /* Centraliza horizontalmente o conteúdo */
}

.iwpm-modal-overlay::before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -0.25em;
}

.iwpm-modal-content {
    position: fixed;
    top: 40%; /* Move mais para baixo (ajuste conforme precisar) */
    left: 50%;
    transform: translate(-50%, -50%);

    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: calc(100vh - 120px); /* Respeita o padding do overlay */
    overflow-y: auto;
    text-align: left;
    animation: iwpm-modal-fade-in 0.3s ease-out;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}


.iwpm-modal-close-btn {
    margin-top: 25px;
    padding: 12px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
    font-size: 15px;
    width: 100%;
}

.iwpm-modal-close-btn:hover {
    background: #005177;
}

@keyframes iwpm-modal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsivo */
@media (max-width: 650px) {
    .iwpm-modal-overlay {
        padding: 20px 10px;
    }

    .iwpm-modal-content {
        padding: 20px;
        border-radius: 8px;
        max-height: calc(100vh - 80px);
    }

    .iwpm-modal-close-btn {
        padding: 14px;
        font-size: 16px;
    }
}