/* Centralized Pixel Button Styles for PixelVerse */

/* Global Pixel Art Settings */
* {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

:root {
    /* Theme Colors for Border Flash */
    --primary-visual-accent: #C700C7; /* Softer Magenta */
    --secondary-visual-accent: #D4C037; /* Softer Gold/Yellow */
    --tertiary-visual-accent: #00A0A0; /* Softer Cyan */
    --quaternary-visual-accent: #005F9C; /* Softer Electric Blue */
    
    /* Text Colors - Vibrant Teal for Dark Mode */
    --text-color-main: #00E5E5; /* Vibrant Teal */
    --text-color-main-glow: rgba(0, 229, 229, 0.6); /* Stronger Teal Glow */
    --text-color-main-hover: #60FFFF; /* Even Brighter Teal on Hover */
    --text-color-main-hover-glow: rgba(96, 255, 255, 0.8); /* More Intense Glow on Hover */

    --button-line-sweep-duration: 0.7s; 
    --button-line-fade-duration: 0.15s; 
}

/* --- Pixel Action Button Styles --- */
.pixel-action-button {
    background-color: transparent;
    border: 1px solid transparent; 
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px 10px; 
    position: relative; 
    transition: background-color 0.2s ease-out; 
    min-width: 80px; 
    min-height: 40px; /* Ensure a minimum height */
    border-radius: 0; 
    
    --button-line-color1: transparent;
    --button-line-color2: transparent;
}

.pixel-action-button .button-text {
    font-variant: small-caps; 
    font-size: 15px;          
    font-weight: bold; 
    color: var(--text-color-main); 
    text-align: center;
    line-height: 1.1;         
    user-select: none;
    transition: color 0.2s ease-out, text-shadow 0.2s ease-out; 
    text-shadow: 0 0 4px var(--text-color-main-glow), 
                0 0 7px var(--text-color-main-glow),
                0 0 1px rgba(200, 255, 255, 0.3),
                -1px -1px 0 #000,  
                1px -1px 0 #000,
                -1px 1px 0 #000,
                1px 1px 0 #000; 
    position: relative; 
    z-index: 1; 
}

/* Underline pseudo-element for click animation */
.pixel-action-button .button-text::after {
    content: '';
    position: absolute;
    /* Default position: bottom */
    bottom: -3px; 
    left: 0;
    width: 100%;
    height: 1px; /* Line thickness */
    background: linear-gradient(to right, var(--button-line-color1), var(--button-line-color2), var(--button-line-color1));
    background-size: 200% 100%; 
    opacity: 0; 
    transition: opacity var(--button-line-fade-duration) ease-out;
    pointer-events: none;
}

/* Specific style for line on top */
.pixel-action-button.line-on-top .button-text::after {
    bottom: auto; /* Remove bottom positioning */
    top: -3px;    /* Position on top */
}

/* Compact style for single character buttons */
.pixel-action-button.compact {
    min-width: 40px; 
    width: 40px;    
    height: 40px;   
    padding: 5px;
}
.pixel-action-button.compact .button-text {
    font-size: 18px; 
    line-height: 1; 
}
.pixel-action-button.compact .button-text::after {
    bottom: -5px; /* Adjust underline position for compact button */
}
.pixel-action-button.compact.line-on-top .button-text::after {
    bottom: auto;
    top: -5px; /* Adjust overline position for compact button */
}

/* Hover State - Text glow changes */
.pixel-action-button:not([disabled]):not(.suppress-hover):hover .button-text { 
    color: var(--text-color-main-hover); 
    text-shadow: 0 0 6px var(--text-color-main-hover-glow), 
                0 0 10px var(--text-color-main-hover-glow), 
                0 0 2px rgba(224, 255, 255, 0.5),
                -1px -1px 0 #000,  
                1px -1px 0 #000,
                -1px 1px 0 #000,
                1px 1px 0 #000; 
}
.pixel-action-button:not([disabled]):not(.suppress-hover):hover {
    background-color: rgba(0, 220, 220, 0.04); 
}

/* Disabled Button Styles */
.pixel-action-button.disabled, button[disabled] { 
    cursor: not-allowed !important; 
    background-color: transparent !important;
    border-color: #222 !important; 
}
.pixel-action-button.disabled .button-text, button[disabled] .button-text {
    color: #305050 !important; 
    text-shadow: none !important; 
}

/* Click Animation for Button Underline/Overline */
.pixel-action-button.animate-click-line .button-text::after {
    opacity: 1; /* Fade in */
    animation: buttonLineSweep var(--button-line-sweep-duration) linear infinite;
}

@keyframes buttonLineSweep {
    0% { background-position: 0% 0%; }
    100% { background-position: -200% 0%; } /* Sweep left */
} 