/* وكالة المحمودي - طبقة ردع لحماية التصاميم */

/* الصور لا تُسحب ولا يظهر عليها قائمة «حفظ» في الجوال */
img, video { -webkit-user-drag: none; -webkit-touch-callout: none; }
.work-card__media, .work-reel, .client-folder__sheet, .cf-float, .pz, .cf-tile { -webkit-user-select: none; user-select: none; }

/* ---------- الطمس: عند مغادرة النافذة / لقطة الشاشة / أدوات المطور ---------- */
.pz img, .cf-tile img, .work-reel__tile img, .work-reel__tile video, .client-folder__sheet img, .cf-float img,
.work-card--social .work-card__media img, .work-card--identity .work-card__media img, .work-card--campaign .work-card__media img,
.work-card--event .work-card__media img, .work-reel video, .rich-reels video {
    transition: filter .35s ease, opacity .35s ease;
}
html.guard-veil .pz img, html.guard-veil .cf-tile img, html.guard-veil .work-reel__tile img, html.guard-veil .work-reel__tile video,
html.guard-veil .client-folder__sheet img, html.guard-veil .cf-float img,
html.guard-veil .work-card--social .work-card__media img, html.guard-veil .work-card--identity .work-card__media img,
html.guard-veil .work-card--campaign .work-card__media img, html.guard-veil .work-card--event .work-card__media img,
html.guard-veil .work-reel video, html.guard-veil .rich-reels video {
    filter: blur(22px) saturate(.6);
    opacity: .55;
}

/* ---------- التنبيه المتحرك ---------- */
.guard-toast {
    position: fixed; z-index: 100000; left: 50%; bottom: 28px;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px 12px 14px; border-radius: 16px;
    background: rgba(45, 20, 43, .94); color: #fff;
    box-shadow: 0 18px 50px rgba(30, 10, 28, .35), inset 0 0 0 1px rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    font-family: var(--font, inherit); max-width: calc(100vw - 32px);
    transform: translate(-50%, 140%); opacity: 0; pointer-events: none;
}
.guard-toast.is-on { animation: guardToast 2.6s cubic-bezier(.2, .9, .2, 1) forwards; }
.guard-toast__shield { color: #f0b8cf; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: rgba(240, 184, 207, .12); }
.guard-toast.is-on .guard-toast__shield svg { animation: guardShield .7s .1s cubic-bezier(.3, 1.6, .5, 1) both; }
.guard-toast.is-on .guard-toast__lock { stroke-dasharray: 30; animation: guardLock .6s .35s ease both; }
.guard-toast__text { display: flex; flex-direction: column; line-height: 1.45; }
.guard-toast__text b { font-size: 15px; font-weight: 700; }
.guard-toast__text small { font-size: 12.5px; opacity: .78; }

@keyframes guardToast {
    0%   { transform: translate(-50%, 140%) scale(.9); opacity: 0; }
    14%  { transform: translate(-50%, 0) scale(1.03); opacity: 1; }
    20%  { transform: translate(-50%, 0) scale(1); }
    24%  { transform: translate(calc(-50% - 6px), 0); }
    28%  { transform: translate(calc(-50% + 6px), 0); }
    32%  { transform: translate(-50%, 0); }
    86%  { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 140%) scale(.95); opacity: 0; }
}
@keyframes guardShield { from { transform: scale(.4) rotate(-25deg); } to { transform: none; } }
@keyframes guardLock { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }

/* ---------- لافتة أدوات المطور ---------- */
.guard-dev-banner { display: none; }
html.guard-dev .guard-dev-banner {
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    position: fixed; z-index: 100001; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 32px)); padding: 30px 26px 24px; border-radius: 22px;
    background: rgba(45, 20, 43, .96); color: #fff; font-family: var(--font, inherit);
    box-shadow: 0 30px 80px rgba(30, 10, 28, .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
    animation: guardBanner .5s cubic-bezier(.2, .9, .2, 1) both;
}
.guard-dev-banner b { font-size: 17px; margin-top: 8px; }
.guard-dev-banner small { font-size: 13px; opacity: .75; }
.guard-dev-banner__ring {
    width: 58px; height: 58px; border-radius: 50%;
    border: 3px solid rgba(240, 184, 207, .25); border-top-color: #f0b8cf;
    animation: guardSpin 1.1s linear infinite;
}
@keyframes guardBanner { from { opacity: 0; transform: translate(-50%, -44%) scale(.94); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes guardSpin { to { transform: rotate(360deg); } }

/* ---------- الطباعة: التصاميم لا تُطبع ---------- */
@media print {
    img, video, iframe, picture, svg image, .work-reel, .client-folder__sheet, .cf-float, .pz, .cf-tile { visibility: hidden !important; }
    body::after { content: '© mahmudiagency.com — التصاميم محمية'; display: block; text-align: center; font-size: 16px; margin-top: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .guard-toast.is-on { animation-duration: .01s; opacity: 1; transform: translate(-50%, 0); }
    .guard-dev-banner__ring { animation: none; }
}
