/* 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;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

#drawing-canvas {
    pointer-events: auto; /* Enable drawing on the canvas */
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.interaction-zone, .interaction-point, [data-type="drag"], [data-type="match"], [data-type="true"], [data-type="false"], [data-type], .option-btn, .popup-option {
    touch-action: manipulation !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    cursor: pointer;
}

/* Page 23 hive boxes are completed by painting on the canvas, not by clicking
   the interaction overlay. The overlay remains visible for step highlighting. */
.interaction-zone[data-page="25"][data-type="sequential"] {
    pointer-events: none !important;
}

/* Interaction Points */
.interaction-point {
    position: absolute;
    transform: translate(-50%, -50%); /* Center the point on its coordinates */
    cursor: pointer;
    pointer-events: auto;
    z-index: 101;
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* Circle Choice Active & Glow Styling */
.interaction-zone[data-type="circle-choice"].active:not([data-id*="hex"]),
.interaction-zone.active[data-type="circle-choice"]:not([data-id*="hex"]),
.circle-choice.active:not([data-id*="hex"]) {
    box-sizing: border-box !important;
    border-width: 4.5px !important;
    border-style: solid !important;
    box-shadow: 0 0 14px 2px rgba(231, 76, 60, 0.55), inset 0 0 6px 1px rgba(231, 76, 60, 0.35) !important;
    transition: box-shadow 0.25s ease, border-width 0.2s ease;
}

/* Page 6 Hexagons (Petek Kutucukları) */
.interaction-zone[data-id*="hex"],
.interaction-zone[data-id*="hex"].active,
.interaction-zone.active[data-id*="hex"] {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    -webkit-box-shadow: none !important;
    mix-blend-mode: multiply !important;
}

/* 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;
    }
}
