/**
 * AvataLabs Content & Asset Protection Shield
 * Frontend Stylesheet - Layout Preservation & Targeted Security
 * Author: Hasan ATEŞ & AvataLabs
 */

/* 1. SELEKTİF VE HEDEFLİ METİN SEÇİM ENGELİ (SIFIR TEMA BOZULMASI) */
/* Body etiketine ASLA user-select basılmaz; yalnızca içerik alanları hedeflenir */
.entry-content,
.post-content,
.page-content,
article,
.avata-protected-content,
.wp-block-post-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 2. FORM VE ETKİLEŞİM ELEMANLARININ KESİNTİSİZ ÇALIŞMA GARANTİSİ */
/* Butonlar, giriş alanları, menüler asla kilitlenmez */
input,
textarea,
select,
button,
[contenteditable="true"],
.allow-select,
.wp-block-search,
.comment-form,
.woocommerce form {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    pointer-events: auto !important;
}

/* 3. GÖRSEL KORUMA & SÜRÜKLEME ENGELİ */
img,
.entry-content img,
article img,
.post-content img,
.wp-block-image img {
    -webkit-touch-callout: none !important;
    -webkit-user-drag: none !important;
    user-drag: none !important;
    pointer-events: auto;
}

/* 4. ZARİF VE DONDURMAYAN TOAST BİLDİRİMİ (POINTER-EVENTS: NONE İLE ASLA TIKLAMAYI ENGELLEMEZ) */
#avatalabs-shield-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
    box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    pointer-events: none;
    opacity: 0;
    transform: translateY(16px) scale(0.96);
    transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

#avatalabs-shield-toast.avata-toast-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#avatalabs-shield-toast .avata-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    flex-shrink: 0;
}

#avatalabs-shield-toast .avata-toast-icon svg {
    width: 16px;
    height: 16px;
}

#avatalabs-shield-toast .avata-toast-text {
    letter-spacing: -0.01em;
}

/* 5. YAZDIRMA (PRINT) VE PDF'E DÖNÜŞTÜRME ENGELİ */
@media print {
    /* Orijinal sayfayı tamamen gizle */
    body > *:not(#avatalabs-print-shield-notice) {
        display: none !important;
        visibility: hidden !important;
    }

    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
        height: 100% !important;
        overflow: hidden !important;
    }

    #avatalabs-print-shield-notice {
        display: flex !important;
        visibility: visible !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 2147483647 !important;
        background: #ffffff !important;
        padding: 40px !important;
        box-sizing: border-box !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    #avatalabs-print-shield-notice .avata-print-inner {
        max-width: 580px !important;
        border: 2px dashed #ef4444 !important;
        border-radius: 16px !important;
        padding: 48px 36px !important;
        box-sizing: border-box !important;
    }

    #avatalabs-print-shield-notice .avata-print-icon {
        color: #ef4444 !important;
        margin: 0 auto 20px auto !important;
        display: block !important;
    }

    #avatalabs-print-shield-notice h2 {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-size: 24pt !important;
        font-weight: 700 !important;
        color: #b91c1c !important;
        margin: 0 0 14px 0 !important;
    }

    #avatalabs-print-shield-notice p {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-size: 14pt !important;
        line-height: 1.6 !important;
        color: #334155 !important;
        margin: 0 0 24px 0 !important;
    }

    #avatalabs-print-shield-notice .avata-brand {
        display: block !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
        font-size: 10pt !important;
        text-transform: uppercase !important;
        letter-spacing: 0.1em !important;
        color: #64748b !important;
        font-weight: 600 !important;
    }
}
