/**
 * Boo Cody Flasher Plugin Styles
 * Version: 1.1.0
 */

/* Main element */
#boo-cody-flasher {
    position: fixed !important;
    z-index: 999999 !important;
    font-weight: bold !important;
    color: #ff6600 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border-style: solid !important;
    border-color: #ff6600 !important;
    pointer-events: none !important;
    user-select: none !important;
    animation: flash 1s infinite alternate !important;
    white-space: nowrap !important;
    display: block !important;
    visibility: visible !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Position variants */
#boo-cody-flasher.boo-cody-top-left { top: 20px !important; left: 20px !important; }
#boo-cody-flasher.boo-cody-top-right { top: 20px !important; right: 20px !important; }
#boo-cody-flasher.boo-cody-bottom-left { bottom: 20px !important; left: 20px !important; }
#boo-cody-flasher.boo-cody-bottom-right { bottom: 20px !important; right: 20px !important; }
#boo-cody-flasher.boo-cody-center {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    animation: flash-center 1s infinite alternate !important;
}

/* Flash animations */
@keyframes flash {
    0% { opacity: 1; transform: scale(1); color: #ff6600; text-shadow: 0 0 10px #ff6600, 2px 2px 4px rgba(0, 0, 0, 0.8); }
    25% { opacity: 0.7; transform: scale(1.05); color: #ff3300; text-shadow: 0 0 15px #ff3300, 2px 2px 4px rgba(0, 0, 0, 0.8); }
    50% { opacity: 0.4; transform: scale(0.95); color: #ff9900; text-shadow: 0 0 5px #ff9900, 2px 2px 4px rgba(0, 0, 0, 0.8); }
    75% { opacity: 0.8; transform: scale(1.1); color: #ffcc00; text-shadow: 0 0 20px #ffcc00, 2px 2px 4px rgba(0, 0, 0, 0.8); }
    100% { opacity: 1; transform: scale(1); color: #ff0066; text-shadow: 0 0 25px #ff0066, 2px 2px 4px rgba(0, 0, 0, 0.8); }
}

@keyframes flash-center {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); color: #ff6600; text-shadow: 0 0 10px #ff6600, 2px 2px 4px rgba(0, 0, 0, 0.8); }
    25% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.05); color: #ff3300; text-shadow: 0 0 15px #ff3300, 2px 2px 4px rgba(0, 0, 0, 0.8); }
    50% { opacity: 0.4; transform: translate(-50%, -50%) scale(0.95); color: #ff9900; text-shadow: 0 0 5px #ff9900, 2px 2px 4px rgba(0, 0, 0, 0.8); }
    75% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); color: #ffcc00; text-shadow: 0 0 20px #ffcc00, 2px 2px 4px rgba(0, 0, 0, 0.8); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); color: #ff0066; text-shadow: 0 0 25px #ff0066, 2px 2px 4px rgba(0, 0, 0, 0.8); }
}

/* Responsive scaling */
@media (max-width: 768px) {
    #boo-cody-flasher:not(.boo-cody-center) {
        font-size: calc(var(--custom-font-size, 24px) * 0.8) !important;
        transform: scale(0.8) !important;
        transform-origin: var(--transform-origin, right top) !important;
    }
    #boo-cody-flasher.boo-cody-center {
        font-size: calc(var(--custom-font-size, 24px) * 0.8) !important;
    }
    #boo-cody-flasher.boo-cody-top-left,
    #boo-cody-flasher.boo-cody-top-right { top: 10px !important; }
    #boo-cody-flasher.boo-cody-bottom-left,
    #boo-cody-flasher.boo-cody-bottom-right { bottom: 10px !important; }
    #boo-cody-flasher.boo-cody-top-left,
    #boo-cody-flasher.boo-cody-bottom-left { left: 10px !important; }
    #boo-cody-flasher.boo-cody-top-right,
    #boo-cody-flasher.boo-cody-bottom-right { right: 10px !important; }
    
    /* Transform origins */
    #boo-cody-flasher.boo-cody-top-left { --transform-origin: left top; }
    #boo-cody-flasher.boo-cody-top-right { --transform-origin: right top; }
    #boo-cody-flasher.boo-cody-bottom-left { --transform-origin: left bottom; }
    #boo-cody-flasher.boo-cody-bottom-right { --transform-origin: right bottom; }
}

@media (max-width: 480px) {
    #boo-cody-flasher:not(.boo-cody-center) {
        font-size: calc(var(--custom-font-size, 24px) * 0.7) !important;
        transform: scale(0.7) !important;
    }
    #boo-cody-flasher.boo-cody-center {
        font-size: calc(var(--custom-font-size, 24px) * 0.7) !important;
    }
}

/* Accessibility support */
@media (prefers-reduced-motion: reduce) {
    #boo-cody-flasher { animation: none !important; opacity: 0.9 !important; }
}

@media (prefers-contrast: high) {
    #boo-cody-flasher {
        background: black !important;
        border-color: white !important;
        color: white !important;
        text-shadow: none !important;
    }
}

/* Dynamic styles (added by JS when needed) */
.boo-extra-flash {
    animation-duration: 0.3s !important;
    transform: scale(1.2) !important;
    filter: brightness(1.5) !important;
}

.boo-reduced-motion {
    animation: none !important;
    opacity: 0.9 !important;
}

.boo-paused {
    animation-play-state: paused !important;
} 