/* Base Styling */

/* Sticky and Absolute Positioning for Desktop and Tablet */
.cwg-sticky { position: fixed !important; z-index: 9999 !important; }
.cwg-absolute { position: absolute !important; z-index: 1 !important; }

/* Tablet-specific sticky class */
.cwg-tablet-sticky {
    position: fixed !important;
    z-index: 9998 !important;
}

/* Mobile and Tablet Visibility */
.cwg-hide-on-mobile { display: none !important; }
.cwg-hide-on-tablet { display: none !important; }

/* Emblem Link Styling */
.cwg-emblem-link { display: inline-block; overflow: hidden; }

/* Consistent Image Sizing */
.cwg-emblem img {
    width: auto !important;
    max-width: 100px !important;
    height: auto !important;
    max-height: 150px !important;
    object-fit: contain;
}

/* Specific Sizing for Horizontal Emblems */
.cwg-left-to-right img, .cwg-right-to-left img {
    max-width: 150px !important;
    max-height: 100px !important;
}

/* Positioning for Different Emblem Types */
.cwg-left-to-right { left: 0; bottom: 150px; }
.cwg-right-to-left { right: -1px; bottom: 150px; }
.cwg-bottom-left { left: 50px; bottom: -10px; }
.cwg-bottom-right { right: 50px; bottom: -10px; }

/* Animation and Hover Effects */

/* Fully visible position for tablet when animation is off */
.cwg-tablet-no-animation img {
    transform: translateX(0) !important;
}

/* Desktop Slide-in Animation */
.cwg-animated.cwg-left-to-right img { transform: translateX(-60%); }
.cwg-animated.cwg-right-to-left img { transform: translateX(60%); }
.cwg-animated.cwg-bottom-left img, .cwg-animated.cwg-bottom-right img { transform: translateY(58%); }

/* Hover Animation Effect */
.cwg-animated:hover img { transform: translate(0, 0); transition: transform 0.5s ease; }

/* Tablet-specific Animation */
@media (min-width: 768px) and (max-width: 1024px) {
    .cwg-tablet-animated.cwg-left-to-right img { transform: translateX(-40%); }
    .cwg-tablet-animated.cwg-right-to-left img { transform: translateX(40%); }
    .cwg-tablet-animated.cwg-bottom-left img, .cwg-tablet-animated.cwg-bottom-right img { transform: translateY(40%); }
    
    .cwg-tablet-animated:hover img { transform: translate(0, 0); transition: transform 0.5s ease; }
}

/* Tablet Idle 'Peek' Animation */
@keyframes cwg-tablet-peek-animation {
    0%, 80% { transform: translateX(-90px); } /* Mostly hidden, idle state */
    85% { transform: translateX(-50px); } /* Slight peek, like a gentle nudge */
    90% { transform: translateX(-70px); } /* Backs off a bit */
    95% { transform: translateX(0); } /* Fully visible, "Look at me!" */
    100% { transform: translateX(-90px); } /* Returns to hiding */
}

/* Apply 'Peek' Animation for Tablets */
.cwg-tablet-peek.cwg-left-to-right img,
.cwg-tablet-peek.cwg-right-to-left img {
    animation: cwg-tablet-peek-animation 10s ease-in-out infinite;
}

/* Full visibility when tapped */
.cwg-emblem.cwg-peek-open img {
    transform: translateX(0) !important;
    animation: none !important;
}
