/**
 * WP Content Protector — Frontend CSS
 * Metin seçimini engeller, form alanlarını muaf tutar.
 * Toast bildirim stillerini içerir.
 *
 * @package WPContentProtector
 * @version 1.5.0
 */

/* ============================================================
   METİN SEÇİMİ ENGELİ
   ============================================================ */
body {
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    -webkit-touch-callout: none; /* iOS uzun basma menüsü */
}

/* Form alanları muafiyeti — kullanıcılar yine de form doldurabilir */
input,
textarea,
select,
button,
[contenteditable="true"],
.wp-block-search__input,
.search-field {
    -webkit-user-select: text;
       -moz-user-select: text;
        -ms-user-select: text;
            user-select: text;
    -webkit-touch-callout: default;
}

/* Resim koruma — ek katman */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

/* ============================================================
   TOAST BİLDİRİM STİLLERİ
   ============================================================ */

/* Ana kapsayıcı */
.wpcp-toast-container {
    position: fixed;
    z-index: 2147483647; /* En üstte */
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Konum varyasyonları */
.wpcp-toast-container[data-pos="bottom-center"] {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}
.wpcp-toast-container[data-pos="top-center"] {
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}
.wpcp-toast-container[data-pos="top-right"] {
    top: 24px;
    right: 24px;
    align-items: flex-end;
}
.wpcp-toast-container[data-pos="bottom-right"] {
    bottom: 24px;
    right: 24px;
    align-items: flex-end;
}

/* Toast öğesi */
.wpcp-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #fff;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.95), rgba(50, 50, 65, 0.95));
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-width: 420px;
    min-width: 220px;
    animation: wpcpToastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transform-origin: center bottom;
    will-change: transform, opacity;
    overflow: hidden;
    position: relative;
}

.wpcp-toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ef4444, #f97316);
    border-radius: 12px 0 0 12px;
}

/* İkon */
.wpcp-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(249, 115, 22, 0.2));
    font-size: 16px;
    margin-left: 4px;
}

/* Mesaj */
.wpcp-toast-message {
    flex: 1;
    letter-spacing: -0.01em;
}

/* Progress bar */
.wpcp-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f97316, #eab308);
    border-radius: 0 0 12px 12px;
    animation: wpcpToastProgress var(--wpcp-toast-dur, 3s) linear forwards;
}

/* Animasyonlar */
@keyframes wpcpToastIn {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wpcpToastOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
}

@keyframes wpcpToastProgress {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

.wpcp-toast.wpcp-toast-exit {
    animation: wpcpToastOut 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Mobil uyum */
@media (max-width: 480px) {
    .wpcp-toast-container {
        left: 12px !important;
        right: 12px !important;
        transform: none !important;
    }
    .wpcp-toast {
        max-width: 100%;
        min-width: auto;
        font-size: 13px;
        padding: 10px 16px;
    }
}
