/* ============================================================
   Bosk Furniture - content protection styles
   Paired with js/protect.js; both are loaded on every public page
   by design/seo-meta.php (never in the admin panel).
   ============================================================ */

/* No text selection, image dragging or iPhone "Save image" press... */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
img, picture, video, svg {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}

/* ...except where visitors need it: form fields and contact details */
input, textarea, select, [contenteditable="true"], address,
a[href^="tel:"], a[href^="mailto:"], .bosk-copy-ok, .bosk-copy-ok * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

/* ---- Branded notice shown when copying is blocked ---- */
.bosk-guard {
    position: fixed; left: 50%; bottom: 24px; z-index: 2147483000;
    display: flex; align-items: center; gap: 14px;
    width: max-content; max-width: calc(100vw - 32px);
    padding: 12px 12px 12px 14px;
    background: linear-gradient(140deg, #532A1A 0%, #2a160e 100%);
    border: 1px solid rgba(194, 167, 115, .45); border-radius: 16px;
    box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .6), 0 0 0 4px rgba(194, 167, 115, .08);
    color: #f6efe6; font-family: "Open Sans", "Segoe UI", Arial, sans-serif; text-align: left;
    opacity: 0; visibility: hidden; transform: translate(-50%, 20px);
    transition: opacity .28s ease, transform .28s ease, visibility 0s linear .28s;
}
.bosk-guard.is-on {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
    transition: opacity .28s ease, transform .28s ease, visibility 0s;
}
.bosk-guard-icon {
    flex: none; width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(194, 167, 115, .16); color: #C2A773;
}
.bosk-guard-icon svg { display: block; }
.bosk-guard.is-on .bosk-guard-icon { animation: bosk-guard-pulse 1.2s ease-out 1; }
.bosk-guard-text { min-width: 0; }
.bosk-guard-title {
    display: block; margin: 0 0 2px;
    font: 700 11px/1.3 Montserrat, "Segoe UI", Arial, sans-serif;
    letter-spacing: .16em; text-transform: uppercase; color: #C2A773;
}
.bosk-guard-msg { display: block; font-size: 14px; line-height: 1.45; color: #f6efe6; }
.bosk-guard a.bosk-guard-cta {
    flex: none; display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px;
    border-radius: 999px; background: #C2A773; color: #2a160e !important;
    font: 600 13px/1 Montserrat, "Segoe UI", Arial, sans-serif; white-space: nowrap;
    text-decoration: none !important; transition: background .2s ease;
}
.bosk-guard a.bosk-guard-cta:hover, .bosk-guard a.bosk-guard-cta:focus-visible { background: #d8c08f; }
.bosk-guard-close {
    flex: none; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: rgba(246, 239, 230, .7); font-size: 22px; line-height: 32px; cursor: pointer;
}
.bosk-guard-close:hover, .bosk-guard-close:focus-visible { background: rgba(255, 255, 255, .08); color: #fff; }

@keyframes bosk-guard-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(194, 167, 115, .55); }
    100% { box-shadow: 0 0 0 14px rgba(194, 167, 115, 0); }
}

/* Phones: full width, above the WhatsApp and back-to-top buttons */
@media (max-width: 575px) {
    .bosk-guard {
        left: 16px; right: 16px; bottom: 92px; width: auto; max-width: none;
        flex-wrap: wrap; gap: 10px 12px; transform: translateY(20px);
    }
    .bosk-guard.is-on { transform: none; }
    .bosk-guard-text { flex: 1 1 0; }
    .bosk-guard a.bosk-guard-cta { flex: 1 1 100%; justify-content: center; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
    .bosk-guard, .bosk-guard.is-on { transition: opacity .01s; transform: translate(-50%, 0); }
    .bosk-guard.is-on .bosk-guard-icon { animation: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 575px) {
    .bosk-guard, .bosk-guard.is-on { transform: none; }
}

/* ---- Printing / "Save as PDF": a notice instead of the page ---- */
@media print {
    body > * { display: none !important; }
    body { background: #fff !important; }
    body::before {
        content: "This page is protected.  \A\A Designs, photos and text \00A9  Bosk Furniture. \A For catalogues, designs and a free quote, visit www.boskfurniture.com or contact our team.";
        white-space: pre-line; display: block; padding: 60mm 20mm 0; text-align: center;
        font: 600 15pt/1.6 Montserrat, "Segoe UI", Arial, sans-serif; color: #532A1A;
    }
}
