/*
 * DTH CopyGuard — Stylesheet
 * Teil des DTH CopyGuard Plugins. Kann auch standalone in HTML-Seiten eingebunden werden.
 */

/* Textauswahl blockieren, wenn die Body-Klasse gesetzt ist */
body.dth-cg-noselect,
body.dth-cg-noselect * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Eingabefelder und Ausnahmen immer selektierbar halten */
body.dth-cg-noselect input,
body.dth-cg-noselect textarea,
body.dth-cg-noselect [contenteditable="true"],
body.dth-cg-noselect .cg-allow,
body.dth-cg-noselect .cg-allow * {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Bilder schützen: Drag und iOS-Save-Menü unterdrücken */
body.dth-cg-active img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    pointer-events: auto;
}

/* Druckschutz: Seite in Druckansicht leeren */
@media print {
    body.dth-cg-noprint * {
        display: none !important;
    }
    body.dth-cg-noprint::before {
        content: "Druck dieser Seite ist nicht gestattet.";
        display: block !important;
        font-family: sans-serif;
        font-size: 14pt;
        padding: 2cm;
    }
}

/* Toast-Hinweis */
.dth-cg-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 20, 20, 0.92);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    z-index: 2147483647;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
    max-width: 320px;
    text-align: center;
}

.dth-cg-toast.dth-cg-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Screenshot-Defense Overlay */
.dth-cg-ss-overlay {
    position: fixed;
    inset: 0;
    background: #0d0e0f;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2147483647;
    opacity: 0;
    visibility: hidden;
    transition: opacity 80ms ease;
    cursor: pointer;
}

.dth-cg-ss-overlay.dth-cg-ss-show {
    opacity: 1;
    visibility: visible;
}

.dth-cg-ss-inner {
    text-align: center;
    padding: 32px;
    max-width: 90vw;
    animation: dth-cg-ss-pop 300ms ease;
}

@keyframes dth-cg-ss-pop {
    0% { transform: scale(0.8) rotate(-4deg); opacity: 0; }
    60% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.dth-cg-ss-svg {
    display: inline-block;
    width: 240px;
    height: 240px;
    max-width: 50vw;
    max-height: 50vw;
}

.dth-cg-ss-svg svg {
    width: 100%;
    height: 100%;
}

.dth-cg-ss-image {
    max-width: 300px;
    max-height: 50vh;
    width: auto;
    height: auto;
}

.dth-cg-ss-msg {
    color: #ece4d6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 20px;
    letter-spacing: -0.01em;
}
