/* Interaction Overlay Styles */
#page-target-overlay, #drawing-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none; /* Allow clicks to pass through to the book by default */
    z-index: 100;
}

#drawing-canvas {
    pointer-events: auto; /* Enable drawing on the canvas */
}

/* Interaction Points */
.interaction-point {
    position: absolute;
    transform: translate(-50%, -50%); /* Center the point on its coordinates */
    cursor: pointer;
    pointer-events: auto;
    z-index: 101;
}

/* Mobile Orientation Warning */
#orientation-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    color: white;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: Arial, sans-serif;
}

#orientation-warning .icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: rotate-phone 2s infinite ease-in-out;
}

#orientation-warning .message {
    font-size: 18px;
    padding: 0 20px;
}

@keyframes rotate-phone {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

/* Helper to show warning only on mobile portrait */
@media screen and (orientation: portrait) and (max-width: 768px) {
    body.is-mobile #orientation-warning {
        display: flex;
    }
}


#drawing-canvas, #page-target-overlay, .interaction-zone {
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
