#w3pf-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#w3pf-modal[hidden] {
    display: none;
}

#w3pf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

#w3pf-modal-box {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
    max-width: 420px;
    width: 90%;
    z-index: 1;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    animation: w3pfFadeIn 0.18s ease;
    will-change: opacity, transform;
}

@keyframes w3pfFadeIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    #w3pf-modal-box {
        animation: none;
    }
}

#w3pf-modal-header {
    display: flex;
    align-items: center;
    padding: 16px 20px 12px;
    background: #f4f4f5;
    border-bottom: 1px solid #e4e4e7;
    color: #3f3f46;
    font-size: 0.9rem;
}

#w3pf-modal-title {
    font-weight: 600;
    word-break: break-all;
}

#w3pf-modal-body {
    padding: 20px 20px 12px;
    color: #18181b;
    font-size: 0.97rem;
    line-height: 1.6;
}

#w3pf-modal-body p {
    margin: 0;
}

#w3pf-modal-footer {
    padding: 12px 20px 18px;
    display: flex;
    justify-content: flex-end;
}

#w3pf-modal-ok {
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

#w3pf-modal-ok:hover,
#w3pf-modal-ok:focus {
    background: #1d4ed8;
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}
