#pn-pesquisa-overlay,
#pn-pesquisa-overlay * {
    box-sizing: border-box;
}

#pn-pesquisa-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.58);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#pn-pesquisa-overlay.pn-pesquisa-open {
    display: flex;
}

.pn-pesquisa-box {
    width: 100%;
    max-width: 520px;
    min-width: 0;
    background: #fff;
    color: #1f2933;
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 auto;
}

.pn-pesquisa-header {
    background: #003860;
    color: #fff;
    padding: 20px 22px;
}

.pn-pesquisa-header h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    color: #fff;
}

.pn-pesquisa-body {
    padding: 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pn-pesquisa-intro-text,
.pn-pesquisa-question-title,
.pn-pesquisa-success-text {
    font-size: 18px;
    line-height: 1.45;
    margin: 0 0 18px;
}

.pn-pesquisa-question-title strong {
    color: #003860;
}

.pn-pesquisa-progress {
    height: 7px;
    background: #e6edf2;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 18px;
}

.pn-pesquisa-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: #003860;
    transition: width 0.25s ease;
}

.pn-pesquisa-options {
    display: grid;
    gap: 10px;
}

.pn-pesquisa-option {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid #d7e0e7;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.pn-pesquisa-option:hover {
    background: #f6f9fb;
    border-color: #003860;
}

.pn-pesquisa-option input {
    margin-top: 2px;
    flex: 0 0 auto;
}

.pn-pesquisa-option span,
.pn-pesquisa-question-title,
.pn-pesquisa-intro-text,
.pn-pesquisa-success-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.pn-pesquisa-input,
.pn-pesquisa-textarea {
    width: 100%;
    border: 1px solid #cfd9e0;
    border-radius: 12px;
    padding: 13px 14px;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
}

.pn-pesquisa-input:focus,
.pn-pesquisa-textarea:focus {
    border-color: #003860;
    box-shadow: 0 0 0 3px rgba(0, 56, 96, 0.12);
}

.pn-pesquisa-textarea {
    min-height: 115px;
    resize: vertical;
}

.pn-pesquisa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding: 0 22px 22px;
}

.pn-pesquisa-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.15;
    max-width: 100%;
    white-space: normal;
}

.pn-pesquisa-btn-primary {
    background: #003860;
    color: #fff;
}

.pn-pesquisa-btn-yes {
    background: #16a34a !important;
    color: #ffffff !important;
    padding: 18px 30px;
    font-size: 21px;
    font-weight: 800;
    min-width: 170px;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.28);
}

.pn-pesquisa-btn-yes:hover {
    background: #15803d;
}

.pn-pesquisa-btn-no {
    background: transparent;
    color: #667582;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
}

.pn-pesquisa-btn-secondary {
    background: #edf2f6;
    color: #23313b;
}

.pn-pesquisa-btn-danger {
    background: transparent;
    color: #667582;
}

.pn-pesquisa-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pn-pesquisa-error {
    display: none;
    margin: 12px 0 0;
    padding: 10px 12px;
    background: #fff0f0;
    color: #9b1c1c;
    border-radius: 10px;
    font-size: 14px;
}

.pn-pesquisa-error.pn-pesquisa-show {
    display: block;
}

.pn-pesquisa-optional {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    color: #6b7a86;
    font-weight: 400;
}

@media (max-width: 600px) {
    #pn-pesquisa-overlay {
        padding: 10px;
        align-items: center;
        justify-content: center;
        overflow-x: hidden;
    }

    .pn-pesquisa-box {
        width: 100%;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 16px;
    }

    .pn-pesquisa-header {
        padding: 16px 18px;
    }

    .pn-pesquisa-header h3 {
        font-size: 20px;
    }

    .pn-pesquisa-body {
        padding: 16px;
        width: 100%;
    }

    .pn-pesquisa-intro-text,
    .pn-pesquisa-question-title,
    .pn-pesquisa-success-text {
        font-size: 17px;
        line-height: 1.38;
    }

    .pn-pesquisa-option {
        padding: 12px;
        font-size: 16px;
    }

    .pn-pesquisa-actions {
        padding: 0 16px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .pn-pesquisa-btn {
        width: 100%;
        min-height: 44px;
        display: block;
    }

    .pn-pesquisa-input,
    .pn-pesquisa-textarea {
        width: 100%;
        max-width: 100%;
    }

    .pn-pesquisa-btn-yes {
        font-size: 21px;
        padding: 18px 22px;
        min-width: 0;
    }

    .pn-pesquisa-btn-no {
        width: auto;
        min-height: 34px;
        align-self: center;
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .pn-pesquisa-header h3 {
        font-size: 18px;
    }

    .pn-pesquisa-intro-text,
    .pn-pesquisa-question-title,
    .pn-pesquisa-success-text {
        font-size: 16px;
    }

    .pn-pesquisa-btn-yes {
        font-size: 19px;
    }
}
