/* Food Stickers - Draggable Interactive Elements */

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .food-sticker {
        animation: none !important;
    }
}

/* Stickers Container */
.food-stickers-container {
    position: relative;
    width: 100%;
    min-height: 700px;
    height: 700px;
    pointer-events: none; /* Allow clicks to pass through to stickers */
    z-index: 100;
    margin: 3rem 0;
    overflow: visible !important;
    display: block !important;
    visibility: visible !important;
}

/* Individual Sticker */
.food-sticker {
    position: absolute;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: clamp(150px, 22vw, 250px);
    height: auto;
    cursor: grab;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: box-shadow 0.2s ease,
                filter 0.2s ease;
    z-index: 101;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.food-sticker:not(.dragging) {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s ease,
                filter 0.2s ease;
}

.food-sticker:active {
    cursor: grabbing;
}

.food-sticker img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: filter 0.2s ease;
}

/* Default positions - adjust these values to position stickers */
.food-sticker[data-sticker="knafeh"] {
    top: 15% !important;
    left: 10% !important;
    --rotation: -5deg;
}

.food-sticker[data-sticker="hummus"] {
    top: 30% !important;
    left: auto !important;
    right: 15% !important;
    --rotation: 8deg;
}

.food-sticker[data-sticker="musakhan"] {
    top: 50% !important;
    left: 20% !important;
    --rotation: -3deg;
}

/* Idle float animation (very subtle) */
@keyframes floatIdle {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(var(--rotation, 0deg));
    }
    50% {
        transform: translate3d(0, -8px, 0) rotate(var(--rotation, 0deg));
    }
}

.food-sticker:not(.dragging) {
    animation: floatIdle 4s ease-in-out infinite;
    transform: translate3d(0, 0, 0) rotate(var(--rotation, 0deg));
}

.food-sticker[data-sticker="knafeh"]:not(.dragging) {
    animation-delay: 0s;
}

.food-sticker[data-sticker="hummus"]:not(.dragging) {
    animation-delay: 1.3s;
}

.food-sticker[data-sticker="musakhan"]:not(.dragging) {
    animation-delay: 2.6s;
}

/* Hover state (desktop) */
@media (hover: hover) {
    .food-sticker:hover:not(.dragging) {
        transform: translate3d(0, 0, 0) scale(1.08) rotate(var(--rotation, 0deg));
    }
    
    .food-sticker:hover:not(.dragging) img {
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.25));
    }
}

/* Dragging state */
.food-sticker.dragging {
    z-index: 10000;
    animation: none;
    cursor: grabbing;
    transform: translate3d(var(--drag-x, 0), var(--drag-y, 0), 0) scale(1.03) rotate(var(--rotation, 0deg));
}

.food-sticker.dragging img {
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.3));
}

/* Focus state for accessibility */
.food-sticker:focus {
    outline: 3px solid #8B0200;
    outline-offset: 4px;
    border-radius: 8px;
}

.food-sticker:focus:not(:focus-visible) {
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .food-stickers-container {
        min-height: 500px;
        height: 500px;
    }
    
    .food-sticker {
        width: clamp(120px, 25vw, 180px);
    }
    
    /* Adjust default positions for mobile */
    .food-sticker[data-sticker="knafeh"] {
        top: 15% !important;
        left: 8% !important;
    }
    
    .food-sticker[data-sticker="hummus"] {
        top: 25% !important;
        right: 10% !important;
        left: auto !important;
    }
    
    .food-sticker[data-sticker="musakhan"] {
        bottom: auto !important;
        top: 45% !important;
        left: 15% !important;
    }
}

