/* ===== Bootstrap modal (scoped) ===== */
#psnegModal .modal-dialog {
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 576px) {
    #psnegModal .modal-dialog {
        max-width: 680px;
    }
}

#psnegModal .modal-content {
    border-radius: 12px;
}

#psnegModal .modal-header {
    display: flex;
    justify-content: space-between;
    padding: 15px 30px;
}

#psnegModal .modal-header .close {
    position: absolute;
    right: 28px;
}

#psnegModal .modal-title {
    font-weight: 600;
}

#psnegModal .modal-body form .form-group {
    margin-bottom: 1.3em;
}

#psnegConsent {
    margin-left: 0;
}

#psnegModal .form-group.form-check>label {
    text-align: left;
    padding-left: 1.75rem;
}

/* ===== Mobile tweaks ===== */
@media (max-width: 575.98px) {
    #psnegModal .modal-body {
        padding: 10px;
    }

    #psnegModal .modal-body form .form-group {
        margin-bottom: 0.8em;
    }

    #psnegModal .modal-body form .form-group>label {
        margin-bottom: 0.3rem;
    }

    #psnegModal .modal-header {
        padding: 10px 15px;
    }

    #psnegModal .modal-content {
        margin: 10px;
    }
}

/* ===== Fallback modal (bez Bootstrap) ===== */
.psnegotiator__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 9997;
}

.psnegotiator__modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(680px, 92vw);
    background: #fff;
    border-radius: 12px;
    padding: 18px 18px 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    z-index: 9998;
}

.psnegotiator__close {
    position: absolute;
    right: 10px;
    top: 10px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

.psnegotiator__title {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.psneg-actions {
    display: flex;
    gap: .6rem;
    justify-content: flex-end;
}

.psneg-msg {
    margin-top: .8rem;
    padding: .6rem .8rem;
    border-radius: .5rem;
    font-size: .95rem;
}

/* Przycisk z motywu (zachowanie jak dotychczas) */
button.negocjuj {
    margin-top: 20px;
}