/* ==========================================================================
   Sitiamo Child — cursor.css
   Cursore custom condiviso: home · olio · contatti.
   Enqueued condizionalmente da inc/page-templates.php (flag cursor: true).
   ========================================================================== */

/* ── Elementi ─────────────────────────────────────────────────────────────── */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 100000;
    mix-blend-mode: difference;
    border-radius: 50%;
    opacity: 0;
    transition:
        opacity 0.4s ease,
        width 0.45s cubic-bezier(.2,.7,.2,1),
        height 0.45s cubic-bezier(.2,.7,.2,1),
        margin 0.45s cubic-bezier(.2,.7,.2,1),
        background 0.3s ease,
        border-color 0.3s ease;
    will-change: transform, width, height;
}
.cursor-dot  { width: 6px;  height: 6px;  background: #faf6ef; margin: -3px 0 0 -3px; }
.cursor-ring { width: 38px; height: 38px; border: 1px solid rgba(250,246,239,0.85); margin: -19px 0 0 -19px; }

/* ── Stati ─────────────────────────────────────────────────────────────────── */
body.cursor-active .cursor-dot,
body.cursor-active .cursor-ring { opacity: 1; }

body.cursor-hover .cursor-ring  { width: 78px; height: 78px; margin: -39px 0 0 -39px; border-color: rgba(250,246,239,0.95); }
body.cursor-hover .cursor-dot   { opacity: 0; }

body.cursor-text .cursor-ring   { width: 88px; height: 88px; margin: -44px 0 0 -44px; background: rgba(250,246,239,0.92); border-color: transparent; }
body.cursor-text .cursor-dot    { opacity: 0; }

.cursor-ring::after {
    content: attr(data-label);
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--ff-body, sans-serif);
    font-size: 9px; letter-spacing: 0.22em; text-transform: uppercase;
    color: #1a3a2a;
    opacity: 0;
    transition: opacity 0.3s ease;
}
body.cursor-text .cursor-ring::after { opacity: 1; }

/* ── Touch / puntatore grossolano: nasconde i cerchi ─────────────────────── */
@media (hover: none), (pointer: coarse) {
    .cursor-dot,
    .cursor-ring { display: none !important; }
}

/* ── Nasconde il cursore nativo su tutto il documento ────────────────────── */
html.has-cursor,
html.has-cursor * { cursor: none !important; }

/* ── Ripristina cursore nativo corretto negli elementi interattivi ────────── */
html.has-cursor input,
html.has-cursor textarea         { cursor: text !important; }

html.has-cursor select,
html.has-cursor button,
html.has-cursor [role="button"],
html.has-cursor a                { cursor: pointer !important; }
