.pm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
    opacity: 0;
    transition: opacity 180ms ease;
}

.pm-overlay.pm-visible {
    opacity: 1;
}

.pm-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35);
    max-width: 420px;
    width: 100%;
    padding: 28px 24px 22px;
    text-align: center;
    transform: translateY(8px) scale(0.98);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.pm-overlay.pm-visible .pm-card {
    transform: translateY(0) scale(1);
}

.pm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.pm-icon svg {
    width: 36px;
    height: 36px;
    stroke-width: 2.5;
}

.pm-icon.pm-icon-question { background: linear-gradient(135deg, #f59e0b, #d97706); }
.pm-icon.pm-icon-success  { background: linear-gradient(135deg, #22c55e, #15803d); }
.pm-icon.pm-icon-error    { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.pm-icon.pm-icon-warning  { background: linear-gradient(135deg, #f97316, #c2410c); }
.pm-icon.pm-icon-info     { background: linear-gradient(135deg, #1f2937, #0f172a); }

.pm-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.3;
}

.pm-message {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 22px;
    white-space: pre-wrap;
}

.pm-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}

@media (min-width: 480px) {
    .pm-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.pm-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    transition: background 160ms ease, transform 80ms ease, box-shadow 160ms ease;
    min-width: 120px;
    line-height: 1.2;
}

.pm-btn:focus { outline: none; }
.pm-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.25);
}

.pm-btn:active { transform: scale(0.98); }

.pm-btn-cancel {
    background: #f1f5f9;
    color: #334155;
}

.pm-btn-cancel:hover { background: #e2e8f0; }

.pm-btn-confirm {
    background: #0f172a;
    color: #ffffff;
}

.pm-btn-confirm:hover { background: #1e293b; }

.pm-btn-confirm.pm-btn-success { background: #16a34a; }
.pm-btn-confirm.pm-btn-success:hover { background: #15803d; }

.pm-btn-confirm.pm-btn-danger { background: #dc2626; }
.pm-btn-confirm.pm-btn-danger:hover { background: #b91c1c; }

.pm-overlay-image {
    background: rgba(15, 23, 42, 0.85);
    padding: 24px;
    cursor: zoom-out;
}

.pm-image-wrap {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.95);
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.pm-overlay-image.pm-visible .pm-image-wrap {
    transform: scale(1);
}

.pm-image {
    max-width: min(95vw, 1400px);
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.6);
    cursor: default;
    display: block;
    object-fit: contain;
    background: #0f172a;
}

.pm-image-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 120ms ease, background 120ms ease;
}

.pm-image-close:hover {
    background: #f1f5f9;
    transform: scale(1.05);
}

.chat-zoom { cursor: zoom-in; }
