/* Unified styles for Attack and Power-up Selectors */

/* Selector Groups */
.attack-selector-group,
.power-up-selector-group {
    margin-top: 1rem;
}

/* Selector Grid Layout */
.power-up-selector,
.attack-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0;
}

/* Individual Option Items */
.power-up-option,
.attack-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: pan-x pan-y;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Hover States */
.power-up-option:hover,
.attack-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

/* Selected States */
.power-up-option.selected,
.attack-option.selected {
    background: rgba(37, 99, 235, 0.3);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
}

.power-up-option.selected:hover,
.attack-option.selected:hover {
    background: rgba(37, 99, 235, 0.35);
    transform: translateX(4px);
}

/* Icons */
.power-up-icon,
.attack-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Names */
.power-up-name,
.attack-name {
    font-size: 0.875rem;
    color: #fff;
    flex-grow: 1;
    font-weight: 500;
}

/* Count Badges */
.power-up-count,
.attack-count {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #2563eb;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-weight: 600;
}

.power-up-option.selected .power-up-count,
.attack-option.selected .attack-count {
    opacity: 1;
}

/* Clear Buttons */
.power-up-clear,
.attack-clear {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: all 0.2s ease;
}

.power-up-option.selected .power-up-clear,
.attack-option.selected .attack-clear {
    display: flex;
}

.power-up-clear:hover,
.attack-clear:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.power-up-clear:active,
.attack-clear:active {
    transform: scale(0.95);
}

/* Light Theme Adjustments */
.theme-light .power-up-option,
.theme-light .attack-option {
    background: rgba(0, 0, 0, 0.05);
}

.theme-light .power-up-name,
.theme-light .attack-name {
    color: #1f2937;
}

.theme-light .power-up-option.selected,
.theme-light .attack-option.selected {
    background: rgba(37, 99, 235, 0.15);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4);
}

.theme-light .power-up-option:hover,
.theme-light .attack-option:hover {
    background: rgba(0, 0, 0, 0.08);
}

.theme-light .power-up-option.selected:hover,
.theme-light .attack-option.selected:hover {
    background: rgba(37, 99, 235, 0.2);
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .power-up-selector,
    .attack-selector {
        grid-template-columns: 1fr;
    }

    .power-up-option,
    .attack-option {
        padding: 0.75rem;
    }

    .power-up-icon,
    .attack-icon {
        font-size: 1.125rem;
        width: 1.25rem;
        height: 1.25rem;
    }

    .power-up-name,
    .attack-name {
        font-size: 0.8125rem;
    }
}